Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unix: fix signal handling data race #4287

Closed
wants to merge 1 commit into from
Closed

Conversation

bnoordhuis
Copy link
Member

Changes to the caught_signals field should be immediately visible to other threads, otherwise "we get signal" events can get lost.

Tentative fix for the linked issue. I say "tentative" because the cause is not fully understood but all signs point to libuv's handling of SIGCHLD signals, and they only manifest on architectures with weaker memory models than x86.

Fixes: #4279

Changes to the `caught_signals` field should be immediately visible to
other threads, otherwise "we get signal" events can get lost.

Tentative fix for the linked issue. I say "tentative" because the cause
is not fully understood but all signs point to libuv's handling of
SIGCHLD signals, and they only manifest on architectures with weaker
memory models than x86.

Fixes: libuv#4279
@bradking
Copy link
Contributor

I tested this in the environment described in #4279, and it does not resolve the issue. The symptoms remain identical.

@bnoordhuis
Copy link
Member Author

Yes, I realized a day later that Rosetta runs the ARM CPU in TSO (Total Store Ordering) mode, same as x86. Whatever it is, it can't be the weaker memory model.

@bnoordhuis bnoordhuis closed this Jan 18, 2024
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.

uv_run hangs on macOS arm64/Rosetta in x86_64 docker container
3 participants