Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-84559: Change the multiprocessing start method default to forkserver#101556
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
Merged
gpshead merged 14 commits into python:main from gpshead:multiprocessing/default-start-method-3.14Sep 26, 2024
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
14 commits Select commit Hold shift + click to select a range
c5277b7 gh-84559: Change the default multiprocessing start method.
gpshead 5192e06 Merge branch 'main' into multiprocessing/default-start-method-3.14
gpshead 7ab7ebc 📜🤖 Added by blurb_it.
blurb-it[bot] b43317d Merge branch 'main' into multiprocessing/default-start-method-3.14
gpshead f09cd81 Update module docs.
gpshead 660fddb Merge branch 'main' into multiprocessing/default-start-method-3.14
gpshead a339662 What's New + issue ref fix.
gpshead 21f828f elif vs if makes a difference...
gpshead 823ec35 simplify the default selection logic.
gpshead 7fbf350 fix comment typo
gpshead ea574cc typo fix in NEWS
gpshead 4492574 Better explain test logic with comments.
gpshead 0889ab5 Make an explanatory comment more clear.
gpshead 668559c minor NEWS wording improvement. line length.
gpshead File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -2209,7 +2209,15 @@ def skip_if_broken_multiprocessing_synchronize(): | ||
| # bpo-38377: On Linux, creating a semaphore fails with OSError | ||
| # if the current user does not have the permission to create | ||
| # a file in /dev/shm/ directory. | ||
| synchronize.Lock(ctx=None) | ||
| import multiprocessing | ||
| synchronize.Lock(ctx=multiprocessing.get_context('fork')) | ||
| # The explicit fork mp context is required in order for | ||
| # TestResourceTracker.test_resource_tracker_reused to work. | ||
| # synchronize creates a new multiprocessing.resource_tracker | ||
| # process at module import time via the above call in that | ||
| # scenario. Awkward. This enables gh-84559. No code involved | ||
| # should have threads at that point so fork() should be safe. | ||
gpshead marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| except OSError as exc: | ||
| raise unittest.SkipTest(f"broken multiprocessing SemLock:{exc!r}") | ||
5 changes: 5 additions & 0 deletions 5 Misc/NEWS.d/next/Library/2024-09-19-00-09-48.gh-issue-84559.IrxvQe.rst
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| The default :mod:`multiprocessing` start method on Linux and other POSIX | ||
| systems has been changed away from often unsafe ``"fork"`` to ``"forkserver"`` | ||
| (when the platform supports sending file handles over pipes as most do) or | ||
| ``"spawn"``. Mac and Windows are unchanged as they already default to | ||
| ``"spawn"``. |
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.
Uh oh!
There was an error while loading. Please reload this page.