-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/tools/gopls: "internal error reading (shared cache|typerefs data)" (ENOSPC?) bug report (via telemetry) #67433
Comments
The possible causes of this failure are:
The first seems the most likely. The others can only happen if someone is meddling with the executable or the cache directory. |
Very different stack, but same cause. (Probably the same user given the rarity, timing, and OS/ARCH.) func (s *Snapshot) typerefData(ctx context.Context, id PackageID, imports map[ImportPath]*metadata.Package, cgfs []file.Handle) ([]byte, error) {
key := typerefsKey(id, imports, cgfs)
if data, err := filecache.Get(typerefsKind, key); err == nil {
return data, nil
} else if err != filecache.ErrNotFound {
bug.Reportf("internal error reading typerefs data: %v", err) // <-- here
} This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
Looked at this briefly. We should probably not have a bug that can be reasonably triggered by an OS error, but should also do a better job of surfacing this error to the user. Bumping to v0.18. |
I think all we need to do here is treat ENOSPC as a cache miss. As a bonus we might also want to showMessage an error when the space in the cache volume is tight; currently we report just an internal event when filecache.Set fails. |
This stack
|
This stack
|
Change https://go.dev/cl/639395 mentions this issue: |
filecache.Get operations sometimes fail. This CL enumerates a number of causes, and mitigates the likely most common one--failure to create the cache due to ENOSPC--by forcing cache creation during early startup. This also minimizes the time window during which deletion of the gopls executable is a possible cause. If we continue to observe failures, the mostly likely remaining cause is deletion of the cache while gopls is running. This CL details a possible mitigation. Updates golang/go#67433 Change-Id: I3545e56f7af308afba3527a418757b3cf4573569 Reviewed-on: https://go-review.googlesource.com/c/tools/+/639395 Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
This stack
|
This stack
-iVK7w
was reported by telemetry:Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.
Dups: m4MTKQ UFNCpw e960MA T1ADGg HYjhzQ
The text was updated successfully, but these errors were encountered: