{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/24822","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/24822/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/24822/comments","events_url":"https://api.github.com/repos/golang/go/issues/24822/events","html_url":"https://github.com/golang/go/issues/24822","id":313678624,"number":24822,"title":"http2 client : dead lock while flush data to peer","user":{"login":"ikenchina","id":3422667,"avatar_url":"https://avatars0.githubusercontent.com/u/3422667?v=4","gravatar_id":"","url":"https://api.github.com/users/ikenchina","html_url":"https://github.com/ikenchina","followers_url":"https://api.github.com/users/ikenchina/followers","following_url":"https://api.github.com/users/ikenchina/following{/other_user}","gists_url":"https://api.github.com/users/ikenchina/gists{/gist_id}","starred_url":"https://api.github.com/users/ikenchina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikenchina/subscriptions","organizations_url":"https://api.github.com/users/ikenchina/orgs","repos_url":"https://api.github.com/users/ikenchina/repos","events_url":"https://api.github.com/users/ikenchina/events{/privacy}","received_events_url":"https://api.github.com/users/ikenchina/received_events","type":"User","site_admin":false},"labels":[{"id":357033853,"url":"https://api.github.com/repos/golang/go/labels/WaitingForInfo","name":"WaitingForInfo","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestone/6","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars1.githubusercontent.com/u/104030?v=4","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":1277,"closed_issues":1009,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2018-04-13T15:04:56Z","due_on":"2099-12-31T08:00:00Z","closed_at":null},"comments":2,"created_at":"2018-04-12T11:04:08Z","updated_at":"2018-04-13T15:04:56Z","closed_at":"2018-04-13T15:04:56Z","author_association":"NONE","body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n\r\n### What version of Go are you using (`go version`)?\r\ngo 1.9.2\r\n\r\n### Does this issue reproduce with the latest release?\r\ncan't reproduce \r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\ncentos \r\n\r\n###  scenario\r\ncreate a new http client and default transport (client's timeout is 5s) in one goroutine to access http2 server every time.\r\nbut i have limit the amount of goroutine ( maximum is 100 goroutine ).\r\nsometimes service didn't work, i found one goroutine was blocking others gorutines(99 goroutines).\r\n\r\n\r\n\r\n\r\n#### blocked goroutines\r\nin totally, 98 goroutine have been blocked.\r\n\r\n`\r\ngoroutine 220791540 [semacquire]:\r\nsync.runtime_SemacquireMutex(0xc429e00a14, 0xc427945500)\r\n\t/usr/local/go/src/runtime/sema.go:71 +0x3d\r\nsync.(*Mutex).Lock(0xc429e00a10)\r\n\t/usr/local/go/src/sync/mutex.go:134 +0xee\r\nnet/http.(*http2ClientConn).streamByID(0xc429e009c0, 0x100000889, 0x0)\r\n\t/usr/local/go/src/net/http/h2_bundle.go:7758 +0x43\r\nnet/http.(*http2ClientConn).forgetStreamID(0xc429e009c0, 0x889)\r\n\t/usr/local/go/src/net/http/h2_bundle.go:7754 +0x38\r\nnet/http.(*http2ClientConn).RoundTrip(0xc429e009c0, 0xc425179200, 0x0, 0x0, 0x0)\r\n\t/usr/local/go/src/net/http/h2_bundle.go:7376 +0xb59\r\nnet/http.(*http2Transport).RoundTripOpt(0xc420837220, 0xc425179200, 0xc422d30600, 0xc425f546c0, 0x40000000040b130, 0xffffffffffffffff)\r\n\t/usr/local/go/src/net/http/h2_bundle.go:6858 +0x145\r\nnet/http.(*http2Transport).RoundTrip(0xc420837220, 0xc425179200, 0x654201, 0xc422d306f8, 0xc425f548f0)\r\n\t/usr/local/go/src/net/http/h2_bundle.go:6820 +0x3a\r\nnet/http.http2noDialH2RoundTripper.RoundTrip(0xc420837220, 0xc425179200, 0xc426359f80, 0x5, 0xc420813048)\r\n\t/usr/local/go/src/net/http/h2_bundle.go:990 +0x39\r\nnet/http.(*Transport).RoundTrip(0x137f9a0, 0xc425179200, 0x137f9a0, 0xbea9f7ed1c00e6c5, 0x9a938b916ea9)\r\n\t/usr/local/go/src/net/http/transport.go:371 +0xd47\r\nnet/http.send(0xc425179100, 0x12f72e0, 0x137f9a0, 0xbea9f7ed1c00e6c5, 0x9a938b916ea9, 0x138d2a0, 0xc4201430d0, 0xbea9f7ed1c00e6c5, 0xc425f54b08, 0x1)\r\n\t/usr/local/go/src/net/http/client.go:249 +0x1a9\r\nnet/http.(*Client).send(0xc4208f15c0, 0xc425179100, 0xbea9f7ed1c00e6c5, 0x9a938b916ea9, 0x138d2a0, 0xc4201430d0, 0x0, 0x1, 0xbfb900)\r\n\t/usr/local/go/src/net/http/client.go:173 +0xfd\r\nnet/http.(*Client).Do(0xc4208f15c0, 0xc425179100, 0x18, 0xc4200166c0, 0x18)\r\n\t/usr/local/go/src/net/http/client.go:602 +0x28d\r\n......\r\n`\r\n\r\n\r\n\r\n### blocking other goroutines\r\nseems that this goroutine blocking other goroutines\r\n\r\n`\r\ngoroutine 220791555 [IO wait]:\r\ninternal/poll.runtime_pollWait(0x7f51f01de058, 0x77, 0x0)\r\n\t/usr/local/go/src/runtime/netpoll.go:173 +0x57\r\ninternal/poll.(*pollDesc).wait(0xc42545c098, 0x77, 0xffffffffffffff00, 0x12fa5e0, 0x12f46f0)\r\n\t/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xae\r\ninternal/poll.(*pollDesc).waitWrite(0xc42545c098, 0xc42264b800, 0x2f, 0x400)\r\n\t/usr/local/go/src/internal/poll/fd_poll_runtime.go:94 +0x3d\r\ninternal/poll.(*FD).Write(0xc42545c080, 0xc42264b800, 0x2f, 0x400, 0x0, 0x0, 0x0)\r\n\t/usr/local/go/src/internal/poll/fd_unix.go:227 +0x244\r\nnet.(*netFD).Write(0xc42545c080, 0xc42264b800, 0x2f, 0x400, 0xc427942f20, 0x3, 0xa022617980)\r\n\t/usr/local/go/src/net/fd_unix.go:220 +0x52\r\nnet.(*conn).Write(0xc426176e38, 0xc42264b800, 0x2f, 0x400, 0x0, 0x0, 0x0)\r\n\t/usr/local/go/src/net/net.go:188 +0x6d\r\ncrypto/tls.(*Conn).write(0xc422b99500, 0xc42264b800, 0x2f, 0x400, 0xc421d39ac0, 0xc427942f01, 0x613054)\r\n\t/usr/local/go/src/crypto/tls/conn.go:832 +0x1a7\r\ncrypto/tls.(*Conn).writeRecordLocked(0xc422b99500, 0xdad617, 0xc426fd0000, 0x12, 0x1000, 0x0, 0x0, 0x0)\r\n\t/usr/local/go/src/crypto/tls/conn.go:909 +0x360\r\ncrypto/tls.(*Conn).Write(0xc422b99500, 0xc426fd0000, 0x12, 0x1000, 0x0, 0x0, 0x0)\r\n\t/usr/local/go/src/crypto/tls/conn.go:1068 +0x1bb\r\nnet/http.http2stickyErrWriter.Write(0x7f51f45266d0, 0xc422b99500, 0xc429e00b48, 0xc426fd0000, 0x12, 0x1000, 0xccc240, 0x7f51f455f8b0, 0x80000000000)\r\n\t/usr/local/go/src/net/http/h2_bundle.go:6803 +0x7a\r\nnet/http.(*http2stickyErrWriter).Write(0xc42273b280, 0xc426fd0000, 0x12, 0x1000, 0x12, 0x412577, 0xc426150840)\r\n\t<autogenerated>:1 +0x74\r\nbufio.(*Writer).Flush(0xc4241c3d80, 0x895, 0xc42cca8c00)\r\n\t/usr/local/go/src/bufio/bufio.go:567 +0x7e\r\nnet/http.(*http2ClientConn).writeHeaders(0xc429e009c0, 0x895, 0xc42cca8c09, 0x0, 0xb6, 0x0, 0x0)\r\n\t/usr/local/go/src/net/http/h2_bundle.go:7436 +0x1ec\r\nnet/http.(*http2ClientConn).RoundTrip(0xc429e009c0, 0xc4239b1200, 0x0, 0x0, 0x0)\r\n\t/usr/local/go/src/net/http/h2_bundle.go:7289 +0x46b\r\nnet/http.(*http2Transport).RoundTripOpt(0xc420837220, 0xc4239b1200, 0xc424c5fb00, 0xc4241396c0, 0x60000000040b130, 0xffffffffffffffff)\r\n\t/usr/local/go/src/net/http/h2_bundle.go:6858 +0x145\r\nnet/http.(*http2Transport).RoundTrip(0xc420837220, 0xc4239b1200, 0x654201, 0xc424c5fb98, 0xc4241398f0)\r\n\t/usr/local/go/src/net/http/h2_bundle.go:6820 +0x3a\r\nnet/http.http2noDialH2RoundTripper.RoundTrip(0xc420837220, 0xc4239b1200, 0xc422c7e030, 0x5, 0xc420813048)\r\n\t/usr/local/go/src/net/http/h2_bundle.go:990 +0x39\r\nnet/http.(*Transport).RoundTrip(0x137f9a0, 0xc4239b1200, 0x137f9a0, 0xbea9f7ed1c77e1fd, 0x9a938c0869e0)\r\n\t/usr/local/go/src/net/http/transport.go:371 +0xd47\r\nnet/http.send(0xc4239b1100, 0x12f72e0, 0x137f9a0, 0xbea9f7ed1c77e1fd, 0x9a938c0869e0, 0x138d2a0, 0xc42062af70, 0xbea9f7ed1c77e1fd, 0xc424139b08, 0x1)\r\n\t/usr/local/go/src/net/http/client.go:249 +0x1a9\r\nnet/http.(*Client).send(0xc4208f15c0, 0xc4239b1100, 0xbea9f7ed1c77e1fd, 0x9a938c0869e0, 0x138d2a0, 0xc42062af70, 0x0, 0x1, 0xbfb900)\r\n\t/usr/local/go/src/net/http/client.go:173 +0xfd\r\nnet/http.(*Client).Do(0xc4208f15c0, 0xc4239b1100, 0x18, 0xc4200166c0, 0x18)\r\n\t/usr/local/go/src/net/http/client.go:602 +0x28d\r\n.......\r\n`\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/381164788","html_url":"https://github.com/golang/go/issues/24822#issuecomment-381164788","issue_url":"https://api.github.com/repos/golang/go/issues/24822","id":381164788,"user":{"login":"andybons","id":365204,"avatar_url":"https://avatars3.githubusercontent.com/u/365204?v=4","gravatar_id":"","url":"https://api.github.com/users/andybons","html_url":"https://github.com/andybons","followers_url":"https://api.github.com/users/andybons/followers","following_url":"https://api.github.com/users/andybons/following{/other_user}","gists_url":"https://api.github.com/users/andybons/gists{/gist_id}","starred_url":"https://api.github.com/users/andybons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andybons/subscriptions","organizations_url":"https://api.github.com/users/andybons/orgs","repos_url":"https://api.github.com/users/andybons/repos","events_url":"https://api.github.com/users/andybons/events{/privacy}","received_events_url":"https://api.github.com/users/andybons/received_events","type":"User","site_admin":false},"created_at":"2018-04-13T15:04:56Z","updated_at":"2018-04-13T15:04:56Z","author_association":"OWNER","body":"Since you’re unable to reproduce this, closing for now. If it pops up again, please feel free to reopen."}}
{"actor":{"display_login":"andybons"}}