Skip to content

gopls: automated issue report (crash) #3449

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

Closed
Aamir-Alam01 opened this issue Jul 12, 2024 · 2 comments
Closed

gopls: automated issue report (crash) #3449

Aamir-Alam01 opened this issue Jul 12, 2024 · 2 comments
Milestone

Comments

@Aamir-Alam01
Copy link

gopls version: v0.16.1/go1.22.5
gopls flags:
update flags: proxy
extension version: 0.41.4
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Fri, 12 Jul 2024 11:34:52 GMT
restart history:
Fri, 12 Jul 2024 09:36:41 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic:   stmt.go:932: assertion failed

goroutine 2627 [running]:
go/types.(*Checker).handleBailout(0x14006d40800, 0x14007021878)
	  check.go:367  0x9c
panic({0x1050c73a0%3F, 0x140055510e0%3F})
	  panic.go:770  0x124
go/types.assert(0x0%3F)
	  errors.go:28  0x60
go/types.(*Checker).rangeStmt(0x14006d40800, 0x3, 0x140050ab440)
	  stmt.go:932  0xb58
go/types.(*Checker).stmt(0x14006d40800, 0x3, {0x105250e80, 0x140050ab440})
	  stmt.go:827  0x874
go/types.(*Checker).stmtList(0x14006d40800, 0x3, {0x14005014fa0%3F, 0x104d48115%3F, 0x5%3F})
	  stmt.go:121  0x88
go/types.(*Checker).stmt(0x14006d40800, 0x3, {0x105250e20, 0x140051332f0})
	  stmt.go:562  0x1974
go/types.(*Checker).rangeStmt(0x14006d40800, 0x3, 0x140050ab4a0)
	  stmt.go:993  0x570
go/types.(*Checker).stmt(0x14006d40800, 0x0, {0x105250e80, 0x140050ab4a0})
	  stmt.go:827  0x874
go/types.(*Checker).stmtList(0x14006d40800, 0x0, {0x14000770b00%3F, 0x104d48115%3F, 0x5%3F})
	  stmt.go:121  0x88
go/types.(*Checker).stmt(0x14006d40800, 0x0, {0x105250e20, 0x14005133320})
	  stmt.go:562  0x1974
go/types.(*Checker).stmt(0x14006d40800, 0x0, {0x105250df0, 0x14005140600})
	  stmt.go:574  0x258c
go/types.(*Checker).stmtList(0x14006d40800, 0x0, {0x14005140640%3F, 0x1058b5ee0%3F, 0x140070216d8%3F})
	  stmt.go:121  0x88
go/types.(*Checker).funcBody(0x14006d40800, 0x10524e588%3F, {0x140050c1a50%3F, 0x1400012e380%3F}, 0x140047d4f80, 0x14005133440, {0x0%3F, 0x0%3F})
	  stmt.go:41  0x21c
go/types.(*Checker).funcDecl.func1()
	  decl.go:852  0x44
go/types.(*Checker).processDelayed(0x14006d40800, 0x0)
	  check.go:467  0x12c
go/types.(*Checker).checkFiles(0x14006d40800, {0x14006d70be0, 0x4, 0x4})
	  check.go:411  0x188
go/types.(*Checker).Files(...)
	  check.go:372
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage(0x14006d95bc0, {0x105252168, 0x140046d4420}, 0x14005720120)
	  check.go:1543  0x788
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage(0x14006d95bc0, {0x105252168, 0x140046d4420}, 0x0, {0x14000794640, 0x10})
	  check.go:568  0x534
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func2()
	  check.go:418  0x34
golang.org/x/sync/errgroup.(*Group).Go.func1()
	  errgroup.go:78  0x58
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 132
	  errgroup.go:75  0x98
gopls stats -anon gopls stats -anon failed after 622 ms. Please check if gopls is killed by OS.

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.

NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.

<OPTIONAL: ATTACH LOGS HERE>

@gopherbot gopherbot added this to the Untriaged milestone Jul 12, 2024
@hyangah
Copy link
Contributor

hyangah commented Jul 15, 2024

Thanks for the report @Aamir-Alam01
Looks similar to the issue golang/go#68334, but the stack trace is slightly different.
(no types.(*Checker).exprInternal.func1(), etc). cc @timothy-king @findleyr

@findleyr
Copy link
Member

This is a dupe. The bottom of the stack is just due to the various ways to reach a range statement (golang/go#68334 originates inside a func lit, this one originates inside an if statement).

Thanks for the report. This is a regression in go1.22.5, which should be fixed by go1.22.6.

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants