{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/10614","labels_url":"https://api.github.com/repos/golang/go/issues/10614/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/10614/comments","events_url":"https://api.github.com/repos/golang/go/issues/10614/events","html_url":"https://github.com/golang/go/issues/10614","id":71873016,"number":10614,"title":"text/template: leaks goroutines on errors","user":{"login":"dvyukov","id":1095328,"avatar_url":"https://avatars.githubusercontent.com/u/1095328?v=3","gravatar_id":"","url":"https://api.github.com/users/dvyukov","html_url":"https://github.com/dvyukov","followers_url":"https://api.github.com/users/dvyukov/followers","following_url":"https://api.github.com/users/dvyukov/following{/other_user}","gists_url":"https://api.github.com/users/dvyukov/gists{/gist_id}","starred_url":"https://api.github.com/users/dvyukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvyukov/subscriptions","organizations_url":"https://api.github.com/users/dvyukov/orgs","repos_url":"https://api.github.com/users/dvyukov/repos","events_url":"https://api.github.com/users/dvyukov/events{/privacy}","received_events_url":"https://api.github.com/users/dvyukov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"robpike","id":4324516,"avatar_url":"https://avatars.githubusercontent.com/u/4324516?v=3","gravatar_id":"","url":"https://api.github.com/users/robpike","html_url":"https://github.com/robpike","followers_url":"https://api.github.com/users/robpike/followers","following_url":"https://api.github.com/users/robpike/following{/other_user}","gists_url":"https://api.github.com/users/robpike/gists{/gist_id}","starred_url":"https://api.github.com/users/robpike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robpike/subscriptions","organizations_url":"https://api.github.com/users/robpike/orgs","repos_url":"https://api.github.com/users/robpike/repos","events_url":"https://api.github.com/users/robpike/events{/privacy}","received_events_url":"https://api.github.com/users/robpike/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/1","html_url":"https://github.com/golang/go/milestones/Go1.5","labels_url":"https://api.github.com/repos/golang/go/milestones/1/labels","id":905105,"number":1,"title":"Go1.5","description":"","creator":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"open_issues":321,"closed_issues":369,"state":"open","created_at":"2014-12-16T02:26:41Z","updated_at":"2015-04-29T17:46:06Z","due_on":"2015-07-31T04:00:00Z","closed_at":null},"comments":5,"created_at":"2015-04-29T13:21:00Z","updated_at":"2015-04-29T17:46:06Z","closed_at":"2015-04-29T17:46:06Z","body":"The following program leaves a hanged goroutine. If a server reloads templates on the fly, this behavior can leads to unbounded number of leaked goroutines.\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"html/template\"\r\n\t\"time\"\r\n)\r\n\r\nfunc main() {\r\n\ttemplate.New(\"foo\").Parse(\"{{.\")\r\n\ttime.Sleep(time.Second)\r\n\tpanic(\"who's there?\")\r\n}\r\n```\r\n```\r\npanic: who's there?\r\n\r\ngoroutine 1 [running]:\r\nmain.main()\r\n\t/tmp/htmltempl.go:11 +0x297\r\n\r\ngoroutine 5 [chan send]:\r\ntext/template/parse.(*lexer).errorf(0xc2080c2000, 0x5d8290, 0xf, 0x0, 0x0, 0x0, 0xffffff01)\r\n\tsrc/text/template/parse/lex.go:165 +0xca\r\ntext/template/parse.lexInsideAction(0xc2080c2000, 0x623b78)\r\n\tsrc/text/template/parse/lex.go:280 +0xaf7\r\ntext/template/parse.(*lexer).run(0xc2080c2000)\r\n\tsrc/text/template/parse/lex.go:198 +0x5d\r\ncreated by text/template/parse.lex\r\n\tsrc/text/template/parse/lex.go:191 +0x1b9\r\n```\r\non commit ccc76db"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/97516194","html_url":"https://github.com/golang/go/issues/10614#issuecomment-97516194","issue_url":"https://api.github.com/repos/golang/go/issues/10614","id":97516194,"user":{"login":"mdempsky","id":38349,"avatar_url":"https://avatars.githubusercontent.com/u/38349?v=3","gravatar_id":"","url":"https://api.github.com/users/mdempsky","html_url":"https://github.com/mdempsky","followers_url":"https://api.github.com/users/mdempsky/followers","following_url":"https://api.github.com/users/mdempsky/following{/other_user}","gists_url":"https://api.github.com/users/mdempsky/gists{/gist_id}","starred_url":"https://api.github.com/users/mdempsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdempsky/subscriptions","organizations_url":"https://api.github.com/users/mdempsky/orgs","repos_url":"https://api.github.com/users/mdempsky/repos","events_url":"https://api.github.com/users/mdempsky/events{/privacy}","received_events_url":"https://api.github.com/users/mdempsky/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T17:46:05Z","updated_at":"2015-04-29T17:46:05Z","body":"Closing as duplicate."}}