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: SIGSEGV during renaming #42170

Closed
asdine opened this issue Oct 23, 2020 · 2 comments
Closed

x/tools/gopls: SIGSEGV during renaming #42170

asdine opened this issue Oct 23, 2020 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@asdine
Copy link

asdine commented Oct 23, 2020

gopls version: v0.5.1
gopls flags:

Describe what you observed.

I was renaming a type used across the whole codebase, but I kept seeing "Connection got disposed" errors, until gopls crashed.
I'm on WSL 2 with Ubuntu 20.04 64bits

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x7db9fa]

goroutine 15463 [running]:
golang.org/x/tools/internal/lsp/source.pathEnclosingInterval(0xc0002ccc00, 0x0, 0x0, 0x183ca, 0x183ca, 0x29eee67e60eac8ac, 0x9, 0x0, 0x0, 0x0, ...)
	  rename_check.go:850  0x5a
golang.org/x/tools/internal/lsp/source.(*renamer).checkStructField(0xc00b38b360, 0xc00b1bcd70)
	  rename_check.go:393  0xaf
golang.org/x/tools/internal/lsp/source.(*renamer).check(0xc00b38b360, 0xefb480, 0xc00b1bcd70)
	  rename_check.go:44  0x37a
golang.org/x/tools/internal/lsp/source.Rename(0xeebc60, 0xc012f6c150, 0xefcb80, 0xc0092c2a80, 0xeebe60, 0xc008972180, 0x407b900000000000, 0x4008000000000000, 0xc009ce67d3, 0x9, ...)
	  rename.go:126  0x605
golang.org/x/tools/internal/lsp.(*Server).rename(0xc0001dc140, 0xeebba0, 0xc001bbe3c0, 0xc001ec8980, 0x0, 0x0, 0x0)
	  rename.go:20  0x186
golang.org/x/tools/internal/lsp.(*Server).Rename(0xc0001dc140, 0xeebba0, 0xc001bbe3c0, 0xc001ec8980, 0xc001ec8980, 0x0, 0x0)
	  server_gen.go:148  0x49
golang.org/x/tools/internal/lsp/protocol.serverDispatch(0xeebba0, 0xc001bbe3c0, 0xeff700, 0xc0001dc140, 0xc012f6c000, 0xeebde0, 0xc001bbe080, 0x0, 0xed9140, 0xc000816000)
	  tsserver.go:399  0x14e2
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0xeebba0, 0xc001bbe3c0, 0xc012f6c000, 0xeebde0, 0xc001bbe080, 0x223fbcd85, 0x1344da0)
	  protocol.go:63  0xc5
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0xeebba0, 0xc001bbe3c0, 0xc012f6c000, 0xeebde0, 0xc001bbe080, 0x0, 0x0)
	  lsprpc.go:557  0x452
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0xeebba0, 0xc001bbe3c0, 0xc008538d00, 0xeebde0, 0xc001bbe080, 0xb5ff0e, 0xc003c978c8)
	  handler.go:35  0xcf
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc0123cc240, 0xc012f4ac00, 0xc000382500, 0xeebba0, 0xc001bbe3c0, 0xc008538d00, 0xeebde0, 0xc001bbe080)
	  handler.go:103  0x86
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	  handler.go:100  0x173
[Error - 8:26:59 PM] 
@hyangah hyangah changed the title gopls: automated issue report (crash) x/tools/gopls: SIGSEGV during renaming Oct 23, 2020
@hyangah hyangah transferred this issue from golang/vscode-go Oct 23, 2020
@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 Oct 23, 2020
@gopherbot gopherbot added this to the Unreleased milestone Oct 23, 2020
@gopherbot
Copy link

Change https://golang.org/cl/264619 mentions this issue: internal/lsp/source: handle nil pointer in rename_check.go

@stamblerre stamblerre marked this as a duplicate of #42170 Oct 23, 2020
@stamblerre stamblerre reopened this Oct 23, 2020
@gopherbot
Copy link

Change https://golang.org/cl/264625 mentions this issue: internal/lsp/source: handle nil pointer in rename_check.go

gopherbot pushed a commit to golang/tools that referenced this issue Oct 23, 2020
Fixes golang/go#42170

Change-Id: Id5b9f5767e952b63482372e5275aa162bc9ab14a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/264619
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
(cherry picked from commit c8cfbd0)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/264625
@golang golang locked and limited conversation to collaborators Oct 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants