Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-87744: fix waitpid race while calling send_signal in asyncio#121126

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kumaraditya303 merged 6 commits intopython:mainfromkumaraditya303:main
Jul 1, 2024

Conversation

@kumaraditya303
Copy link
Contributor

@kumaraditya303kumaraditya303 commentedJun 28, 2024
edited
Loading

asyncio earlier relied onsubprocess module to send signals to the process, this has some drawbacks one being that subprocess module unnecessarily callswaitpid 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 tosubprocess module handling but on windows there are no child watchers so this issue doesn't exists altogether.

@kumaraditya303kumaraditya303 added type-bugAn unexpected behavior, bug, or error topic-asyncio labelsJun 28, 2024
@kumaraditya303kumaraditya303 added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJun 28, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@kumaraditya303 for commite0d6de5 🤖

If you want to schedule another build, you need to add the🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJun 28, 2024
@kumaraditya303kumaraditya303 marked this pull request as ready for reviewJune 29, 2024 05:55
@kumaraditya303kumaraditya303 added the needs backport to 3.13bugs and security fixes labelJun 29, 2024
@gvanrossumgvanrossum removed their request for reviewJune 29, 2024 07:00
@kumaraditya303kumaraditya303 added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJun 30, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@kumaraditya303 for commit9136f3f 🤖

If you want to schedule another build, you need to add the🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJun 30, 2024
@kumaraditya303
Copy link
ContributorAuthor

Buildbots have passed I'm merging this, will keep an eye on buildbots.

@kumaraditya303kumaraditya303 merged commitbd473aa intopython:mainJul 1, 2024
@miss-islington-app
Copy link

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 requestJul 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 commitbd473aa)Co-authored-by: Kumar Aditya <kumaraditya@python.org>
@bedevere-app
Copy link

GH-121194 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelJul 1, 2024
kumaraditya303 added a commit that referenced this pull requestJul 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 commitbd473aa)Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Akasurde pushed a commit to Akasurde/cpython that referenced this pull requestJul 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 requestJul 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 requestJul 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 requestNov 20, 2024
…_signal in asyncio (python#121126)"This reverts the non-test changes of commitbd473aa.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@1st11st1Awaiting requested review from 1st11st1 is a code owner

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov is a code owner

@willingcwillingcAwaiting requested review from willingcwillingc is a code owner

Assignees

No one assigned

Labels

topic-asynciotype-bugAn unexpected behavior, bug, or error

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@kumaraditya303@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp