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

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

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


Copy link

@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*headerStream).Read(0xc00009eca0, 0x8a9580, 0xc000092010, 0xc000098ba0, 0xc00009ed80, 0xc00009ed01, 0x0, 0x0)
	/home/ainar/go/src/ +0x84*Conn).Run(0xc00016c230, 0x8a9580, 0xc000092010, 0x0, 0x0)
	/home/ainar/go/src/ +0xee*Server).Run(0xc0000bc090, 0x8a9580, 0xc000092010, 0x1000, 0x0)
	/home/ainar/go/src/ +0x42
created by
	/home/ainar/go/src/ +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
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.

Copy link

@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.
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.