{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/12339","labels_url":"https://api.github.com/repos/golang/go/issues/12339/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/12339/comments","events_url":"https://api.github.com/repos/golang/go/issues/12339/events","html_url":"https://github.com/golang/go/issues/12339","id":103208550,"number":12339,"title":"net/http: panic: runtime error: slice bounds out of range","user":{"login":"sebcat","id":2697829,"avatar_url":"https://avatars.githubusercontent.com/u/2697829?v=3","gravatar_id":"","url":"https://api.github.com/users/sebcat","html_url":"https://github.com/sebcat","followers_url":"https://api.github.com/users/sebcat/followers","following_url":"https://api.github.com/users/sebcat/following{/other_user}","gists_url":"https://api.github.com/users/sebcat/gists{/gist_id}","starred_url":"https://api.github.com/users/sebcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebcat/subscriptions","organizations_url":"https://api.github.com/users/sebcat/orgs","repos_url":"https://api.github.com/users/sebcat/repos","events_url":"https://api.github.com/users/sebcat/events{/privacy}","received_events_url":"https://api.github.com/users/sebcat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-26T08:34:08Z","updated_at":"2015-08-26T10:05:09Z","closed_at":null,"body":"Hello,\r\n\r\nI experience a panic intermittently when using a Transport concurrently against certain URLs. It happens when I read the response body using an io.LimitedReader with ioutil.ReadAll.\r\n\r\nI've isolated the problem from a larger application and I would like to share the code for issue reproduction privately, as I am only able to reproduce it for certain URLs and I don't want those URLs in the issue tracker.\r\n\r\nI've tested the example with go 1.4.2 and go 1.5 on a couple of different machines. If I run the example locally, I may have to run it a few times before experiencing a panic. If I run the example on a remote machine with different network/hardware/linux distribution that I have access to, it occurs 100% of the time. I don't know why.\r\n\r\nComplete stack trace:\r\n```\r\npanic: runtime error: slice bounds out of range [recovered]\r\n\tpanic: runtime error: slice bounds out of range\r\n\r\ngoroutine 8 [running]:\r\nio/ioutil.readAll.func1(0xc820040db0)\r\n\t/home/sebastian/go/src/io/ioutil/ioutil.go:30 +0x11e\r\nbufio.(*Reader).ReadSlice(0xc820021c20, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bufio/bufio.go:306 +0x229\r\nnet/http/internal.readLine(0xc820021c20, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/internal/chunked.go:110 +0x4b\r\nnet/http/internal.(*chunkedReader).beginChunk(0xc82028e210)\r\n\t/home/sebastian/go/src/net/http/internal/chunked.go:47 +0x39\r\nnet/http/internal.(*chunkedReader).Read(0xc82028e210, 0xc8201f8600, 0x200, 0x200, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/internal/chunked.go:77 +0xb7\r\nnet/http.(*body).readLocked(0xc8200a9600, 0xc8201f8600, 0x200, 0x200, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transfer.go:632 +0x98\r\nnet/http.(*body).Read(0xc8200a9600, 0xc8201f8600, 0x200, 0x200, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transfer.go:624 +0x110\r\nnet/http.(*bodyEOFSignal).Read(0xc8200a9640, 0xc8201f8600, 0x200, 0x200, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1296 +0x26a\r\nio.(*LimitedReader).Read(0xc820221280, 0xc8201f8600, 0x200, 0x200, 0x200, 0x0, 0x0)\r\n\t/home/sebastian/go/src/io/io.go:427 +0xbd\r\nbytes.(*Buffer).ReadFrom(0xc820040d08, 0x7f9bbcb26b68, 0xc820221280, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bytes/buffer.go:173 +0x23f\r\nio/ioutil.readAll(0x7f9bbcb26b68, 0xc820221280, 0x200, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/io/ioutil/ioutil.go:33 +0x154\r\nio/ioutil.ReadAll(0x7f9bbcb26b68, 0xc820221280, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/io/ioutil/ioutil.go:42 +0x51\r\nmain.main.func1(0xc820020120, 0xc82001c1b0, 0xc82000ad40)\r\n\t/home/sebastian/urls.go:75 +0x4d1\r\ncreated by main.main\r\n\t/home/sebastian/urls.go:83 +0x1ff\r\n\r\ngoroutine 1 [chan send]:\r\nmain.main()\r\n\t/home/sebastian/urls.go:87 +0x2c3\r\n\r\ngoroutine 17 [syscall, locked to thread]:\r\nruntime.goexit()\r\n\t/home/sebastian/go/src/runtime/asm_amd64.s:1696 +0x1\r\n\r\ngoroutine 5 [select]:\r\nnet/http.(*persistConn).roundTrip(0xc820118840, 0xc820335290, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1164 +0xb0d\r\nnet/http.(*Transport).RoundTrip(0xc82001c1b0, 0xc8200ad500, 0x737ef0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:235 +0x530\r\nmain.main.func1(0xc820020120, 0xc82001c1b0, 0xc82000ad40)\r\n\t/home/sebastian/urls.go:66 +0x1e2\r\ncreated by main.main\r\n\t/home/sebastian/urls.go:83 +0x1ff\r\n\r\ngoroutine 6 [select]:\r\nnet/http.(*persistConn).roundTrip(0xc8200b0000, 0xc8200d0080, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1164 +0xb0d\r\nnet/http.(*Transport).RoundTrip(0xc82001c1b0, 0xc8200ce0e0, 0x737f30, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:235 +0x530\r\nmain.main.func1(0xc820020120, 0xc82001c1b0, 0xc82000ad40)\r\n\t/home/sebastian/urls.go:66 +0x1e2\r\ncreated by main.main\r\n\t/home/sebastian/urls.go:83 +0x1ff\r\n\r\ngoroutine 7 [select]:\r\nnet/http.(*persistConn).roundTrip(0xc8200de000, 0xc8202e4190, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1164 +0xb0d\r\nnet/http.(*Transport).RoundTrip(0xc82001c1b0, 0xc82010e7e0, 0x7431e0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:235 +0x530\r\nmain.main.func1(0xc820020120, 0xc82001c1b0, 0xc82000ad40)\r\n\t/home/sebastian/urls.go:66 +0x1e2\r\ncreated by main.main\r\n\t/home/sebastian/urls.go:83 +0x1ff\r\n\r\ngoroutine 9 [select]:\r\nnet/http.(*persistConn).roundTrip(0xc8200de210, 0xc8200cc140, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1164 +0xb0d\r\nnet/http.(*Transport).RoundTrip(0xc82001c1b0, 0xc8200c8380, 0x743240, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:235 +0x530\r\nmain.main.func1(0xc820020120, 0xc82001c1b0, 0xc82000ad40)\r\n\t/home/sebastian/urls.go:66 +0x1e2\r\ncreated by main.main\r\n\t/home/sebastian/urls.go:83 +0x1ff\r\n\r\ngoroutine 10 [select]:\r\nnet/http.(*persistConn).roundTrip(0xc8200de160, 0xc8202683b0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1164 +0xb0d\r\nnet/http.(*Transport).RoundTrip(0xc82001c1b0, 0xc8200acfc0, 0x759440, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:235 +0x530\r\nmain.main.func1(0xc820020120, 0xc82001c1b0, 0xc82000ad40)\r\n\t/home/sebastian/urls.go:66 +0x1e2\r\ncreated by main.main\r\n\t/home/sebastian/urls.go:83 +0x1ff\r\n\r\ngoroutine 11 [runnable]:\r\nsyscall.Syscall(0x0, 0x4, 0xc82015ab68, 0x1498, 0x1498, 0x1498, 0x0)\r\n\t/home/sebastian/go/src/syscall/asm_linux_amd64.s:18 +0x5\r\nsyscall.read(0x4, 0xc82015ab68, 0x1498, 0x1498, 0x72, 0x0, 0x0)\r\n\t/home/sebastian/go/src/syscall/zsyscall_linux_amd64.go:783 +0x5f\r\nsyscall.Read(0x4, 0xc82015ab68, 0x1498, 0x1498, 0xffffffffffffff01, 0x0, 0x0)\r\n\t/home/sebastian/go/src/syscall/syscall_unix.go:160 +0x4d\r\nnet.(*netFD).Read(0xc8200180e0, 0xc82015ab68, 0x1498, 0x1498, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_unix.go:228 +0x18b\r\nnet.(*conn).Read(0xc820120000, 0xc82015ab68, 0x1498, 0x1498, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/net.go:172 +0xe4\r\ncrypto/tls.(*block).readFromUntil(0xc8200ca3c0, 0x7f9bb9a6bfc0, 0xc820120000, 0x1f5d, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:455 +0xcc\r\ncrypto/tls.(*Conn).readRecord(0xc820124000, 0x77fa17, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:583 +0xccf\r\ncrypto/tls.(*Conn).Read(0xc820124000, 0xc82040998f, 0x2191, 0x2471, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:901 +0x167\r\nnet/http.noteEOFReader.Read(0x7f9bb9a2b090, 0xc820124000, 0xc8200dc268, 0xc82040998f, 0x2191, 0x2471, 0x1f40, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1370 +0x67\r\nnet/http.(*noteEOFReader).Read(0xc8200da460, 0xc82040998f, 0x2191, 0x2471, 0x1f40, 0x0, 0x0)\r\n\t<autogenerated>:126 +0xd0\r\nbufio.(*Reader).Read(0xc8200d2e40, 0xc82040998f, 0x2191, 0x2471, 0x1f40, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bufio/bufio.go:197 +0x126\r\nio.(*LimitedReader).Read(0xc82033a860, 0xc82040998f, 0x2191, 0x2471, 0xc820151a88, 0x0, 0x0)\r\n\t/home/sebastian/go/src/io/io.go:427 +0xbd\r\nnet/http.(*body).readLocked(0xc82025b240, 0xc82040998f, 0x2471, 0x2471, 0xc800000000, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transfer.go:632 +0x98\r\nnet/http.(*body).Read(0xc82025b240, 0xc82040998f, 0x2471, 0x2471, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transfer.go:624 +0x110\r\nnet/http.(*bodyEOFSignal).Read(0xc82025b280, 0xc82040998f, 0x2471, 0x2471, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1296 +0x26a\r\nio.(*LimitedReader).Read(0xc82033a8c0, 0xc82040998f, 0x2471, 0x2471, 0x1f40, 0x0, 0x0)\r\n\t/home/sebastian/go/src/io/io.go:427 +0xbd\r\nbytes.(*Buffer).ReadFrom(0xc820151cf8, 0x7f9bbcb26b68, 0xc82033a8c0, 0xd98f, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bytes/buffer.go:173 +0x23f\r\nio/ioutil.readAll(0x7f9bbcb26b68, 0xc82033a8c0, 0x200, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/io/ioutil/ioutil.go:33 +0x154\r\nio/ioutil.ReadAll(0x7f9bbcb26b68, 0xc82033a8c0, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/io/ioutil/ioutil.go:42 +0x51\r\nmain.main.func1(0xc820020120, 0xc82001c1b0, 0xc82000ad40)\r\n\t/home/sebastian/urls.go:75 +0x4d1\r\ncreated by main.main\r\n\t/home/sebastian/urls.go:83 +0x1ff\r\n\r\ngoroutine 12 [select]:\r\nnet/http.(*persistConn).roundTrip(0xc8200b13f0, 0xc8203351d0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1164 +0xb0d\r\nnet/http.(*Transport).RoundTrip(0xc82001c1b0, 0xc8200ad420, 0x737ed0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:235 +0x530\r\nmain.main.func1(0xc820020120, 0xc82001c1b0, 0xc82000ad40)\r\n\t/home/sebastian/urls.go:66 +0x1e2\r\ncreated by main.main\r\n\t/home/sebastian/urls.go:83 +0x1ff\r\n\r\ngoroutine 13 [select]:\r\nnet/http.(*persistConn).roundTrip(0xc8200b14a0, 0xc8202e4b40, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1164 +0xb0d\r\nnet/http.(*Transport).RoundTrip(0xc82001c1b0, 0xc82010e9a0, 0x743180, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:235 +0x530\r\nmain.main.func1(0xc820020120, 0xc82001c1b0, 0xc82000ad40)\r\n\t/home/sebastian/urls.go:66 +0x1e2\r\ncreated by main.main\r\n\t/home/sebastian/urls.go:83 +0x1ff\r\n\r\ngoroutine 14 [runnable]:\r\nio.(*LimitedReader).Read(0xc820281360, 0xc82041be00, 0x10000, 0x10000, 0x4b7, 0x0, 0x0)\r\n\t/home/sebastian/go/src/io/io.go:420\r\nbytes.(*Buffer).ReadFrom(0xc820055cf8, 0x7f9bbcb26b68, 0xc820281360, 0xfe00, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bytes/buffer.go:173 +0x23f\r\nio/ioutil.readAll(0x7f9bbcb26b68, 0xc820281360, 0x200, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/io/ioutil/ioutil.go:33 +0x154\r\nio/ioutil.ReadAll(0x7f9bbcb26b68, 0xc820281360, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/io/ioutil/ioutil.go:42 +0x51\r\nmain.main.func1(0xc820020120, 0xc82001c1b0, 0xc82000ad40)\r\n\t/home/sebastian/urls.go:75 +0x4d1\r\ncreated by main.main\r\n\t/home/sebastian/urls.go:83 +0x1ff\r\n\r\ngoroutine 43 [IO wait]:\r\nnet.runtime_pollWait(0x7f9bb9a6bf00, 0x72, 0xc82000a270)\r\n\t/home/sebastian/go/src/runtime/netpoll.go:157 +0x60\r\nnet.(*pollDesc).Wait(0xc82011c060, 0x72, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:73 +0x3a\r\nnet.(*pollDesc).WaitRead(0xc82011c060, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:78 +0x36\r\nnet.(*netFD).Read(0xc82011c000, 0xc8202f4000, 0x2000, 0x2000, 0x0, 0x7f9bbcb22168, 0xc82000a270)\r\n\t/home/sebastian/go/src/net/fd_unix.go:232 +0x23a\r\nnet.(*conn).Read(0xc820132000, 0xc8202f4000, 0x2000, 0x2000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/net.go:172 +0xe4\r\ncrypto/tls.(*block).readFromUntil(0xc82028e4e0, 0x7f9bb9a6bfc0, 0xc820132000, 0x5, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:455 +0xcc\r\ncrypto/tls.(*Conn).readRecord(0xc820138000, 0x77fa17, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:540 +0x2d1\r\ncrypto/tls.(*Conn).Read(0xc820138000, 0xc8201ac000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:901 +0x167\r\nnet/http.noteEOFReader.Read(0x7f9bb9a2b090, 0xc820138000, 0xc8200de1b8, 0xc8201ac000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1370 +0x67\r\nnet/http.(*noteEOFReader).Read(0xc8200da580, 0xc8201ac000, 0x1000, 0x1000, 0xc82021fef0, 0x0, 0x0)\r\n\t<autogenerated>:126 +0xd0\r\nbufio.(*Reader).fill(0xc8200d3080)\r\n\t/home/sebastian/go/src/bufio/bufio.go:97 +0x1e9\r\nbufio.(*Reader).Peek(0xc8200d3080, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bufio/bufio.go:132 +0xcc\r\nnet/http.(*persistConn).readLoop(0xc8200de160)\r\n\t/home/sebastian/go/src/net/http/transport.go:876 +0xf7\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:685 +0xc78\r\n\r\ngoroutine 23 [select]:\r\nnet/http.(*persistConn).readLoop(0xc8200de0b0)\r\n\t/home/sebastian/go/src/net/http/transport.go:976 +0xac7\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:685 +0xc78\r\n\r\ngoroutine 26 [select]:\r\nnet/http.(*persistConn).writeLoop(0xc8200de000)\r\n\t/home/sebastian/go/src/net/http/transport.go:1009 +0x40c\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:686 +0xc9d\r\n\r\ngoroutine 44 [select]:\r\nnet/http.(*persistConn).writeLoop(0xc8200de160)\r\n\t/home/sebastian/go/src/net/http/transport.go:1009 +0x40c\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:686 +0xc9d\r\n\r\ngoroutine 87 [select]:\r\nnet/http.(*persistConn).writeLoop(0xc8200b0fd0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1009 +0x40c\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:686 +0xc9d\r\n\r\ngoroutine 48 [select]:\r\nnet/http.(*persistConn).writeLoop(0xc8200de210)\r\n\t/home/sebastian/go/src/net/http/transport.go:1009 +0x40c\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:686 +0xc9d\r\n\r\ngoroutine 41 [select]:\r\nnet/http.(*persistConn).readLoop(0xc8200dc210)\r\n\t/home/sebastian/go/src/net/http/transport.go:976 +0xac7\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:685 +0xc78\r\n\r\ngoroutine 70 [IO wait]:\r\nnet.runtime_pollWait(0x7f9bb9a6bb40, 0x72, 0xc82000a270)\r\n\t/home/sebastian/go/src/runtime/netpoll.go:157 +0x60\r\nnet.(*pollDesc).Wait(0xc82011e0d0, 0x72, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:73 +0x3a\r\nnet.(*pollDesc).WaitRead(0xc82011e0d0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:78 +0x36\r\nnet.(*netFD).Read(0xc82011e070, 0xc8201e8000, 0x2000, 0x2000, 0x0, 0x7f9bbcb22168, 0xc82000a270)\r\n\t/home/sebastian/go/src/net/fd_unix.go:232 +0x23a\r\nnet.(*conn).Read(0xc820134000, 0xc8201e8000, 0x2000, 0x2000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/net.go:172 +0xe4\r\ncrypto/tls.(*block).readFromUntil(0xc8200c63c0, 0x7f9bb9a6bfc0, 0xc820134000, 0x5, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:455 +0xcc\r\ncrypto/tls.(*Conn).readRecord(0xc820140000, 0x77fa17, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:540 +0x2d1\r\ncrypto/tls.(*Conn).Read(0xc820140000, 0xc8201bb000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:901 +0x167\r\nnet/http.noteEOFReader.Read(0x7f9bb9a2b090, 0xc820140000, 0xc8200b0058, 0xc8201bb000, 0x1000, 0x1000, 0x36300000000, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1370 +0x67\r\nnet/http.(*noteEOFReader).Read(0xc8201d3a60, 0xc8201bb000, 0x1000, 0x1000, 0x7f9bb9a2b110, 0x0, 0x0)\r\n\t<autogenerated>:126 +0xd0\r\nbufio.(*Reader).fill(0xc820112d80)\r\n\t/home/sebastian/go/src/bufio/bufio.go:97 +0x1e9\r\nbufio.(*Reader).Peek(0xc820112d80, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bufio/bufio.go:132 +0xcc\r\nnet/http.(*persistConn).readLoop(0xc8200b0000)\r\n\t/home/sebastian/go/src/net/http/transport.go:876 +0xf7\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:685 +0xc78\r\n\r\ngoroutine 84 [IO wait]:\r\nnet.runtime_pollWait(0x7f9bb9a6b900, 0x72, 0xc82000a270)\r\n\t/home/sebastian/go/src/runtime/netpoll.go:157 +0x60\r\nnet.(*pollDesc).Wait(0xc82011a140, 0x72, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:73 +0x3a\r\nnet.(*pollDesc).WaitRead(0xc82011a140, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:78 +0x36\r\nnet.(*netFD).Read(0xc82011a0e0, 0xc82026e000, 0x2000, 0x2000, 0x0, 0x7f9bbcb22168, 0xc82000a270)\r\n\t/home/sebastian/go/src/net/fd_unix.go:232 +0x23a\r\nnet.(*conn).Read(0xc820132008, 0xc82026e000, 0x2000, 0x2000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/net.go:172 +0xe4\r\ncrypto/tls.(*block).readFromUntil(0xc82010c330, 0x7f9bb9a6bfc0, 0xc820132008, 0x5, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:455 +0xcc\r\ncrypto/tls.(*Conn).readRecord(0xc8201382c0, 0x77fa17, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:540 +0x2d1\r\ncrypto/tls.(*Conn).Read(0xc8201382c0, 0xc820235000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:901 +0x167\r\nnet/http.noteEOFReader.Read(0x7f9bb9a2b090, 0xc8201382c0, 0xc8200dc108, 0xc820235000, 0x1000, 0x1000, 0xc82028c180, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1370 +0x67\r\nnet/http.(*noteEOFReader).Read(0xc820294080, 0xc820235000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t<autogenerated>:126 +0xd0\r\nbufio.(*Reader).fill(0xc820290120)\r\n\t/home/sebastian/go/src/bufio/bufio.go:97 +0x1e9\r\nbufio.(*Reader).Peek(0xc820290120, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bufio/bufio.go:132 +0xcc\r\nnet/http.(*persistConn).readLoop(0xc8200dc0b0)\r\n\t/home/sebastian/go/src/net/http/transport.go:876 +0xf7\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:685 +0xc78\r\n\r\ngoroutine 62 [select]:\r\nnet/http.(*persistConn).writeLoop(0xc8200b14a0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1009 +0x40c\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:686 +0xc9d\r\n\r\ngoroutine 25 [IO wait]:\r\nnet.runtime_pollWait(0x7f9bb9a6ba80, 0x72, 0xc82000a270)\r\n\t/home/sebastian/go/src/runtime/netpoll.go:157 +0x60\r\nnet.(*pollDesc).Wait(0xc82011c0d0, 0x72, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:73 +0x3a\r\nnet.(*pollDesc).WaitRead(0xc82011c0d0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:78 +0x36\r\nnet.(*netFD).Read(0xc82011c070, 0xc82022c000, 0x2000, 0x2000, 0x0, 0x7f9bbcb22168, 0xc82000a270)\r\n\t/home/sebastian/go/src/net/fd_unix.go:232 +0x23a\r\nnet.(*conn).Read(0xc820132010, 0xc82022c000, 0x2000, 0x2000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/net.go:172 +0xe4\r\ncrypto/tls.(*block).readFromUntil(0xc82010c3f0, 0x7f9bb9a6bfc0, 0xc820132010, 0x5, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:455 +0xcc\r\ncrypto/tls.(*Conn).readRecord(0xc820138580, 0x77fa17, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:540 +0x2d1\r\ncrypto/tls.(*Conn).Read(0xc820138580, 0xc820255000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:901 +0x167\r\nnet/http.noteEOFReader.Read(0x7f9bb9a2b090, 0xc820138580, 0xc8200de058, 0xc820255000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1370 +0x67\r\nnet/http.(*noteEOFReader).Read(0xc82025ed40, 0xc820255000, 0x1000, 0x1000, 0xc82021fef0, 0x0, 0x0)\r\n\t<autogenerated>:126 +0xd0\r\nbufio.(*Reader).fill(0xc8202604e0)\r\n\t/home/sebastian/go/src/bufio/bufio.go:97 +0x1e9\r\nbufio.(*Reader).Peek(0xc8202604e0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bufio/bufio.go:132 +0xcc\r\nnet/http.(*persistConn).readLoop(0xc8200de000)\r\n\t/home/sebastian/go/src/net/http/transport.go:876 +0xf7\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:685 +0xc78\r\n\r\ngoroutine 47 [IO wait]:\r\nnet.runtime_pollWait(0x7f9bb9a6bc00, 0x72, 0xc82000a270)\r\n\t/home/sebastian/go/src/runtime/netpoll.go:157 +0x60\r\nnet.(*pollDesc).Wait(0xc82011a0d0, 0x72, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:73 +0x3a\r\nnet.(*pollDesc).WaitRead(0xc82011a0d0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:78 +0x36\r\nnet.(*netFD).Read(0xc82011a070, 0xc820210000, 0x2000, 0x2000, 0x0, 0x7f9bbcb22168, 0xc82000a270)\r\n\t/home/sebastian/go/src/net/fd_unix.go:232 +0x23a\r\nnet.(*conn).Read(0xc820134010, 0xc820210000, 0x2000, 0x2000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/net.go:172 +0xe4\r\ncrypto/tls.(*block).readFromUntil(0xc8200c6540, 0x7f9bb9a6bfc0, 0xc820134010, 0x5, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:455 +0xcc\r\ncrypto/tls.(*Conn).readRecord(0xc820140580, 0x77fa17, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:540 +0x2d1\r\ncrypto/tls.(*Conn).Read(0xc820140580, 0xc82022a000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:901 +0x167\r\nnet/http.noteEOFReader.Read(0x7f9bb9a2b090, 0xc820140580, 0xc8200de268, 0xc82022a000, 0x1000, 0x1000, 0xc8200d5bc0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1370 +0x67\r\nnet/http.(*noteEOFReader).Read(0xc8200da740, 0xc82022a000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t<autogenerated>:126 +0xd0\r\nbufio.(*Reader).fill(0xc8200d3560)\r\n\t/home/sebastian/go/src/bufio/bufio.go:97 +0x1e9\r\nbufio.(*Reader).Peek(0xc8200d3560, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bufio/bufio.go:132 +0xcc\r\nnet/http.(*persistConn).readLoop(0xc8200de210)\r\n\t/home/sebastian/go/src/net/http/transport.go:876 +0xf7\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:685 +0xc78\r\n\r\ngoroutine 42 [select]:\r\nnet/http.(*persistConn).writeLoop(0xc8200dc210)\r\n\t/home/sebastian/go/src/net/http/transport.go:1009 +0x40c\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:686 +0xc9d\r\n\r\ngoroutine 24 [select]:\r\nnet/http.(*persistConn).writeLoop(0xc8200de0b0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1009 +0x40c\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:686 +0xc9d\r\n\r\ngoroutine 71 [select]:\r\nnet/http.(*persistConn).writeLoop(0xc8200b0000)\r\n\t/home/sebastian/go/src/net/http/transport.go:1009 +0x40c\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:686 +0xc9d\r\n\r\ngoroutine 58 [IO wait]:\r\nnet.runtime_pollWait(0x7f9bb9a6b9c0, 0x72, 0xc82000a270)\r\n\t/home/sebastian/go/src/runtime/netpoll.go:157 +0x60\r\nnet.(*pollDesc).Wait(0xc82011b640, 0x72, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:73 +0x3a\r\nnet.(*pollDesc).WaitRead(0xc82011b640, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:78 +0x36\r\nnet.(*netFD).Read(0xc82011b5e0, 0xc8203c8000, 0x1000, 0x1000, 0x0, 0x7f9bbcb22168, 0xc82000a270)\r\n\t/home/sebastian/go/src/net/fd_unix.go:232 +0x23a\r\nnet.(*conn).Read(0xc820120008, 0xc8203c8000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/net.go:172 +0xe4\r\nnet/http.noteEOFReader.Read(0x7f9bb9a6bfc0, 0xc820120008, 0xc820118898, 0xc8203c8000, 0x1000, 0x1000, 0xc820113d40, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1370 +0x67\r\nnet/http.(*noteEOFReader).Read(0xc820221320, 0xc8203c8000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t<autogenerated>:126 +0xd0\r\nbufio.(*Reader).fill(0xc82028c300)\r\n\t/home/sebastian/go/src/bufio/bufio.go:97 +0x1e9\r\nbufio.(*Reader).Peek(0xc82028c300, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bufio/bufio.go:132 +0xcc\r\nnet/http.(*persistConn).readLoop(0xc820118840)\r\n\t/home/sebastian/go/src/net/http/transport.go:876 +0xf7\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:685 +0xc78\r\n\r\ngoroutine 91 [select]:\r\nnet/http.(*persistConn).writeLoop(0xc8200b13f0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1009 +0x40c\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:686 +0xc9d\r\n\r\ngoroutine 86 [IO wait]:\r\nnet.runtime_pollWait(0x7f9bb9a6b6c0, 0x72, 0xc82000a270)\r\n\t/home/sebastian/go/src/runtime/netpoll.go:157 +0x60\r\nnet.(*pollDesc).Wait(0xc8202700d0, 0x72, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:73 +0x3a\r\nnet.(*pollDesc).WaitRead(0xc8202700d0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:78 +0x36\r\nnet.(*netFD).Read(0xc820270070, 0xc8202f6000, 0x2000, 0x2000, 0x0, 0x7f9bbcb22168, 0xc82000a270)\r\n\t/home/sebastian/go/src/net/fd_unix.go:232 +0x23a\r\nnet.(*conn).Read(0xc820032080, 0xc8202f6000, 0x2000, 0x2000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/net.go:172 +0xe4\r\ncrypto/tls.(*block).readFromUntil(0xc8201a7650, 0x7f9bb9a6bfc0, 0xc820032080, 0x5, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:455 +0xcc\r\ncrypto/tls.(*Conn).readRecord(0xc8200b2dc0, 0x77fa17, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:540 +0x2d1\r\ncrypto/tls.(*Conn).Read(0xc8200b2dc0, 0xc82031b000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/crypto/tls/conn.go:901 +0x167\r\nnet/http.noteEOFReader.Read(0x7f9bb9a2b090, 0xc8200b2dc0, 0xc8200b1028, 0xc82031b000, 0x1000, 0x1000, 0xc820260b40, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1370 +0x67\r\nnet/http.(*noteEOFReader).Read(0xc8202fd8e0, 0xc82031b000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t<autogenerated>:126 +0xd0\r\nbufio.(*Reader).fill(0xc820290900)\r\n\t/home/sebastian/go/src/bufio/bufio.go:97 +0x1e9\r\nbufio.(*Reader).Peek(0xc820290900, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bufio/bufio.go:132 +0xcc\r\nnet/http.(*persistConn).readLoop(0xc8200b0fd0)\r\n\t/home/sebastian/go/src/net/http/transport.go:876 +0xf7\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:685 +0xc78\r\n\r\ngoroutine 90 [IO wait]:\r\nnet.runtime_pollWait(0x7f9bb9a6b780, 0x72, 0xc82000a270)\r\n\t/home/sebastian/go/src/runtime/netpoll.go:157 +0x60\r\nnet.(*pollDesc).Wait(0xc820270990, 0x72, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:73 +0x3a\r\nnet.(*pollDesc).WaitRead(0xc820270990, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:78 +0x36\r\nnet.(*netFD).Read(0xc820270930, 0xc820361000, 0x1000, 0x1000, 0x0, 0x7f9bbcb22168, 0xc82000a270)\r\n\t/home/sebastian/go/src/net/fd_unix.go:232 +0x23a\r\nnet.(*conn).Read(0xc820134028, 0xc820361000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/net.go:172 +0xe4\r\nnet/http.noteEOFReader.Read(0x7f9bb9a6bfc0, 0xc820134028, 0xc8200b1448, 0xc820361000, 0x1000, 0x1000, 0xc820261560, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1370 +0x67\r\nnet/http.(*noteEOFReader).Read(0xc8202fd9e0, 0xc820361000, 0x1000, 0x1000, 0xc82002ccf0, 0x0, 0x0)\r\n\t<autogenerated>:126 +0xd0\r\nbufio.(*Reader).fill(0xc820290a80)\r\n\t/home/sebastian/go/src/bufio/bufio.go:97 +0x1e9\r\nbufio.(*Reader).Peek(0xc820290a80, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bufio/bufio.go:132 +0xcc\r\nnet/http.(*persistConn).readLoop(0xc8200b13f0)\r\n\t/home/sebastian/go/src/net/http/transport.go:876 +0xf7\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:685 +0xc78\r\n\r\ngoroutine 85 [select]:\r\nnet/http.(*persistConn).writeLoop(0xc8200dc0b0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1009 +0x40c\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:686 +0xc9d\r\n\r\ngoroutine 61 [IO wait]:\r\nnet.runtime_pollWait(0x7f9bb9a6bd80, 0x72, 0xc82000a270)\r\n\t/home/sebastian/go/src/runtime/netpoll.go:157 +0x60\r\nnet.(*pollDesc).Wait(0xc82011d410, 0x72, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:73 +0x3a\r\nnet.(*pollDesc).WaitRead(0xc82011d410, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/fd_poll_runtime.go:78 +0x36\r\nnet.(*netFD).Read(0xc82011d3b0, 0xc8203cc000, 0x1000, 0x1000, 0x0, 0x7f9bbcb22168, 0xc82000a270)\r\n\t/home/sebastian/go/src/net/fd_unix.go:232 +0x23a\r\nnet.(*conn).Read(0xc820120010, 0xc8203cc000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/net.go:172 +0xe4\r\nnet/http.noteEOFReader.Read(0x7f9bb9a6bfc0, 0xc820120010, 0xc8200b14f8, 0xc8203cc000, 0x1000, 0x1000, 0xc820113da0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/net/http/transport.go:1370 +0x67\r\nnet/http.(*noteEOFReader).Read(0xc820221400, 0xc8203cc000, 0x1000, 0x1000, 0x1, 0x0, 0x0)\r\n\t<autogenerated>:126 +0xd0\r\nbufio.(*Reader).fill(0xc82028c480)\r\n\t/home/sebastian/go/src/bufio/bufio.go:97 +0x1e9\r\nbufio.(*Reader).Peek(0xc82028c480, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/home/sebastian/go/src/bufio/bufio.go:132 +0xcc\r\nnet/http.(*persistConn).readLoop(0xc8200b14a0)\r\n\t/home/sebastian/go/src/net/http/transport.go:876 +0xf7\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:685 +0xc78\r\n\r\ngoroutine 59 [select]:\r\nnet/http.(*persistConn).writeLoop(0xc820118840)\r\n\t/home/sebastian/go/src/net/http/transport.go:1009 +0x40c\r\ncreated by net/http.(*Transport).dialConn\r\n\t/home/sebastian/go/src/net/http/transport.go:686 +0xc9d\r\nexit status 2\r\n```"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/134931745","html_url":"https://github.com/golang/go/issues/12339#issuecomment-134931745","issue_url":"https://api.github.com/repos/golang/go/issues/12339","id":134931745,"user":{"login":"davecheney","id":7171,"avatar_url":"https://avatars.githubusercontent.com/u/7171?v=3","gravatar_id":"","url":"https://api.github.com/users/davecheney","html_url":"https://github.com/davecheney","followers_url":"https://api.github.com/users/davecheney/followers","following_url":"https://api.github.com/users/davecheney/following{/other_user}","gists_url":"https://api.github.com/users/davecheney/gists{/gist_id}","starred_url":"https://api.github.com/users/davecheney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davecheney/subscriptions","organizations_url":"https://api.github.com/users/davecheney/orgs","repos_url":"https://api.github.com/users/davecheney/repos","events_url":"https://api.github.com/users/davecheney/events{/privacy}","received_events_url":"https://api.github.com/users/davecheney/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T10:05:09Z","updated_at":"2015-08-26T10:05:09Z","body":"Thank you for providing your sample code. Although it should not matter for this issue, I cannot see where you are closing the response body.\r\n\r\n/cc @bradfitz "}}