-
Notifications
You must be signed in to change notification settings - Fork 18k
syscall: Getdirentries on freebsd 11 is broken #31416
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
Comments
The |
Change https://golang.org/cl/171719 mentions this issue: |
Change https://golang.org/cl/171818 mentions this issue: |
Dirent doesn't work properly. Diable the test for now. Update #31416 Change-Id: I34a8045598a9c303dcc754ce04da3c124f122d1a Reviewed-on: https://go-review.googlesource.com/c/go/+/171818 Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Since FreeBSD 11.x was removed from our list of builds, can we close this issue and remove the skipped portion of the test? I couldn't reproduce under FreeBSD 14. |
Since the tree is frozen, a change to unskip the test at this point wouldn't get very many runs before the release, which would make it more likely that we miss a test regression if it turns out not to be fixed after all. Let's aim to remove the skip when the tree opens for 1.19, so that we can have the whole 1.19 cycle to verify that it is actually fixed. |
This issue is currently labeled as early-in-cycle for Go 1.19. |
Change https://go.dev/cl/393618 mentions this issue: |
TestDirentRepeat fails on FreeBSD 11, but seems to pass on newer versions. Go 1.18 is the last release to support FreeBSD 11 per https://golang.org/doc/go1.18#freebsd and there are no FreeBSD 11 builders anymore. Thus unskip TestDirentRepeat to verify the issue is indeed fixed on FreeBSD 12 and later. For #31416 Change-Id: I189ef06719ff830ffe2e402c74a75874c9e5b97b Reviewed-on: https://go-review.googlesource.com/c/go/+/393618 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
There don't seem to be any reports about |
Getdirentries
on freebsd 11 will silently drop files from the directory listing.It converts old, smaller records into new, bigger records. It tries to account for the size increase by calling the syscall with a smaller buffer (1/4 the size). But it also has a lower bound on the minimum size, so the syscall buffer may in fact be no smaller than the original buffer. As a result, when copying from the syscall buffer to the output buffer, there may not be room for all the listed files. The code silently drops the files that don't fit.
The patch below will at least panic in that situation. The freebsd port needs to be fixed somehow. The new test
TestDirentRepeat
tickles this bug.@paulzhol
Split off from #31403
The text was updated successfully, but these errors were encountered: