Skip to content
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: crash in packageReferences (reported by telemetry) #66250

Closed
findleyr opened this issue Mar 11, 2024 · 2 comments
Closed

x/tools/gopls: crash in packageReferences (reported by telemetry) #66250

findleyr opened this issue Mar 11, 2024 · 2 comments
Assignees
Labels
gopls/telemetry-wins gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@findleyr
Copy link
Contributor

In https://storage.googleapis.com/prod-telemetry-merged/2024-03-06.json:

crash/crash
runtime.gopanic:+69
golang.org/x/tools/gopls/internal/golang.mustLocation:=692
golang.org/x/tools/gopls/internal/golang.packageReferences:+91
golang.org/x/tools/gopls/internal/golang.references:+12
golang.org/x/tools/gopls/internal/golang.References:+1
golang.org/x/tools/gopls/internal/server.(*server).References:+18
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+478
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func3:+5
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func4:+52
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1:+2
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2:+3
runtime.goexit:+0":2,"gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/golang.expandMethodSearch:+4
golang.org/x/tools/gopls/internal/golang.ordinaryReferences:+143
golang.org/x/tools/gopls/internal/golang.references:+14
golang.org/x/tools/gopls/internal/golang.References:+1
golang.org/x/tools/gopls/internal/server.(*server).References:+18
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+478
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func3:+5
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func4:+52
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1:+2
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2:+3

Reproducible by requesting references when one of the package files lacks a name.

@findleyr findleyr added this to the gopls/v0.15.2 milestone Mar 11, 2024
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Mar 11, 2024
@findleyr findleyr self-assigned this Mar 11, 2024
@gopherbot
Copy link

Change https://go.dev/cl/570676 mentions this issue: gopls/internal/golang: fix crash in package references

@gopherbot
Copy link

Change https://go.dev/cl/570597 mentions this issue: [gopls-release-branch.0.15] gopls/internal/golang: fix crash in package references

gopherbot pushed a commit to golang/tools that referenced this issue Mar 11, 2024
…ge references

Fix a crash found via telemetry, which may be encountered when finding
references for a package where one of the package files lacks a valid
name.

Fixes golang/go#66250

Change-Id: Ifca9b6b7ab2ab8181b70e97d343fa2b072e866eb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/570597
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls/telemetry-wins gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants