Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-104372: Drop the GIL around the vfork() call.#104782
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
gpshead commented May 23, 2023 • edited by bedevere-bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-bot
Uh oh!
There was an error while loading. Please reload this page.
On Linux where the `subprocess` module can use the `vfork` syscall for faster spawning, prevent the parent process from blocking other threads by dropping the GIL while it waits for the vfork'ed child process `exec` outcome. This prevents spawning a binary from a slow filesystem from blocking the rest of the application. Fixespython#104372.
gpshead commented May 23, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Don't write to the vfork_tstate_save pointer local after vfork.
ghost commented May 24, 2023 • edited by ghost
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by ghost
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
miss-islington commented May 25, 2023
Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
miss-islington commented May 25, 2023
Sorry, @gpshead, I could not cleanly backport this to |
On Linux where the `subprocess` module can use the `vfork` syscall for faster spawning, prevent the parent process from blocking other threads by dropping the GIL while it waits for the vfork'ed child process `exec` outcome. This prevents spawning a binary from a slow filesystem from blocking the rest of the application. FixespythonGH-104372. (cherry picked from commit d086792) Co-authored-by: Gregory P. Smith <gps@python.org>
bedevere-bot commented May 25, 2023
GH-104942 is a backport of this pull request to the 3.12 branch. |
…104942) gh-104372: Drop the GIL around the vfork() call. (GH-104782) On Linux where the `subprocess` module can use the `vfork` syscall for faster spawning, prevent the parent process from blocking other threads by dropping the GIL while it waits for the vfork'ed child process `exec` outcome. This prevents spawning a binary from a slow filesystem from blocking the rest of the application. FixesGH-104372. (cherry picked from commit d086792) Co-authored-by: Gregory P. Smith <gps@python.org>
On Linux where the `subprocess` module can use the `vfork` syscall for faster spawning, prevent the parent process from blocking other threads by dropping the GIL while it waits for the vfork'ed child process `exec` outcome. This prevents spawning a binary from a slow filesystem from blocking the rest of the application. Fixespython#104372. (cherry picked from commit d086792)
bedevere-bot commented May 26, 2023
GH-104958 is a backport of this pull request to the 3.11 branch. |
…04958) gh-104372: Drop the GIL around the vfork() call. (#104782) On Linux where the `subprocess` module can use the `vfork` syscall for faster spawning, prevent the parent process from blocking other threads by dropping the GIL while it waits for the vfork'ed child process `exec` outcome. This prevents spawning a binary from a slow filesystem from blocking the rest of the application. Fixes#104372. (cherry picked from commit d086792)
On Linux where the
subprocessmodule can use thevforksyscall for faster spawning, prevent the parent process from blocking other threads by dropping the GIL while it waits for the vfork'ed child processexecoutcome. This prevents spawning a binary from a slow filesystem from blocking the rest of the application.Fixes#104372.
vfork()until the child processexec()succeeds or fails. #104372