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-133744: Fix multiprocessing interrupt test: add an event#133746

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
vstinner merged 1 commit intopython:mainfromvstinner:mp_interrupt
May 12, 2025

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedMay 9, 2025
edited by bedevere-appbot
Loading

Add an event to synchronize the parent process with the child process: wait until the child process starts sleeping.

Add an event to synchronize the parent process with the childprocess: wait until the child process starts sleeping.
@vstinnervstinner added testsTests in the Lib/test dir topic-multiprocessing labelsMay 9, 2025
@vstinnervstinner marked this pull request as ready for reviewMay 9, 2025 12:56
@vstinnervstinner requested a review fromgpshead as acode ownerMay 9, 2025 12:56
@vstinner
Copy link
MemberAuthor

cc@gpshead@colesbury@pitrou

Without this change, the SIGINT signal can be sent too early: in multiprocessing setup code.

@vstinner
Copy link
MemberAuthor

With this change, I can no longer reproduce the issue:

$ ./python -m test test_multiprocessing_spawn.test_processes -m test_interrupt_no_handler -m test_interrupt -m test_terminate -m test_kill  -W -F -j14...0:02:04 load avg: 17.62 [180] test_multiprocessing_spawn.test_processes passed0:02:04 load avg: 18.13 [181] test_multiprocessing_spawn.test_processes passed0:02:06 load avg: 18.13 [182] test_multiprocessing_spawn.test_processes passed

@vstinner
Copy link
MemberAuthor

Since 2013, there was a workaround for this issue, using a simple sleep(1): commit26f9268.

        # XXX maybe terminating too soon causes the problems on Gentoo...        time.sleep(1)

@vstinnervstinner merged commitc2989b7 intopython:mainMay 12, 2025
45 checks passed
@vstinnervstinner deleted the mp_interrupt branchMay 12, 2025 09:10
@vstinnervstinner added needs backport to 3.13bugs and security fixes needs backport to 3.14bugs and security fixes labelsMay 12, 2025
@miss-islington-app
Copy link

Thanks@vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks@vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry,@vstinner, I could not cleanly backport this to3.13 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker c2989b7070b18c0b7c51521fed8bc11c159ea5b8 3.13

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 12, 2025
…thonGH-133746)Add an event to synchronize the parent process with the childprocess: wait until the child process starts sleeping.(cherry picked from commitc2989b7)Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link

GH-133916 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelMay 12, 2025
@bedevere-app
Copy link

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

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMay 12, 2025
vstinner added a commit to vstinner/cpython that referenced this pull requestMay 12, 2025
…thon#133746)Add an event to synchronize the parent process with the childprocess: wait until the child process starts sleeping.(cherry picked from commitc2989b7)
vstinner added a commit that referenced this pull requestMay 12, 2025
…H-133746) (#133916)gh-133744: Fix multiprocessing interrupt test: add an event (GH-133746)Add an event to synchronize the parent process with the childprocess: wait until the child process starts sleeping.(cherry picked from commitc2989b7)Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this pull requestMay 12, 2025
…133746) (#133917)gh-133744: Fix multiprocessing interrupt test: add an event (#133746)Add an event to synchronize the parent process with the childprocess: wait until the child process starts sleeping.(cherry picked from commitc2989b7)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@gpsheadgpsheadAwaiting requested review from gpsheadgpshead is a code owner

Assignees

@vstinnervstinner

Labels
testsTests in the Lib/test dirtopic-multiprocessing
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@vstinner

[8]ページ先頭

©2009-2025 Movatter.jp