Skip to content

runtime: deflake TestFinalizerOrCleanupDeadlock - #81624

Open
servusdei2018 wants to merge 1 commit into
golang:masterfrom
servusdei2018:bracyn/79209
Open

servusdei2018 wants to merge 1 commit into
golang:masterfrom
servusdei2018:bracyn/79209

Conversation

@servusdei2018

Copy link
Copy Markdown

The TestFinalizerOrCleanupDeadlock/Panic tests were intermittently failing with "stack unavailable" errors for the finalizer goroutine. This happens because panic tracebacks are lock-free and do not stop the world. If the finalizer is still transitioning to its select{} block when the panic occurs, it is seen as running on another thread, preventing its stack from being traced.

Add a 10ms sleep to ensure the finalizer goroutine has parked before the main goroutine triggers the panic.

Fixes #79209.
Change-Id: Ib49f7ba1f23f3bd70ac5b0838567d0c37068fc2f

The TestFinalizerOrCleanupDeadlock/Panic tests were intermittently failing
with "stack unavailable" errors for the finalizer goroutine. This happens
because panic tracebacks are lock-free and do not stop the world. If the
finalizer is still transitioning to its select{} block when the panic
occurs, it is seen as running on another thread, preventing its stack
from being traced.

Add a 10ms sleep to ensure the finalizer goroutine has parked before the
main goroutine triggers the panic.

Fixes golang#79209.
Change-Id: Ib49f7ba1f23f3bd70ac5b0838567d0c37068fc2f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

runtime: TestFinalizerOrCleanupDeadlock/Finalizer/Panic failures

1 participant