-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getdents64 misses last 100 entries? #2077
Comments
The second time
|
@therealkenc , shouldn't second call just return 0 (EOF)? First call passes buffer 4096 entries long, surely whole response would fit there |
Here is the same test on Real Linux™. The first call coughs up 94 entries.
The ABI doesn't make any guarantees about how the entries are packed, only that |
@benhillis , @zadjii-msft this was still not labeled as a bug, which is concerning, were you able to reproduce it on your systems? |
Just checked Build 16215, problem still present |
I'll mark it as a bug so that the kernel team can triage. |
Also adding @SvenGroot as FYI. |
It turns that that we can end up skipping entries if you unlink files in between calls to getdents(64). I'm working on fixes for both LxFs and DrvFs. |
Fixed in 16237. |
I can confirm that it is fixed now. |
I've encountered a variant of this issue in 1809 (Ubuntu 18.04), so apparently this is not (completely) fixed. When reading
The expected strace output is:
The example was reduced from
|
Spawn into a new issue. Nice repro. |
I am running Windows 10 1703 build 16215.1000 and it seems that
getdents64
doesn't return all the entries, more specifically it seems to miss last 100 entries.Self contained script to reproduce a problem follows. I build it while debugging Go project compilation issue, so it might not be an absolute minimal test case, but it reproduces error 100% of the time, so it might be a good start:
run it in empty dir on a
lxfs
mount (I didn't checkdrvfs
yet).You'll see that it can't delete directory
testdir/unix
with an errorlooking at what is left in
testdir/unix
, you'll see that exactly 100 files are left there. Script producesstrace.log
output with following lines among others:so it returns 110 entries, but on a clean git clone at a given commit,
testdir/unix
directory has 210 entriesIt is not reproducible with
rm -rf
though, probably because coreutils usegetdents
version of syscall, which seem to work fineThe text was updated successfully, but these errors were encountered: