{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/24776","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/24776/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/24776/comments","events_url":"https://api.github.com/repos/golang/go/issues/24776/events","html_url":"https://github.com/golang/go/issues/24776","id":312587012,"number":24776,"title":"x/net/http2: Transport leaks goroutines (awaitRequestCancel)","user":{"login":"g7r","id":457958,"avatar_url":"https://avatars2.githubusercontent.com/u/457958?v=4","gravatar_id":"","url":"https://api.github.com/users/g7r","html_url":"https://github.com/g7r","followers_url":"https://api.github.com/users/g7r/followers","following_url":"https://api.github.com/users/g7r/following{/other_user}","gists_url":"https://api.github.com/users/g7r/gists{/gist_id}","starred_url":"https://api.github.com/users/g7r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/g7r/subscriptions","organizations_url":"https://api.github.com/users/g7r/orgs","repos_url":"https://api.github.com/users/g7r/repos","events_url":"https://api.github.com/users/g7r/events{/privacy}","received_events_url":"https://api.github.com/users/g7r/received_events","type":"User","site_admin":false},"labels":[{"id":373399998,"url":"https://api.github.com/repos/golang/go/labels/NeedsFix","name":"NeedsFix","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/62","html_url":"https://github.com/golang/go/milestone/62","labels_url":"https://api.github.com/repos/golang/go/milestones/62/labels","id":2827591,"number":62,"title":"Go1.11","description":"","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":883,"closed_issues":337,"state":"open","created_at":"2017-10-10T13:39:17Z","updated_at":"2018-04-20T04:55:46Z","due_on":"2018-07-31T07:00:00Z","closed_at":null},"comments":2,"created_at":"2018-04-09T15:53:10Z","updated_at":"2018-04-20T07:12:14Z","closed_at":null,"author_association":"NONE","body":"### What version of Go are you using (`go version`)?\r\n```go version go1.10 darwin/amd64```\r\n```go version go1.10.1 linux/amd64```\r\n\r\n### Does this issue reproduce with the latest release?\r\nYes\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\n```\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOCACHE=\"/Users/sz/Library/Caches/go-build\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"darwin\"\r\nGOOS=\"darwin\"\r\nGOPATH=\"/Users/sz/src/gohome\"\r\nGORACE=\"\"\r\nGOROOT=\"/usr/local/Cellar/go/1.10/libexec\"\r\nGOTMPDIR=\"\"\r\nGOTOOLDIR=\"/usr/local/Cellar/go/1.10/libexec/pkg/tool/darwin_amd64\"\r\nGCCGO=\"gccgo\"\r\nCC=\"clang\"\r\nCXX=\"clang++\"\r\nCGO_ENABLED=\"1\"\r\nCGO_CFLAGS=\"-g -O2\"\r\nCGO_CPPFLAGS=\"\"\r\nCGO_CXXFLAGS=\"-g -O2\"\r\nCGO_FFLAGS=\"-g -O2\"\r\nCGO_LDFLAGS=\"-g -O2\"\r\nPKG_CONFIG=\"pkg-config\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/9h/x_80x8ln3_g038_zj_t9tszw0000gn/T/go-build456657465=/tmp/go-build -gno-record-gcc-switches -fno-common\"\r\n```\r\n\r\n```\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOCACHE=\"/home/sz/.cache/go-build\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"linux\"\r\nGOOS=\"linux\"\r\nGOPATH=\"/home/sz/go\"\r\nGORACE=\"\"\r\nGOROOT=\"/home/sz/goroot/1.10.1/go\"\r\nGOTMPDIR=\"\"\r\nGOTOOLDIR=\"/home/sz/goroot/1.10.1/go/pkg/tool/linux_amd64\"\r\nGCCGO=\"gccgo\"\r\nCC=\"gcc\"\r\nCXX=\"g++\"\r\nCGO_ENABLED=\"1\"\r\nCGO_CFLAGS=\"-g -O2\"\r\nCGO_CPPFLAGS=\"\"\r\nCGO_CXXFLAGS=\"-g -O2\"\r\nCGO_FFLAGS=\"-g -O2\"\r\nCGO_LDFLAGS=\"-g -O2\"\r\nPKG_CONFIG=\"pkg-config\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build220690427=/tmp/go-build -gno-record-gcc-switches\"\r\n```\r\n\r\n### What did you do?\r\nHTTP2 client leaks goroutines when the following conditions are met:\r\n1. `http.Client` has `Timeout` set\r\n2. TLS connections are forcibly dropped\r\n3. `MaxConcurrentStreams` is reasonably low\r\n\r\nTest program that reproduces the issue: https://gist.github.com/g7r/3044f20a47e5d41630d9a2cdc5c24918\r\n\r\n### What did you expect to see?\r\nIt is expected to see steady number of goroutines.\r\n\r\n### What did you see instead?\r\nNumber of goroutines grows infinitely.\r\nLeaked goroutine stacktraces are:\r\n```\r\n#\t0x1243f5f\tnet/http.http2awaitRequestCancel+0x13f\t\t\t\t/usr/local/Cellar/go/1.10/libexec/src/net/http/h2_bundle.go:6780\r\n#\t0x127ca8b\tnet/http.(*http2ClientConn).awaitOpenSlotForRequest.func1+0x3b\t/usr/local/Cellar/go/1.10/libexec/src/net/http/h2_bundle.go:7519\r\n```"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/383003545","html_url":"https://github.com/golang/go/issues/24776#issuecomment-383003545","issue_url":"https://api.github.com/repos/golang/go/issues/24776","id":383003545,"user":{"login":"gopherbot","id":8566911,"avatar_url":"https://avatars1.githubusercontent.com/u/8566911?v=4","gravatar_id":"","url":"https://api.github.com/users/gopherbot","html_url":"https://github.com/gopherbot","followers_url":"https://api.github.com/users/gopherbot/followers","following_url":"https://api.github.com/users/gopherbot/following{/other_user}","gists_url":"https://api.github.com/users/gopherbot/gists{/gist_id}","starred_url":"https://api.github.com/users/gopherbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gopherbot/subscriptions","organizations_url":"https://api.github.com/users/gopherbot/orgs","repos_url":"https://api.github.com/users/gopherbot/repos","events_url":"https://api.github.com/users/gopherbot/events{/privacy}","received_events_url":"https://api.github.com/users/gopherbot/received_events","type":"User","site_admin":false},"created_at":"2018-04-20T07:12:14Z","updated_at":"2018-04-20T07:12:14Z","author_association":"NONE","body":"Change https://golang.org/cl/108415 mentions this issue: `http2: terminate await request cancel goroutine on conn close`"}}
{"actor":{"display_login":"gopherbot"}}