Closed keegancsmith closed 6 years ago
I realised that go test probably has a child. So I actually need to sigabrt the actual test process. Maybe I am overengineering and should just try out the timeout flag.
Ok, so it seems to be a deadlock in the update diagnostics test.
=== RUN TestIntegration_FileSystem_Diagnostics
panic: test timed out after 5m0s
goroutine 109 [running]:
testing.(*M).startAlarm.func1()
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:1240 +0x146
created by time.goFunc
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/time/sleep.go:172 +0x52
goroutine 1 [chan receive, 4 minutes]:
testing.(*T).Run(0xc4202a4000, 0xdf37e3, 0x26, 0xe06a70, 0xc4200f3c01)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:825 +0x597
testing.runTests.func1(0xc4202a4000)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:1063 +0xa5
testing.tRunner(0xc4202a4000, 0xc4200f3db0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:777 +0x16e
testing.runTests(0xc42000dd00, 0x1241de0, 0x11, 0x11, 0xc420270280)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:1061 +0x4e2
testing.(*M).Run(0xc420270280, 0x0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:978 +0x2ce
main.main()
_testmain.go:76 +0x22b
goroutine 94 [IO wait, 4 minutes]:
internal/poll.runtime_pollWait(0x7fee66b42f00, 0x72, 0xc42005ec98)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/netpoll.go:173 +0x5e
internal/poll.(*pollDesc).wait(0xc420270018, 0x72, 0xc4201b6100, 0x0, 0x0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/internal/poll/fd_poll_runtime.go:85 +0xe5
internal/poll.(*pollDesc).waitRead(0xc420270018, 0xffffffffffffff00, 0x0, 0x0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/internal/poll/fd_poll_runtime.go:90 +0x4b
internal/poll.(*FD).Accept(0xc420270000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/internal/poll/fd_unix.go:372 +0x2e2
net.(*netFD).accept(0xc420270000, 0xc42005ee58, 0xc42005ee60, 0x18)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/net/fd_unix.go:238 +0x53
net.(*TCPListener).accept(0xc42000e050, 0xea2580, 0xc4200a8050, 0x0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/net/tcpsock_posix.go:136 +0x4e
net.(*TCPListener).Accept(0xc42000e050, 0xc4200a8050, 0xea07c0, 0xc4203780c0, 0xe9af40)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/net/tcpsock.go:259 +0x50
github.com/sourcegraph/go-langserver/langserver.serve(0xea2580, 0xc4200a8050, 0xea14c0, 0xc42000e050, 0xe9af40, 0xc42042c100, 0x0, 0x0, 0x0, 0x56bfec, ...)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/langserver_test.go:1277 +0xfb
github.com/sourcegraph/go-langserver/langserver.startServer.func1(0xea14c0, 0xc42000e050, 0xe9af40, 0xc42042c100, 0xea79a0, 0xc4202ac000)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/langserver_test.go:1264 +0xa6
created by github.com/sourcegraph/go-langserver/langserver.startServer
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/langserver_test.go:1263 +0x1e3
goroutine 3 [chan receive, 4 minutes]:
github.com/sourcegraph/go-langserver/langserver/internal/gocode.new_file_reader.func1(0xc42000e018)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/internal/gocode/utils.go:229 +0x93
created by github.com/sourcegraph/go-langserver/langserver/internal/gocode.new_file_reader
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/internal/gocode/utils.go:226 +0xae
goroutine 93 [select, 4 minutes]:
github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2.(*Conn).Call(0xc420270300, 0xea2580, 0xc4200a8050, 0xdd3ccf, 0x14, 0xd1cb20, 0xc4200a05a0, 0x0, 0x0, 0x0, ...)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2/jsonrpc2.go:426 +0x388
github.com/sourcegraph/go-langserver/langserver.callFn.func1(0xdd3ccf, 0x14, 0xd1cb20, 0xc4200a05a0)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/integration_test.go:393 +0xc2
github.com/sourcegraph/go-langserver/langserver.TestIntegration_FileSystem_Diagnostics.func1(0xea2580, 0xc4200a8050, 0xc420418c00, 0x40, 0xc420270300, 0xc420034360)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/integration_test.go:268 +0xa23
github.com/sourcegraph/go-langserver/langserver.integrationTest(0xc4202ac000, 0xc42033dcf8, 0xc42033dd28, 0xc42033dce0)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/integration_test.go:388 +0xe4a
github.com/sourcegraph/go-langserver/langserver.TestIntegration_FileSystem_Diagnostics(0xc4202ac000)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/integration_test.go:207 +0x384
testing.tRunner(0xc4202ac000, 0xe06a70)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:777 +0x16e
created by testing.(*T).Run
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:824 +0x565
goroutine 96 [chan send, 4 minutes]:
github.com/sourcegraph/go-langserver/langserver.integrationTest.func1(0xea2580, 0xc4200a8050, 0xc420270300, 0xc4204494a0, 0x12b, 0xc4203374a0, 0xc42040d124, 0x438eca)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/integration_test.go:360 +0x56
github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2.(*HandlerWithErrorConfigurer).Handle(0xc42042c130, 0xea2580, 0xc4200a8050, 0xc420270300, 0xc4204494a0)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2/handler_with_error.go:21 +0x98
github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2.(*Conn).readMessages(0xc420270300, 0xea2580, 0xc4200a8050)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2/jsonrpc2.go:511 +0x132
created by github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2.NewConn
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2/jsonrpc2.go:328 +0x213
goroutine 95 [IO wait, 4 minutes]:
internal/poll.runtime_pollWait(0x7fee66b42af0, 0x72, 0x120a648)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/netpoll.go:173 +0x5e
internal/poll.(*pollDesc).wait(0xc420270198, 0x72, 0xe9b500, 0x120a648, 0xffffffffffffffff)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/internal/poll/fd_poll_runtime.go:85 +0xe5
internal/poll.(*pollDesc).waitRead(0xc420270198, 0xc42027b000, 0x1000, 0x1000)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/internal/poll/fd_poll_runtime.go:90 +0x4b
internal/poll.(*FD).Read(0xc420270180, 0xc42027b000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/internal/poll/fd_unix.go:157 +0x22a
net.(*netFD).Read(0xc420270180, 0xc42027b000, 0x1000, 0x1000, 0xc420378080, 0xc420421950, 0x8bd84d)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/net/fd_unix.go:202 +0x66
net.(*conn).Read(0xc42000e070, 0xc42027b000, 0x1000, 0x1000, 0xc4203780f0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/net/net.go:176 +0x85
bufio.(*Reader).fill(0xc4203b2000)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/bufio/bufio.go:100 +0x1a0
bufio.(*Reader).ReadSlice(0xc4203b2000, 0x7fee66c4e00d, 0x0, 0x0, 0x4, 0x40, 0x0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/bufio/bufio.go:341 +0x4b
bufio.(*Reader).ReadBytes(0xc4203b2000, 0xc420378d0d, 0x0, 0x0, 0x0, 0x0, 0xc4203cf108)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/bufio/bufio.go:419 +0x83
bufio.(*Reader).ReadString(0xc4203b2000, 0xcf8d0d, 0xc42042c610, 0x465b54, 0x4159b0, 0x0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/bufio/bufio.go:459 +0x46
github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2.VSCodeObjectCodec.ReadObject(0xc4203b2000, 0xcf8d00, 0xc42042c680, 0xc420055000, 0xc4203ccaf0)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2/stream.go:136 +0x5d
github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2.(*bufferedObjectStream).ReadObject(0xc4203780c0, 0xcf8d00, 0xc42042c680, 0xc420270200, 0xc4203ccaf0)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2/stream.go:63 +0x87
github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2.(*Conn).readMessages(0xc420270200, 0xea2580, 0xc4200a8050)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2/jsonrpc2.go:501 +0x1df
created by github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2.NewConn
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/vendor/github.com/sourcegraph/jsonrpc2/jsonrpc2.go:328 +0x213
goroutine 114 [chan receive, 4 minutes]:
github.com/sourcegraph/go-langserver/langserver.(*HandlerCommon).InitTracer.func1(0xc420270200, 0xc42042c1c0)
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/tracing.go:37 +0x5c
created by github.com/sourcegraph/go-langserver/langserver.(*HandlerCommon).InitTracer
/home/travis/gopath/src/github.com/sourcegraph/go-langserver/langserver/tracing.go:36 +0x41e
FAIL github.com/sourcegraph/go-langserver/langserver 300.444s
interesting that this fixes the deadlock. I had clearly some problems with a buffered channel... I will try it on my machine later.
Sweet, reproduced on the first try. Looks like a deadlock in the go runtime, which is rather strange. Might be something unique to the travis CI environment.