-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: imports: nil panic in ClearModuleInfo (via telemetry) #66490
Comments
This crash is impossible according to the Go spec. I suspect a bug in the Go toolchain that was used, which is not a released one. |
I spoke too soon: it's a classic nil-pointer-makes-non-nil interface bug. Fix pending. |
Change https://go.dev/cl/574136 mentions this issue: |
Change https://go.dev/cl/577297 mentions this issue: |
… interface" bugs CL 559635 changed newModuleResolver so that it can return (nil, err). That means it is no longer safe to unconditionally convert the first result to a Resolver interface, but we forgot to check in two places, causing a crash that was reported by telemetry. This change adds the two checks. Updates golang/go#66490 Updates golang/go#66730 Change-Id: I3f2b84ed792b1eea179fc0d4d5ee9843281506fc Reviewed-on: https://go-review.googlesource.com/c/tools/+/574136 Reviewed-by: Peter Weinberger <pjw@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> (cherry picked from commit 63b3b5a) Reviewed-on: https://go-review.googlesource.com/c/tools/+/577297 Reviewed-by: Alan Donovan <adonovan@google.com>
This stack
pUwreg
was reported by telemetry:ClearModuleInfo:+4
is:but I don't see at a glance how a ModuleResolver can be constructed without a valid scanSema.
Possibly related to https://go.dev/cl/561235?
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.
The text was updated successfully, but these errors were encountered: