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/cmd/gopls: "slice bounds out of range" when listening on a port #31570

Closed
ainar-g opened this issue Apr 19, 2019 · 2 comments
Closed

x/tools/cmd/gopls: "slice bounds out of range" when listening on a port #31570

ainar-g opened this issue Apr 19, 2019 · 2 comments
Assignees
Milestone

Comments

@ainar-g
Copy link
Contributor

@ainar-g ainar-g commented Apr 19, 2019

Version 4796d4bd.

$ gopls serve --listen :6061
panic: runtime error: slice bounds out of range

goroutine 20 [running]:
bufio.(*Reader).ReadSlice(0xc000098b40, 0xc00009280a, 0xc00006d2b8, 0xc000134ce8, 0xc000134cf8, 0x0, 0x0)
	/home/ainar/go/go1.11/src/bufio/bufio.go:319 +0x20b
bufio.(*Reader).ReadBytes(0xc000098b40, 0xa, 0xc0000ede38, 0xc0000edd80, 0x407b4a, 0x0, 0x0)
	/home/ainar/go/go1.11/src/bufio/bufio.go:419 +0x70
bufio.(*Reader).ReadString(0xc000098b40, 0xa, 0xc00009ed00, 0x450d0987c250b85b, 0x8, 0xc0000eddf0)
	/home/ainar/go/go1.11/src/bufio/bufio.go:459 +0x38
golang.org/x/tools/internal/jsonrpc2.(*headerStream).Read(0xc00009eca0, 0x8a9580, 0xc000092010, 0xc000098ba0, 0xc00009ed80, 0xc00009ed01, 0x0, 0x0)
	/home/ainar/go/src/golang.org/x/tools/internal/jsonrpc2/stream.go:97 +0x84
golang.org/x/tools/internal/jsonrpc2.(*Conn).Run(0xc00016c230, 0x8a9580, 0xc000092010, 0x0, 0x0)
	/home/ainar/go/src/golang.org/x/tools/internal/jsonrpc2/jsonrpc2.go:281 +0xee
golang.org/x/tools/internal/lsp.(*Server).Run(0xc0000bc090, 0x8a9580, 0xc000092010, 0x1000, 0x0)
	/home/ainar/go/src/golang.org/x/tools/internal/lsp/server.go:63 +0x42
created by golang.org/x/tools/internal/lsp.RunServerOnAddress
	/home/ainar/go/src/golang.org/x/tools/internal/lsp/server.go:58 +0xfa

If I can provide any additional info, I am ready to help.

@gopherbot gopherbot added this to the Unreleased milestone Apr 19, 2019
@ianthehat ianthehat self-assigned this Apr 19, 2019
@ianthehat ianthehat added the gopls label Apr 19, 2019
@ianthehat
Copy link

@ianthehat ianthehat commented Apr 19, 2019

The only time I have seen a crash like this in bufio was because it was being used concurrently.
Not sure how that could be happening in this case, but on the other hand serve --listen mode is only intended for debugging at this point, I would not be surprised if it has problems, especially if more than one client connects to it.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jun 5, 2019

Closing this issue as obsolete, as @ianthehat has since added the --debug flag that should be used instead.

@stamblerre stamblerre closed this Jun 5, 2019
@golang golang locked and limited conversation to collaborators Jun 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.