-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/cmd/godoc: ignored "too many open files" errors can cause incomplete /pkg/ subdirectories listings #14252
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
I've looked into why it happens. At first I thought it might be some race condition, but I've learned it's not. Instead, the problem is here: Because all GOROOT and GOPATH workspaces are walked in parallel (likely with some concurrency limits), it may run into "too many files open" limits and erroring out. The linked code segment ignores all situations where parsing the .go files results in errors (there's no I've added a simple |
@adg improved this in https://go-review.googlesource.com/24060 I'll send a bit more. |
CL https://golang.org/cl/47651 mentions this issue. |
Updates golang/go#14252 Change-Id: I3ce2a410708900f5c80d15e722b410855fd9c571 Reviewed-on: https://go-review.googlesource.com/47651 Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
I think this has been addressed. At the very least, I have a pretty large source tree (every Github checkout I do in any language is in GOPATH) and I've never seen this issue, nor a godoc server with randomly missing files. |
Closing, feel free to reopen if this is still a problem, or there's a way to reproduce on tip. |
I suspect that the 2 commits to help this issue (golang/tools@a2a5522 and golang/tools@72ed06f) were sufficient to resolve it. If I ever run into this again, I'll post an update. |
What version of Go are you using (go version)?
go version go1.6rc2 darwin/amd64
What operating system and processor architecture are you using?
OS X 10.11.3 (64-bit).
What did you do?
godoc -http=localhost:6060
.What did you expect to see?
A complete list of subdirectories, with their package synopses.
What did you see instead?
Randomly incomplete listing of subdirectories, and some missing package synopses.
The text was updated successfully, but these errors were encountered: