Skip to content

Commit cfb1312

Browse files
runtime: sleep a bit when waiting for running debug call goroutine
Without this CL, one of the TestDebugCall tests would fail 1% to 2% of the time on the android-amd64-emu gomote. With this CL, I ran the tests for 1000 iterations with no failures. Fixes #32985 Change-Id: I541268a2a0c10d0cd7604f0b2dbd15c1d18e5730 Reviewed-on: https://go-review.googlesource.com/c/go/+/205248 Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]>
1 parent a2cd2bd commit cfb1312

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/runtime/export_debug_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ func InjectDebugCall(gp *g, fn, args interface{}, tkill func(tid int) error) (in
6767
case "retry _Grunnable", "executing on Go runtime stack":
6868
// These are transient states. Try to get out of them.
6969
if i < 100 {
70+
usleep(100)
7071
Gosched()
7172
continue
7273
}

0 commit comments

Comments
 (0)