{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/13681","labels_url":"https://api.github.com/repos/golang/go/issues/13681/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/13681/comments","events_url":"https://api.github.com/repos/golang/go/issues/13681/events","html_url":"https://github.com/golang/go/issues/13681","id":122999180,"number":13681,"title":"testing: test timeout traceback is not useful","user":{"login":"aclements","id":2688315,"avatar_url":"https://avatars.githubusercontent.com/u/2688315?v=3","gravatar_id":"","url":"https://api.github.com/users/aclements","html_url":"https://github.com/aclements","followers_url":"https://api.github.com/users/aclements/followers","following_url":"https://api.github.com/users/aclements/following{/other_user}","gists_url":"https://api.github.com/users/aclements/gists{/gist_id}","starred_url":"https://api.github.com/users/aclements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aclements/subscriptions","organizations_url":"https://api.github.com/users/aclements/orgs","repos_url":"https://api.github.com/users/aclements/repos","events_url":"https://api.github.com/users/aclements/events{/privacy}","received_events_url":"https://api.github.com/users/aclements/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/24","html_url":"https://github.com/golang/go/milestones/Go1.6","labels_url":"https://api.github.com/repos/golang/go/milestones/24/labels","id":1096159,"number":24,"title":"Go1.6","description":"","creator":{"login":"josharian","id":67496,"avatar_url":"https://avatars.githubusercontent.com/u/67496?v=3","gravatar_id":"","url":"https://api.github.com/users/josharian","html_url":"https://github.com/josharian","followers_url":"https://api.github.com/users/josharian/followers","following_url":"https://api.github.com/users/josharian/following{/other_user}","gists_url":"https://api.github.com/users/josharian/gists{/gist_id}","starred_url":"https://api.github.com/users/josharian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josharian/subscriptions","organizations_url":"https://api.github.com/users/josharian/orgs","repos_url":"https://api.github.com/users/josharian/repos","events_url":"https://api.github.com/users/josharian/events{/privacy}","received_events_url":"https://api.github.com/users/josharian/received_events","type":"User","site_admin":false},"open_issues":72,"closed_issues":509,"state":"open","created_at":"2015-05-05T02:39:06Z","updated_at":"2015-12-18T18:24:24Z","due_on":"2016-01-31T08:00:00Z","closed_at":null},"comments":2,"created_at":"2015-12-18T18:06:40Z","updated_at":"2015-12-18T18:26:14Z","closed_at":null,"body":"Since we introduced and changed the default GOTRACEBACK to \"single\" (see #13107), test time outs no longer print the traceabck of the goroutine actually running the test, or of any other goroutines that may be involved in the test being stuck or slow. This makes it difficult to debug these time outs.\r\n\r\nFor example, in http://build.golang.org/log/a7048d0c840f1815694b38306ce9e7f723d4e382, the runtime test times out with just\r\n\r\n```\r\npanic: test timed out after 5m0s\r\n\r\ngoroutine 207854 [running]:\r\ntesting.startAlarm.func1()\r\n\t/tmp/workdir/go/src/testing/testing.go:717 +0x132\r\ncreated by time.goFunc\r\n\t/tmp/workdir/go/src/time/sleep.go:129 +0x3a\r\nFAIL\truntime\t300.006s\r\n```\r\n\r\nUnfortunately, there seems not to be a way for startAlarm to tell the system to print all stacks on panic. \"go test\" could pass a higher GOTRACEBACK if GOTRACEBACK isn't set (suggested by @davecheney in https://github.com/golang/go/issues/13107#issuecomment-165252244), but this would affect all test panics (not necessarily a bad thing), and wouldn't help if the test binary was being run directly. Another possibility is that startAlarm could print the stacks itself using runtime.Stack (with \"all\" set to true) and then simply exit."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/165863938","html_url":"https://github.com/golang/go/issues/13681#issuecomment-165863938","issue_url":"https://api.github.com/repos/golang/go/issues/13681","id":165863938,"user":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","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},"created_at":"2015-12-18T18:26:14Z","updated_at":"2015-12-18T18:26:14Z","body":"https://go-review.googlesource.com/18044\r\n"}}