runtime: TestFinalizerOrCleanupDeadlock/Panic#01 failures
#!watchflakes
default <- pkg == "runtime" && test == "TestFinalizerOrCleanupDeadlock/Panic#01"
Issue created automatically to collect these failures.
Example (log):
=== RUN TestFinalizerOrCleanupDeadlock/Panic#01
=== PAUSE TestFinalizerOrCleanupDeadlock/Panic#01
=== CONT TestFinalizerOrCleanupDeadlock/Panic#01
crash_test.go:1165: /Users/swarming/.swarming/w/ir/x/t/go-build1760360387/testprog.exe CleanupDeadlock: exit status 2
crash_test.go:1168: output does not contain "runtime.runCleanups()":
panic: panic
goroutine 1 [running]:
main.FinalizerOrCleanupDeadlock(0x1)
/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprog/finalizer_deadlock.go:48 +0x7e5
main.init.8.func2()
/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprog/finalizer_deadlock.go:19 +0x25
main.main()
/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprog/main.go:34 +0x22c
goroutine 4 [running]:
goroutine running on other thread; stack unavailable
--- FAIL: TestFinalizerOrCleanupDeadlock/Panic#01 (0.67s)
Found new dashboard test flakes for:
#!watchflakes
default <- pkg == "runtime" && test == "TestFinalizerOrCleanupDeadlock/Panic#01"
2025-11-03 20:46 gotip-darwin-amd64-race go@17b57078 runtime.TestFinalizerOrCleanupDeadlock/Panic#01 (log)
=== RUN TestFinalizerOrCleanupDeadlock/Panic#01
=== PAUSE TestFinalizerOrCleanupDeadlock/Panic#01
=== CONT TestFinalizerOrCleanupDeadlock/Panic#01
crash_test.go:1165: /Users/swarming/.swarming/w/ir/x/t/go-build1760360387/testprog.exe CleanupDeadlock: exit status 2
crash_test.go:1168: output does not contain "runtime.runCleanups()":
panic: panic
goroutine 1 [running]:
main.FinalizerOrCleanupDeadlock(0x1)
/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprog/finalizer_deadlock.go:48 +0x7e5
main.init.8.func2()
/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprog/finalizer_deadlock.go:19 +0x25
main.main()
/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprog/main.go:34 +0x22c
goroutine 4 [running]:
goroutine running on other thread; stack unavailable
--- FAIL: TestFinalizerOrCleanupDeadlock/Panic#01 (0.67s)
2025-11-06 00:43 gotip-linux-386 go@01c29d1f runtime.TestFinalizerOrCleanupDeadlock/Panic#01 (log)
=== RUN TestFinalizerOrCleanupDeadlock/Panic#01
=== PAUSE TestFinalizerOrCleanupDeadlock/Panic#01
=== CONT TestFinalizerOrCleanupDeadlock/Panic#01
crash_test.go:1165: /home/swarming/.swarming/w/ir/x/t/go-build1385727902/testprog.exe CleanupDeadlock: exit status 2
crash_test.go:1168: output does not contain "runtime.runCleanups()":
panic: panic
goroutine 1 [running]:
main.FinalizerOrCleanupDeadlock(0x1)
/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprog/finalizer_deadlock.go:48 +0x6ab
main.init.8.func2()
/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprog/finalizer_deadlock.go:19 +0x1e
main.main()
/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprog/main.go:34 +0x14e
goroutine 19 [running]:
goroutine running on other thread; stack unavailable
--- FAIL: TestFinalizerOrCleanupDeadlock/Panic#01 (0.02s)
2025-11-25 20:24 gotip-linux-amd64-asan-clang15 go@eec40aae runtime.TestFinalizerOrCleanupDeadlock/Panic#01 (log)
=== RUN TestFinalizerOrCleanupDeadlock/Panic#01
=== PAUSE TestFinalizerOrCleanupDeadlock/Panic#01
=== CONT TestFinalizerOrCleanupDeadlock/Panic#01
crash_test.go:1174: /home/swarming/.swarming/w/ir/x/t/go-build1810449769/testprog.exe CleanupDeadlock: exit status 2
crash_test.go:1177: output does not contain "runtime.runCleanups()":
panic: panic
goroutine 1 [running]:
main.FinalizerOrCleanupDeadlock(0x1)
/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprog/finalizer_deadlock.go:48 +0x84c
main.init.9.func2()
/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprog/finalizer_deadlock.go:19 +0x18
main.main()
/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprog/main.go:34 +0x233
goroutine 7 [running]:
goroutine running on other thread; stack unavailable
--- FAIL: TestFinalizerOrCleanupDeadlock/Panic#01 (0.37s)
I caught one of these failures in the act and unfortunately discovered that this is a completely transient state. The "goroutine running on other thread" is not even remotely stuck. Once I get into gdb it's already on a thread and asleep.
I'm not 100% sure what has made this more common, but I definitely changed this condition in the "eliminate _Psyscall" related changes. That shouldn't be a factor here, though, since this test to my knowledge doesn't make any syscalls. (Not the panic case anyway.)
Change https://go.dev/cl/728821 mentions this issue: runtime: add extra subtest layer to TestFinalizerOrCleanupDeadlock