gh-87744: fix waitpid race while calling send_signal in asyncio#121126
Merged
kumaraditya303 merged 6 commits intopython:mainfrom Jul 1, 2024
Merged
gh-87744: fix waitpid race while calling send_signal in asyncio#121126kumaraditya303 merged 6 commits intopython:mainfrom
kumaraditya303 merged 6 commits intopython:mainfrom
Conversation
|
🤖 New build scheduled with the buildbot fleet by @kumaraditya303 for commit e0d6de5 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
|
🤖 New build scheduled with the buildbot fleet by @kumaraditya303 for commit 9136f3f 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Contributor
Author
|
Buildbots have passed I'm merging this, will keep an eye on buildbots. |
|
Thanks @kumaraditya303 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jul 1, 2024
…pythonGH-121126) asyncio earlier relied on subprocess module to send signals to the process, this has some drawbacks one being that subprocess module unnecessarily calls waitpid on child processes and hence it races with asyncio implementation which internally uses child watchers. To mitigate this, now asyncio sends signals directly to the process without going through the subprocess on non windows systems. On Windows it fallbacks to subprocess module handling but on windows there are no child watchers so this issue doesn't exists altogether. (cherry picked from commit bd473aa) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
GH-121194 is a backport of this pull request to the 3.13 branch. |
kumaraditya303
added a commit
that referenced
this pull request
Jul 1, 2024
GH-121126) (#121194) gh-87744: fix waitpid race while calling send_signal in asyncio (GH-121126) asyncio earlier relied on subprocess module to send signals to the process, this has some drawbacks one being that subprocess module unnecessarily calls waitpid on child processes and hence it races with asyncio implementation which internally uses child watchers. To mitigate this, now asyncio sends signals directly to the process without going through the subprocess on non windows systems. On Windows it fallbacks to subprocess module handling but on windows there are no child watchers so this issue doesn't exists altogether. (cherry picked from commit bd473aa) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Akasurde
pushed a commit
to Akasurde/cpython
that referenced
this pull request
Jul 3, 2024
…python#121126) asyncio earlier relied on subprocess module to send signals to the process, this has some drawbacks one being that subprocess module unnecessarily calls waitpid on child processes and hence it races with asyncio implementation which internally uses child watchers. To mitigate this, now asyncio sends signals directly to the process without going through the subprocess on non windows systems. On Windows it fallbacks to subprocess module handling but on windows there are no child watchers so this issue doesn't exists altogether.
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this pull request
Jul 11, 2024
…python#121126) asyncio earlier relied on subprocess module to send signals to the process, this has some drawbacks one being that subprocess module unnecessarily calls waitpid on child processes and hence it races with asyncio implementation which internally uses child watchers. To mitigate this, now asyncio sends signals directly to the process without going through the subprocess on non windows systems. On Windows it fallbacks to subprocess module handling but on windows there are no child watchers so this issue doesn't exists altogether.
estyxx
pushed a commit
to estyxx/cpython
that referenced
this pull request
Jul 17, 2024
…python#121126) asyncio earlier relied on subprocess module to send signals to the process, this has some drawbacks one being that subprocess module unnecessarily calls waitpid on child processes and hence it races with asyncio implementation which internally uses child watchers. To mitigate this, now asyncio sends signals directly to the process without going through the subprocess on non windows systems. On Windows it fallbacks to subprocess module handling but on windows there are no child watchers so this issue doesn't exists altogether.
gschaffner
added a commit
to gschaffner/cpython
that referenced
this pull request
Nov 20, 2024
…_signal in asyncio (python#121126)" This reverts the non-test changes of commit bd473aa.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
asyncioearlier relied onsubprocessmodule to send signals to the process, this has some drawbacks one being that subprocess module unnecessarily callswaitpidon child processes and hence it races with asyncio implementation which internally uses child watchers. To mitigate this, now asyncio sends signals directly to the process without going through the subprocess on non windows systems. On Windows it fallbacks tosubprocessmodule handling but on windows there are no child watchers so this issue doesn't exists altogether.