From d888f1d5c06828e9d7b0166f770a443f6315c2d1 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 1 Oct 2020 16:06:03 -0400 Subject: [PATCH] runtime: add debugging to TestTimePprof We've seen timeouts of TestTimePprof, but the tracebacks aren't useful because goroutines are running on other threads. Add GOTRACEBACK=crash to catch these in the future. For #41120. Change-Id: I97318172ef78d0cbab10df5e4ffcbfeadff579e3 Reviewed-on: https://go-review.googlesource.com/c/go/+/258802 Trust: Austin Clements Run-TryBot: Austin Clements TryBot-Result: Go Bot Reviewed-by: Bryan C. Mills --- src/runtime/crash_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go index 34f30c9a37..eae4f538c1 100644 --- a/src/runtime/crash_test.go +++ b/src/runtime/crash_test.go @@ -667,7 +667,9 @@ func TestBadTraceback(t *testing.T) { } func TestTimePprof(t *testing.T) { - fn := runTestProg(t, "testprog", "TimeProf") + // Pass GOTRACEBACK for issue #41120 to try to get more + // information on timeout. + fn := runTestProg(t, "testprog", "TimeProf", "GOTRACEBACK=crash") fn = strings.TrimSpace(fn) defer os.Remove(fn) -- 2.50.0