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: panic in ast.Walk #65516

Closed
danp opened this issue Feb 4, 2024 · 5 comments
Closed

x/tools/gopls: panic in ast.Walk #65516

danp opened this issue Feb 4, 2024 · 5 comments
Assignees
Labels
gopls/telemetry-wins gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@danp
Copy link
Contributor

danp commented Feb 4, 2024

Getting this panic using gopls golang/tools@a1fbc78 and Go tip:

runtime.gopanic:59
runtime.panicmem:?261
go/ast.Walk:184
go/ast.Inspect:?397
golang.org/x/tools/gopls/internal/golang.highlightPath:29
golang.org/x/tools/gopls/internal/golang.Highlight:31
golang.org/x/tools/gopls/internal/server.(*server).DocumentHighlight:14
golang.org/x/tools/gopls/internal/protocol.serverDispatch:280
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

Noticed since gopls was exiting, sourced this stack from my local telemetry data. I assume it will be uploaded at some point but wanted to bring it up.

Maybe related to golang/tools@85146f5 / #60589?

@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 Feb 4, 2024
@gopherbot gopherbot added this to the Unreleased milestone Feb 4, 2024
@ansaba ansaba added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 5, 2024
@findleyr
Copy link
Contributor

findleyr commented Feb 5, 2024

Indeed, this is almost certainly a new crash introduced by my CL. Thanks!

@findleyr findleyr self-assigned this Feb 5, 2024
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.15.0 Feb 5, 2024
@adonovan
Copy link
Member

adonovan commented Feb 5, 2024

Congratulations: you discovered the the first auto-reported crash to pass through the new machinery that landed on Friday!

@findleyr
Copy link
Contributor

findleyr commented Feb 5, 2024

I definitely left that panic in my CL to exercise the new machinery... 😅

@gopherbot
Copy link

Change https://go.dev/cl/561435 mentions this issue: gopls/internal/golang: add missing check for nil funcBody

@gopherbot
Copy link

Change https://go.dev/cl/561517 mentions this issue: runtime: report inlined frames in Frames.Next

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. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

5 participants