Skip to content

Instantly share code, notes, and snippets.

@felixge felixge/deadlock.txt Secret
Created Oct 23, 2017

Embed
What would you like to do?
$ ./deadlock-test -url 'http://www.google.com/'
go1.9.1
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [select]:
net/http.(*persistConn).roundTrip(0xc042088d80, 0xc04207aa80, 0x0, 0x0, 0x0)
/usr/local/go19/src/net/http/transport.go:1970 +0x60f
net/http.(*Transport).RoundTrip(0x79cc60, 0xc0420f2200, 0x79cc60, 0x0, 0x0)
/usr/local/go19/src/net/http/transport.go:413 +0x999
net/http.send(0xc0420f2100, 0x76b960, 0x79cc60, 0x0, 0x0, 0x0, 0xc042066040, 0x100, 0xc042063bc8, 0x1)
/usr/local/go19/src/net/http/client.go:249 +0x1b0
net/http.(*Client).send(0x7a0700, 0xc0420f2100, 0x0, 0x0, 0x0, 0xc042066040, 0x0, 0x1, 0xc042063c50)
/usr/local/go19/src/net/http/client.go:173 +0x104
net/http.(*Client).Do(0x7a0700, 0xc0420f2100, 0xc042064030, 0x29, 0x0)
/usr/local/go19/src/net/http/client.go:602 +0x294
net/http.(*Client).Get(0x7a0700, 0xc042064030, 0x29, 0x8, 0x0, 0x0)
/usr/local/go19/src/net/http/client.go:393 +0xae
net/http.Get(0xc042064030, 0x29, 0xc042063eb8, 0x1, 0x1)
/usr/local/go19/src/net/http/client.go:367 +0x48
main.run(0x0, 0x0)
/go/src/deadlock-test/main.go:27 +0x147
main.main()
/go/src/deadlock-test/main.go:13 +0x2d
goroutine 4 [IO wait]:
internal/poll.runtime_pollWait(0xae4fa8, 0x72, 0x0)
/usr/local/go19/src/runtime/netpoll.go:173 +0x5e
internal/poll.(*pollDesc).wait(0xc042084c98, 0x72, 0x76a200, 0x0, 0x0)
/usr/local/go19/src/internal/poll/fd_poll_runtime.go:85 +0xb5
internal/poll.(*ioSrv).ExecIO(0x79eea0, 0xc042084b58, 0x671bd8, 0x0, 0x0, 0x0)
/usr/local/go19/src/internal/poll/fd_windows.go:195 +0x13a
internal/poll.(*FD).Read(0xc042084b40, 0xc042106000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go19/src/internal/poll/fd_windows.go:439 +0x266
net.(*netFD).Read(0xc042084b40, 0xc042106000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go19/src/net/fd_windows.go:151 +0x59
net.(*conn).Read(0xc042004010, 0xc042106000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go19/src/net/net.go:176 +0x74
net/http.(*persistConn).Read(0xc042088d80, 0xc042106000, 0x1000, 0x1000, 0x0, 0x0, 0xc0420fbb68)
/usr/local/go19/src/net/http/transport.go:1391 +0x147
bufio.(*Reader).fill(0xc042038060)
/usr/local/go19/src/bufio/bufio.go:97 +0x121
bufio.(*Reader).Peek(0xc042038060, 0x1, 0xc04210c0c0, 0xc0420fbc80, 0x0, 0x0, 0x0)
/usr/local/go19/src/bufio/bufio.go:129 +0x41
net/http.(*persistConn).readLoop(0xc042088d80)
/usr/local/go19/src/net/http/transport.go:1539 +0x18c
created by net/http.(*Transport).dialConn
/usr/local/go19/src/net/http/transport.go:1186 +0xa35
goroutine 5 [select]:
net/http.(*persistConn).writeLoop(0xc042088d80)
/usr/local/go19/src/net/http/transport.go:1759 +0x16c
created by net/http.(*Transport).dialConn
/usr/local/go19/src/net/http/transport.go:1187 +0xa5a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.