Skip to content

Conversation

@cmetz100
Copy link
Contributor

@cmetz100 cmetz100 commented Jan 30, 2026

What does this PR do?

Fixes a rare race condition in signal_and_wait that loom does not catch (without adding an explicit yield point)

Motivation

Fix race condition.

Additional Notes

The first commit adds the loom tests to prove that 1. we have a race condition, and 2. loom is unable to explore the right interleaving without an explicit yield point

The second commit applied the fix

If you checkout the first commit expect the loom test signal_and_wait_race_proof_with_yeild to fail

Here is my writeup (it is not done yet)https://app.datadoghq.com/notebook/13820207/shutdown-timeout-investigation

Signed-off-by: Caleb Metz <caleb.metz@datadoghq.com>
Signed-off-by: Caleb Metz <caleb.metz@datadoghq.com>
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.

2 participants