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: automated issue report (crash) #44353

mjmac opened this issue Feb 17, 2021 · 4 comments

x/tools/gopls: automated issue report (crash) #44353

mjmac opened this issue Feb 17, 2021 · 4 comments


Copy link

@mjmac mjmac commented Feb 17, 2021

gopls version: v0.6.4
gopls flags:
extension version: 0.22.1
environment: Visual Studio Code linux
initialization error: undefined
manual restart count: 0
total start count: 1

Was working in a file that uses cgo, started typing the name of a C function and I guess gopls crashed.

panic: unreachable

goroutine 6510 [running]:
go/types.(*Checker).handleBailout(0xc00253fc20, 0xc00367f9f0)
	  check.go:244  0x98
panic(0xca9380, 0xf063e0)
	  panic.go:969  0x1b9
go/types.(*Checker).assignment(0xc00253fc20, 0xc007100680, 0xf1f240, 0xc00627ac60, 0xdea16c, 0xa)
	  assignments.go:28  0x78f
go/types.(*Checker).initVar(0xc00253fc20, 0xc00d39ae60, 0xc007100680, 0xdea16c, 0xa, 0x7f78c1addd00, 0x8)
	  assignments.go:124  0x148
go/types.(*Checker).initVars(0xc00253fc20, 0xc00d398208, 0x1, 0x1, 0xc007ed7e70, 0x1, 0x1, 0x0)
	  assignments.go:247  0x599
go/types.(*Checker).shortVarDecl(0xc00253fc20, 0xdc850c, 0xc007ed7e60, 0x1, 0x1, 0xc007ed7e70, 0x1, 0x1)
	  assignments.go:322  0x28c
go/types.(*Checker).stmt(0xc00253fc20, 0x0, 0xf2ae60, 0xc003bbb0c0)
	  stmt.go:398  0x36aa
go/types.(*Checker).stmtList(0xc00253fc20, 0x0, 0xc002282e00, 0x7, 0x8)
	  stmt.go:120  0xd1
go/types.(*Checker).funcBody(0xc00253fc20, 0xc0031ddda0, 0xc0047967ec, 0x4, 0xc006166540, 0xc0009fdcb0, 0x0, 0x0)
	  stmt.go:42  0x21c
	  decl.go:662  0x67
go/types.(*Checker).processDelayed(0xc00253fc20, 0x0)
	  check.go:290  0x3e
go/types.(*Checker).checkFiles(0xc00253fc20, 0xc006922540, 0x8, 0x8, 0x0, 0x0)
	  check.go:266  0xd0
	  check.go:249, 0xc006922280, 0xc0000fe540, 0xc001f7d1e0, 0x2, 0xc007ebcf30, 0x0, 0x0, 0x0)
	  check.go:431  0x1273*snapshot).buildPackageHandle.func1(0xf2d8e0, 0xc006922280, 0xf19d00, 0xc0000fe540, 0x0, 0x1)
	  check.go:97  0x1bc*Handle).run.func1(0xc007cb18b0, 0xf2d8e0, 0xc006922280, 0xc007cd6080, 0xf19d00, 0xc0000fe540, 0xc008d34a80)
	  memoize.go:322  0xa8
created by*Handle).run
	  memoize.go:315  0x185
[Error - 5:04:53 PM] 
Copy link

@hyangah hyangah commented Feb 17, 2021

@mjmac Thanks for the report and stack trace. Transferring to the gopls issue tracker.
Is it reproducible with the latest gopls (v0.6.5 is the latest, and v0.6.6-pre.1 is currently out for testing)?
And what's the go version you are using?

@hyangah hyangah transferred this issue from golang/vscode-go Feb 17, 2021
@hyangah hyangah changed the title gopls: automated issue report (crash) x/tools/gopls: automated issue report (crash) Feb 17, 2021
@gopherbot gopherbot added this to the Unreleased milestone Feb 17, 2021
Copy link

@stamblerre stamblerre commented Feb 18, 2021

/cc @findleyr for type-checker

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Feb 18, 2021
Copy link

@findleyr findleyr commented Feb 18, 2021

/cc @griesemer as well.

Based on line numbers, this is go1.15 or earlier (in other words, not a new regression in 1.16). From the description and panic site, I'd guess the assignment operand was a cgofunc.

Copy link

@findleyr findleyr commented Feb 19, 2021

I'm going to close this as a dupe of #44397, which was more recently filed but has more information.

@findleyr findleyr closed this Feb 19, 2021
@stamblerre stamblerre removed this from the gopls/v1.0.0 milestone Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants