-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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 Hover (telemetry) #69362
Comments
I can't explain this one. The only three calls to
It can't be (1) because the Hover logic handled the package clause specially at L186. It can't be (2) because this would cause referencedObject to return a non-nil third result (selectedType), causing an early return. And it can't be (3) because that would cause referencedObject not to return a non-nil Object, Ident pair, leading to an early return. Clearly there is a mistake in my logic. But where? |
Agreed. I think the best we'll be able to do here is downgrade the panic into two or more bug reports that refine the panic. This is not the first "can't happen" bug related to go/types... |
Change https://go.dev/cl/627015 mentions this issue: |
This CL splits the various fallible checks that may have been responsible for the crash report in golang/go#69362 onto separate lines so that we can confirm whether a nil map entry is indeed the cause. (I am almost certain that it is, but I still can't explain it.) Updates golang/go#69362 Change-Id: I0469e285bda65c21e80a348af04ea0e69f6a31c0 Reviewed-on: https://go-review.googlesource.com/c/tools/+/627015 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
This stack
|
This CL splits the various fallible checks that may have been responsible for the crash report in golang/go#69362 onto separate lines so that we can confirm whether a nil map entry is indeed the cause. (I am almost certain that it is, but I still can't explain it.) Updates golang/go#69362 Change-Id: I0469e285bda65c21e80a348af04ea0e69f6a31c0 Reviewed-on: https://go-review.googlesource.com/c/tools/+/627015 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
This stack
zUGLQA
was reported by telemetry:Looks like
Defs[ident]=nil
is an actual map entry.crash/crash
runtime.gopanic:+69
runtime.panicmem:=262
runtime.sigpanic:+19
golang.org/x/tools/gopls/internal/golang.hover:+170
golang.org/x/tools/gopls/internal/golang.Hover:+4
golang.org/x/tools/gopls/internal/server.(*server).Hover:+30
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+335
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
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.
Dups: ylB3Iw
The text was updated successfully, but these errors were encountered: