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/internal/lsp/cmd: apparent deadlock on linux-amd64-wsl #54905

Closed
bcmills opened this issue Sep 6, 2022 · 5 comments
Closed

x/tools/internal/lsp/cmd: apparent deadlock on linux-amd64-wsl #54905

bcmills opened this issue Sep 6, 2022 · 5 comments
Labels
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

@bcmills
Copy link
Contributor

bcmills commented Sep 6, 2022

Looks like a deadlock to me because nearly everything was stuck for 9 minutes.

panic: test timed out after 10m0s

goroutine 13594 [running]:
testing.(*M).startAlarm.func1()
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:2036 +0x8e
created by time.goFunc
	/tmp/workdir-host-linux-amd64-wsl/go/src/time/sleep.go:176 +0x32

goroutine 1 [chan receive, 9 minutes]:
testing.(*T).Run(0xc000227ba0, {0xd32dbb?, 0x521585?}, 0xe692f0)
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1494 +0x37a
testing.runTests.func1(0xc000227ba0?)
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1846 +0x6e
testing.tRunner(0xc000227ba0, 0xc00018bc80)
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1446 +0x10b
testing.runTests(0xc00021d7c0?, {0x13f3e40, 0x3, 0x3}, {0xd33883?, 0xf?, 0x14060e0?})
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1844 +0x456
testing.(*M).Run(0xc00021d7c0)
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1726 +0x5d9
golang.org/x/tools/internal/lsp/cmd_test.TestMain(0xffffffffffffffff?)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/cmd_test.go:20 +0x2f
main.main()
	_testmain.go:55 +0x1d3

goroutine 165 [chan receive, 9 minutes]:
testing.(*T).Run(0xc00049e4e0, {0xd1aa66?, 0xc00029ee10?}, 0xc000517e30)
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1494 +0x37a
golang.org/x/tools/internal/lsp/tests.RunTests(0xc00049e4e0, {0xd2403d, 0xb}, 0x0, 0xc00026e3b0)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/tests/tests.go:290 +0x21c
golang.org/x/tools/internal/lsp/cmd/test.TestCommandLine(0xc00049e4e0, {0xd2403d, 0xb}, 0xe694a8)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/test/cmdtest.go:43 +0xde
golang.org/x/tools/internal/lsp/cmd_test.TestCommandLine(0xc000163a40?)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/cmd_test.go:24 +0x2c
testing.tRunner(0xc00049e4e0, 0xe692f0)
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1446 +0x10b
created by testing.(*T).Run
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1493 +0x35f

goroutine 166 [chan receive, 9 minutes]:
testing.(*T).Run(0xc00049e680, {0xd35b1b?, 0xc000666000?}, 0xc0039cf180)
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1494 +0x37a
golang.org/x/tools/internal/lsp/tests.Run(0xc00049e680, {0xf662c0?, 0xc00033e870}, 0xc000005680)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/tests/tests.go:852 +0x1052
golang.org/x/tools/internal/lsp/cmd/test.TestCommandLine.func1(0xc00049e680?, 0xc000005680)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/test/cmdtest.go:46 +0x17e
golang.org/x/tools/internal/lsp/tests.RunTests.func1(0xc00049e680)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/tests/tests.go:297 +0xd1
testing.tRunner(0xc00049e680, 0xc000517e30)
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1446 +0x10b
created by testing.(*T).Run
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1493 +0x35f

goroutine 175 [IO wait, 9 minutes]:
internal/poll.runtime_pollWait(0x7fa1a9256a98, 0x72)
	/tmp/workdir-host-linux-amd64-wsl/go/src/runtime/netpoll.go:305 +0x89
internal/poll.(*pollDesc).wait(0xc0000a2200?, 0xc000756000?, 0x0)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0000a2200, {0xc000756000, 0x1000, 0x1000})
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc0000a2200, {0xc000756000?, 0x8?, 0xc000154060?})
	/tmp/workdir-host-linux-amd64-wsl/go/src/net/fd_posix.go:55 +0x29
net.(*conn).Read(0xc000014008, {0xc000756000?, 0x203000?, 0x203000?})
	/tmp/workdir-host-linux-amd64-wsl/go/src/net/net.go:183 +0x45
bufio.(*Reader).fill(0xc000752060)
	/tmp/workdir-host-linux-amd64-wsl/go/src/bufio/bufio.go:106 +0xff
bufio.(*Reader).ReadSlice(0xc000752060, 0x32?)
	/tmp/workdir-host-linux-amd64-wsl/go/src/bufio/bufio.go:372 +0x2f
bufio.(*Reader).collectFragments(0x30?, 0x0?)
	/tmp/workdir-host-linux-amd64-wsl/go/src/bufio/bufio.go:447 +0x71
bufio.(*Reader).ReadString(0x1ee?, 0x30?)
	/tmp/workdir-host-linux-amd64-wsl/go/src/bufio/bufio.go:495 +0x2b
golang.org/x/tools/internal/jsonrpc2.(*headerStream).Read(0xc000754018, {0xf5e8c0, 0xc0006031a0})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/stream.go:110 +0xb8
golang.org/x/tools/internal/jsonrpc2.(*conn).run(0xc000214050, {0xf5e8c0, 0xc0006031a0}, 0xc000754078)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/conn.go:196 +0xbc
created by golang.org/x/tools/internal/jsonrpc2.(*conn).Go
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/conn.go:189 +0xb0

goroutine 174 [chan receive, 9 minutes]:
golang.org/x/tools/internal/lsp/lsprpc.(*StreamServer).ServeStream(0xc0006409e0, {0xf5e8c0, 0xc0006031a0}, {0xf61480, 0xc000214050})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/lsprpc/lsprpc.go:103 +0x405
golang.org/x/tools/internal/jsonrpc2.Serve.func3()
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:125 +0x10d
created by golang.org/x/tools/internal/jsonrpc2.Serve
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:123 +0x6dd

goroutine 117 [IO wait, 9 minutes]:
internal/poll.runtime_pollWait(0x7fa1a9256c78, 0x72)
	/tmp/workdir-host-linux-amd64-wsl/go/src/runtime/netpoll.go:305 +0x89
internal/poll.(*pollDesc).wait(0xc00043ec80?, 0x6?, 0x0)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc00043ec80)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_unix.go:614 +0x234
net.(*netFD).accept(0xc00043ec80)
	/tmp/workdir-host-linux-amd64-wsl/go/src/net/fd_unix.go:172 +0x35
net.(*TCPListener).accept(0xc000472750)
	/tmp/workdir-host-linux-amd64-wsl/go/src/net/tcpsock_posix.go:142 +0x28
net.(*TCPListener).Accept(0xc000472750)
	/tmp/workdir-host-linux-amd64-wsl/go/src/net/tcpsock.go:288 +0x3d
golang.org/x/tools/internal/jsonrpc2.Serve.func1()
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:75 +0xa4
created by golang.org/x/tools/internal/jsonrpc2.Serve
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:71 +0x18b

goroutine 180 [chan receive]:
golang.org/x/tools/internal/event/export/ocagent.Connect.func1()
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/event/export/ocagent/ocagent.go:97 +0x7c
created by golang.org/x/tools/internal/event/export/ocagent.Connect
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/event/export/ocagent/ocagent.go:96 +0x365

goroutine 181 [select, 9 minutes]:
golang.org/x/tools/internal/jsonrpc2.Serve({0xf5e8c0, 0xc00050ad50}, {0xf5deb8?, 0xc000472750}, {0xf58d40?, 0xc0006409e0}, 0x0)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:111 +0x38c
created by golang.org/x/tools/internal/jsonrpc2/servertest.NewTCPServer
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/servertest/servertest.go:47 +0x145

goroutine 13427 [chan receive, 9 minutes]:
testing.(*T).Run(0xc0081864e0, {0xd21bd8?, 0x0?}, 0xc005300300)
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1494 +0x37a
golang.org/x/tools/internal/lsp/tests.Run.func28(0xc0081864e0)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/tests/tests.go:866 +0x2f0
testing.tRunner(0xc0081864e0, 0xc0039cf180)
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1446 +0x10b
created by testing.(*T).Run
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1493 +0x35f

goroutine 96 [IO wait, 9 minutes]:
internal/poll.runtime_pollWait(0x7fa1a9256048, 0x72)
	/tmp/workdir-host-linux-amd64-wsl/go/src/runtime/netpoll.go:305 +0x89
internal/poll.(*pollDesc).wait(0xc00043ef00?, 0xc0005e8000?, 0x0)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc00043ef00, {0xc0005e8000, 0x1000, 0x1000})
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc00043ef00, {0xc0005e8000?, 0x8?, 0xc000154060?})
	/tmp/workdir-host-linux-amd64-wsl/go/src/net/fd_posix.go:55 +0x29
net.(*conn).Read(0xc000288020, {0xc0005e8000?, 0x203000?, 0x203000?})
	/tmp/workdir-host-linux-amd64-wsl/go/src/net/net.go:183 +0x45
bufio.(*Reader).fill(0xc0005e6000)
	/tmp/workdir-host-linux-amd64-wsl/go/src/bufio/bufio.go:106 +0xff
bufio.(*Reader).ReadSlice(0xc0005e6000, 0x32?)
	/tmp/workdir-host-linux-amd64-wsl/go/src/bufio/bufio.go:372 +0x2f
bufio.(*Reader).collectFragments(0x8?, 0x0?)
	/tmp/workdir-host-linux-amd64-wsl/go/src/bufio/bufio.go:447 +0x71
bufio.(*Reader).ReadString(0x7fa1d1eff301?, 0x30?)
	/tmp/workdir-host-linux-amd64-wsl/go/src/bufio/bufio.go:495 +0x2b
golang.org/x/tools/internal/jsonrpc2.(*headerStream).Read(0xc0005ea000, {0xf5e8c0, 0xc00056eab0})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/stream.go:110 +0xb8
golang.org/x/tools/internal/jsonrpc2.(*conn).run(0xc000036050, {0xf5e8c0, 0xc00056eab0}, 0xc0005ea048)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/conn.go:196 +0xbc
created by golang.org/x/tools/internal/jsonrpc2.(*conn).Go
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/conn.go:189 +0xb0

goroutine 13429 [IO wait, 9 minutes]:
internal/poll.runtime_pollWait(0x7fa1a27d5b58, 0x72)
	/tmp/workdir-host-linux-amd64-wsl/go/src/runtime/netpoll.go:305 +0x89
internal/poll.(*pollDesc).wait(0xc003129320?, 0xc008c24400?, 0x1)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc003129320, {0xc008c24400, 0x200, 0x200})
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_unix.go:167 +0x25a
os.(*File).read(...)
	/tmp/workdir-host-linux-amd64-wsl/go/src/os/file_posix.go:31
os.(*File).Read(0xc00232cf98, {0xc008c24400?, 0x140fda8?, 0xc0095fa700?})
	/tmp/workdir-host-linux-amd64-wsl/go/src/os/file.go:118 +0x5e
bytes.(*Buffer).ReadFrom(0xc005300360, {0xf593e0, 0xc00232cf98})
	/tmp/workdir-host-linux-amd64-wsl/go/src/bytes/buffer.go:202 +0x98
io.copyBuffer({0xf582a0, 0xc005300360}, {0xf593e0, 0xc00232cf98}, {0x0, 0x0, 0x0})
	/tmp/workdir-host-linux-amd64-wsl/go/src/io/io.go:413 +0x14b
io.Copy(...)
	/tmp/workdir-host-linux-amd64-wsl/go/src/io/io.go:386
golang.org/x/tools/internal/lsp/cmd/test.(*runner).runGoplsCmd.func1()
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/test/cmdtest.go:135 +0x45
created by golang.org/x/tools/internal/lsp/cmd/test.(*runner).runGoplsCmd
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/test/cmdtest.go:134 +0x25b

goroutine 13428 [select, 9 minutes]:
golang.org/x/tools/internal/jsonrpc2.(*conn).Call(0xc0026fdf40, {0xf5e8c0, 0xc0053008d0}, {0xd23a14, 0xa}, {0xbe0e40?, 0xc007cfe900?}, {0xbd6540?, 0xc00232d1c8})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/conn.go:138 +0x8fe
golang.org/x/tools/internal/lsp/protocol.clientConn.Call({{0xf61480?, 0xc0026fdf40?}}, {0xf5e8c0, 0xc0053008d0}, {0xd23a14?, 0x8?}, {0xbe0e40?, 0xc007cfe900?}, {0xbd6540, 0xc00232d1c8})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/protocol/protocol.go:64 +0x93
golang.org/x/tools/internal/lsp/protocol.(*serverDispatcher).Initialize(0xc0019de840, {0xf5e8c0, 0xc0053008d0}, 0xd?)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/protocol/tsserver.go:1069 +0x7e
golang.org/x/tools/internal/lsp/cmd.(*connection).initialize(0xc005383218, {0xf5e8c0, 0xc0053008d0}, 0xc0053831e8)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/cmd.go:372 +0x3b6
golang.org/x/tools/internal/lsp/cmd.(*Application).connectRemote(0xc007d437c0, {0xf5eee0, 0xc0019de7d0}, {0xc009dac0b1, 0xf})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/cmd.go:339 +0x4eb
golang.org/x/tools/internal/lsp/cmd.(*Application).connect(0xc007d437c0, {0xf5e8c0, 0xc005300450})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/cmd.go:305 +0x325
golang.org/x/tools/internal/lsp/cmd.(*workspaceSymbol).Run(0xc0053831d0, {0xf5e8c0, 0xc005300450}, {0xc0026fdb70, 0x0?, 0x0?})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/workspace_symbol.go:61 +0x12c
golang.org/x/tools/internal/tool.Run({0xf5e8c0, 0xc005300450}, 0xc0042d4ae0, {0xf5fba0?, 0xc0053831d0}, {0xc0026fdb50, 0x3, 0x3})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/tool/tool.go:168 +0x57f
golang.org/x/tools/internal/lsp/cmd.(*Application).Run(0xc007d437c0, {0xf5e850?, 0xc000136000?}, {0xc0026fdb40?, 0x4, 0x4})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/cmd.go:227 +0x407
golang.org/x/tools/internal/tool.Run({0xf5e850, 0xc000136000}, 0xc003129ec0, {0xf5f460?, 0xc007d437c0}, {0xc0026fdb30, 0x5, 0x5})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/tool/tool.go:168 +0x57f
golang.org/x/tools/internal/lsp/cmd/test.(*runner).runGoplsCmd(0xc00033e870, {0xf646a0, 0xc008186680}, {0xc00007ae60, 0x4, 0xc005300330?})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/test/cmdtest.go:146 +0x5b9
golang.org/x/tools/internal/lsp/cmd/test.(*runner).runWorkspaceSymbols(0xc00033e870, 0xc008186680, {0xc00060caf0, 0x6b}, {0xd3315d, 0xf}, {0x0, 0x0})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/test/workspace_symbol.go:35 +0x13a
golang.org/x/tools/internal/lsp/cmd/test.(*runner).WorkspaceSymbols(0xc008186680?, 0x51b?, {0xc00060caf0?, 0x1298478?}, {0x0?, 0xc000967760?}, 0x521585?)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/test/workspace_symbol.go:29 +0x74
golang.org/x/tools/internal/lsp/tests.Run.func28.1(0xc008186680)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/tests/tests.go:868 +0x90
testing.tRunner(0xc008186680, 0xc005300300)
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1446 +0x10b
created by testing.(*T).Run
	/tmp/workdir-host-linux-amd64-wsl/go/src/testing/testing.go:1493 +0x35f

goroutine 13431 [IO wait, 9 minutes]:
internal/poll.runtime_pollWait(0x7fa1a9256b88, 0x72)
	/tmp/workdir-host-linux-amd64-wsl/go/src/runtime/netpoll.go:305 +0x89
internal/poll.(*pollDesc).wait(0xc0024bd480?, 0xc0064db000?, 0x0)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0024bd480, {0xc0064db000, 0x1000, 0x1000})
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc0024bd480, {0xc0064db000?, 0x0?, 0x0?})
	/tmp/workdir-host-linux-amd64-wsl/go/src/net/fd_posix.go:55 +0x29
net.(*conn).Read(0xc00232d1b0, {0xc0064db000?, 0x0?, 0x0?})
	/tmp/workdir-host-linux-amd64-wsl/go/src/net/net.go:183 +0x45
bufio.(*Reader).fill(0xc0042d5920)
	/tmp/workdir-host-linux-amd64-wsl/go/src/bufio/bufio.go:106 +0xff
bufio.(*Reader).ReadSlice(0xc0042d5920, 0x0?)
	/tmp/workdir-host-linux-amd64-wsl/go/src/bufio/bufio.go:372 +0x2f
bufio.(*Reader).collectFragments(0xc0042d5920?, 0xa?)
	/tmp/workdir-host-linux-amd64-wsl/go/src/bufio/bufio.go:447 +0x71
bufio.(*Reader).ReadString(0xc0076256d8?, 0x60?)
	/tmp/workdir-host-linux-amd64-wsl/go/src/bufio/bufio.go:495 +0x2b
golang.org/x/tools/internal/jsonrpc2.(*headerStream).Read(0xc005383230, {0xf5e8c0, 0xc0053008d0})
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/stream.go:110 +0xb8
golang.org/x/tools/internal/jsonrpc2.(*conn).run(0xc0026fdf40, {0xf5e8c0, 0xc0053008d0}, 0xc005383320)
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/conn.go:196 +0xbc
created by golang.org/x/tools/internal/jsonrpc2.(*conn).Go
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/jsonrpc2/conn.go:189 +0xb0

goroutine 13430 [IO wait, 9 minutes]:
internal/poll.runtime_pollWait(0x7fa1a9256d68, 0x72)
	/tmp/workdir-host-linux-amd64-wsl/go/src/runtime/netpoll.go:305 +0x89
internal/poll.(*pollDesc).wait(0xc003129c20?, 0xc008c24600?, 0x1)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc003129c20, {0xc008c24600, 0x200, 0x200})
	/tmp/workdir-host-linux-amd64-wsl/go/src/internal/poll/fd_unix.go:167 +0x25a
os.(*File).read(...)
	/tmp/workdir-host-linux-amd64-wsl/go/src/os/file_posix.go:31
os.(*File).Read(0xc00232cfa8, {0xc008c24600?, 0xc007614750?, 0xc007614700?})
	/tmp/workdir-host-linux-amd64-wsl/go/src/os/file.go:118 +0x5e
bytes.(*Buffer).ReadFrom(0xc005300390, {0xf593e0, 0xc00232cfa8})
	/tmp/workdir-host-linux-amd64-wsl/go/src/bytes/buffer.go:202 +0x98
io.copyBuffer({0xf582a0, 0xc005300390}, {0xf593e0, 0xc00232cfa8}, {0x0, 0x0, 0x0})
	/tmp/workdir-host-linux-amd64-wsl/go/src/io/io.go:413 +0x14b
io.Copy(...)
	/tmp/workdir-host-linux-amd64-wsl/go/src/io/io.go:386
golang.org/x/tools/internal/lsp/cmd/test.(*runner).runGoplsCmd.func2()
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/test/cmdtest.go:139 +0x45
created by golang.org/x/tools/internal/lsp/cmd/test.(*runner).runGoplsCmd
	/tmp/workdir-host-linux-amd64-wsl/gopath/src/golang.org/x/tools/internal/lsp/cmd/test/cmdtest.go:138 +0x2db
FAIL	golang.org/x/tools/internal/lsp/cmd	600.283s

(CC @adonovan @findleyr)

@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 Sep 6, 2022
@gopherbot gopherbot added this to the Unreleased milestone Sep 6, 2022
@findleyr
Copy link
Contributor

findleyr commented Sep 6, 2022

A lot of these goroutines are expected (waiting for connections to be closed or new incoming connections to accept).

One that sticks out as not expected is golang.org/x/tools/internal/jsonrpc2.(*conn).Call, which is hanging during initialization. There are a number of goroutines trying to read off a connection, and I don't see obvious deadlocks in server code. This may be a bug in jsonrpc2. I also wonder if it could be a net bug?

@findleyr
Copy link
Contributor

findleyr commented Sep 6, 2022

I'll note that unfortunately this is unlikely to get investigated soon, as it appears to be a lower priority than other issues (including other test flakes).

@findleyr findleyr modified the milestones: Unreleased, gopls/later Sep 6, 2022
@mengzhuo
Copy link
Contributor

mengzhuo commented Sep 7, 2022

FYI: Both wsl builders are under a firewall and reqiures proxy to connect to the Internet.

@findleyr
Copy link
Contributor

findleyr commented Sep 7, 2022

Thanks @mengzhuo, that's good to know. In this case the connection is over localhost, so I don't think it would be affected by the firewall (and this is a rare flake).

@findleyr
Copy link
Contributor

We've rewritten so much since this was opened, that I expect this issue is now obsolete. Closing.

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

4 participants