Skip to content

Allow concurrent use of system(), IO.popen and Process.spawn in ractors #13806

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

Closed

Conversation

luke-gruber
Copy link
Contributor

These ruby methods call fork or vfork internally, so we need to grab the fork lock in the parent and release it after the call. We don't reset the lock in the child because we're going to exec right after anyway. Without this lock, strange things were happening having to do with the timer thread. Sometimes multiple timers were running.

Copy link

launchable-app bot commented Jul 7, 2025

Tests Failed

✖️no tests failed ✔️62052 tests passed(1 flake)

These ruby methods call `fork` or `vfork` internally, so we need to grab
the fork lock in the parent and release it after the call. We don't
reset the lock in the child because we're going to exec right after anyway.
Without this lock, strange things were happening having to do with the
timer thread. Sometimes multiple timers were running.
@luke-gruber luke-gruber force-pushed the concurrent_kernel_system branch from 84be09a to 6912825 Compare July 7, 2025 15:14
@luke-gruber
Copy link
Contributor Author

Some CI failures right now. It looks like the added test may be triggering a ractor bug that we already know about that has a PR but has not been merged yet. I'll continue to investigate.

@jhawthorn
Copy link
Member

jhawthorn commented Jul 9, 2025

Hmm. The test doesn't reproduce for me (at least on linux, testing macos...). I feel like we shouldn't need the fork lock for these operations because we're going to exec immediately after and so whatever inconsistency that was trying to avoid shouldn't be an issue (but maybe there is some problem before the exec occurs).

@luke-gruber
Copy link
Contributor Author

You're right, sorry! Closing.

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy