-
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: Hover: panic in lookup{ObjectByName,DocLinkSymbol} #69616
Comments
This is mysterious. The crash is in func (s *Scope) Lookup(name string) Object {
obj := resolve(name, s.elems[name])
if obj == universeAnyAlias && !aliasAny() { // <---------- panic
return universeAnyNoAlias
}
return obj
} but the only way that line can panic (short of a compiler error that causes the wrong line to be reported) is if |
I do not understand how this crash is possible, and so suggest that we move it to the next milestone and see if it reoccurs in v0.17.0. |
@dr2chase Got any ideas how this crash could possibly occur? |
Change https://go.dev/cl/633095 mentions this issue: |
Avoid a theoretical crash in lookupDocLinkSymbol (nee lookupObjectByName), with a refining bug report. For golang/go#69616 Change-Id: I5305583c541eb54bb89bed1dc680c9b0e93b90d9 Reviewed-on: https://go-review.googlesource.com/c/tools/+/633095 Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change https://go.dev/cl/633707 mentions this issue: |
I was just looking through my telemetry data, and saw that I encountered this crash 3 times on 12/2 (I hadn't noticed the crashes), so it must be reachable without a GOPACKAGESDRIVER. Unfortunately, logs were lost. |
Issue created by stacks.
This stack
l9BGAQ
was reported by telemetry:crash/crash
runtime.gopanic:+69
runtime.panicmem:=262
runtime.sigpanic:+19
go/types.(*Scope).Lookup:+10
golang.org/x/tools/gopls/internal/golang.lookupObjectByName:+4
golang.org/x/tools/gopls/internal/golang.parseDocLink:+58
golang.org/x/tools/gopls/internal/golang.hover:+43
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
The text was updated successfully, but these errors were encountered: