{"action":"created","issue":{"url":"https://api.github.com/repos/lib/pq/issues/594","repository_url":"https://api.github.com/repos/lib/pq","labels_url":"https://api.github.com/repos/lib/pq/issues/594/labels{/name}","comments_url":"https://api.github.com/repos/lib/pq/issues/594/comments","events_url":"https://api.github.com/repos/lib/pq/issues/594/events","html_url":"https://github.com/lib/pq/issues/594","id":218460054,"number":594,"title":"Goroutine leak on request cancellations","user":{"login":"azr","id":1024852,"avatar_url":"https://avatars0.githubusercontent.com/u/1024852?v=3","gravatar_id":"","url":"https://api.github.com/users/azr","html_url":"https://github.com/azr","followers_url":"https://api.github.com/users/azr/followers","following_url":"https://api.github.com/users/azr/following{/other_user}","gists_url":"https://api.github.com/users/azr/gists{/gist_id}","starred_url":"https://api.github.com/users/azr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azr/subscriptions","organizations_url":"https://api.github.com/users/azr/orgs","repos_url":"https://api.github.com/users/azr/repos","events_url":"https://api.github.com/users/azr/events{/privacy}","received_events_url":"https://api.github.com/users/azr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-31T10:18:52Z","updated_at":"2017-03-31T10:22:30Z","closed_at":null,"body":"Howdy,\r\n\r\nI have a system stress testing some sql queries, using context cancellation.\r\n\r\nI basically do a lot of requests that take more than 25 seconds and have a context that cancels them after 25 seconds. But for every iteration of this stress test I get goroutine leak.\r\n\r\n```\r\ngoroutine profile: total 105\r\n74 @ 0x42e70a 0x42e7ee 0x40597d 0x40568d 0x8fc44e 0x45b971\r\n#\t0x8fc44d\t.../api/vendor/github.com/lib/pq.(*conn).watchCancel.func1+0xcd\t.../api/vendor/github.com/lib/pq/conn_go18.go:65\r\n```\r\n\r\nThen another test:\r\n\r\n```\r\n108 @ 0x42e70a 0x42e7ee 0x40597d 0x40568d 0x8fc44e 0x45b971\r\n#\t0x8fc44d\t.../api/vendor/github.com/lib/pq.(*conn).watchCancel.func1+0xcd\t.../api/vendor/github.com/lib/pq/conn_go18.go:65\r\n```"},"comment":{"url":"https://api.github.com/repos/lib/pq/issues/comments/290676338","html_url":"https://github.com/lib/pq/issues/594#issuecomment-290676338","issue_url":"https://api.github.com/repos/lib/pq/issues/594","id":290676338,"user":{"login":"tamird","id":1535036,"avatar_url":"https://avatars3.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"created_at":"2017-03-31T10:22:30Z","updated_at":"2017-03-31T10:22:30Z","body":"It would be helpful if you could share some code. You can replace the body of the query with a `sleep`."}}
{"actor":{"display_login":"tamird"}}