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-143706: Fix sys.argv not set during multiprocessing forkserver__main__ preload#143717

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

Conversation

@gpshead
Copy link
Member

@gpsheadgpshead commentedJan 12, 2026
edited by bedevere-appbot
Loading

The forkserver was not passing sys.argv to its main() function, causing sys.argv to be empty during__main__ module import in child processes. This fixes a non-obvious regression inadvertently introduced by thegh-126631 main preloading fix.

@duaneg FYI

…er `__main__` preloadThe forkserver was not passing sys.argv to its main() function, causingsys.argv to be empty during `__main__` module import in child processes. Thisfixes a non-obvious regression inadvertently introduced by thepythongh-126631 mainpreloading fix.
@gpsheadgpshead self-assigned thisJan 12, 2026
@gpsheadgpshead added needs backport to 3.13bugs and security fixes needs backport to 3.14bugs and security fixes labelsJan 12, 2026
@gpsheadgpshead added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJan 12, 2026
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@gpshead for commit30b347f 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F143717%2Fmerge

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 labelJan 12, 2026
Copy link
Contributor

@duanegduaneg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@gpsheadgpshead merged commit298d544 intopython:mainJan 12, 2026
115 of 123 checks passed
@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

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

cherry_picker 298d5440eb83f2dfd5651bac86d1592ec358d54c 3.13

@bedevere-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJan 12, 2026
…er `__main__` preload (pythonGH-143717)The forkserver was not passing sys.argv to its main() function, causingsys.argv to be empty during `__main__` module import in child processes. Thisfixes a non-obvious regression inadvertently introduced by thepythongh-126631 mainpreloading fix.(cherry picked from commit298d544)Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelJan 12, 2026
gpshead added a commit that referenced this pull requestJan 13, 2026
…ver `__main__` preload (GH-143717) (#143763)gh-143706: Fix sys.argv not set during multiprocessing forkserver `__main__` preload (GH-143717)The forkserver was not passing sys.argv to its main() function, causingsys.argv to be empty during `__main__` module import in child processes. Thisfixes a non-obvious regression inadvertently introduced by thegh-126631 mainpreloading fix.(cherry picked from commit298d544)Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotARM64 macOS 3.x (tier-2) has failed when building commit298d544.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/725/builds/12531) and take a look at the build logs.
  4. Check if the failure is related to this commit (298d544) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/725/builds/12531

Failed tests:

  • test_urllib2net

Summary of the results of the build (if available):

==

Click to see traceback logs
remote:Enumerating objects: 23, done.remote:Counting objects:   4% (1/23)remote:Counting objects:   8% (2/23)remote:Counting objects:  13% (3/23)remote:Counting objects:  17% (4/23)remote:Counting objects:  21% (5/23)remote:Counting objects:  26% (6/23)remote:Counting objects:  30% (7/23)remote:Counting objects:  34% (8/23)remote:Counting objects:  39% (9/23)remote:Counting objects:  43% (10/23)remote:Counting objects:  47% (11/23)remote:Counting objects:  52% (12/23)remote:Counting objects:  56% (13/23)remote:Counting objects:  60% (14/23)remote:Counting objects:  65% (15/23)remote:Counting objects:  69% (16/23)remote:Counting objects:  73% (17/23)remote:Counting objects:  78% (18/23)remote:Counting objects:  82% (19/23)remote:Counting objects:  86% (20/23)remote:Counting objects:  91% (21/23)remote:Counting objects:  95% (22/23)remote:Counting objects: 100% (23/23)remote:Counting objects: 100% (23/23), done.remote:Compressing objects:   7% (1/13)remote:Compressing objects:  15% (2/13)remote:Compressing objects:  23% (3/13)remote:Compressing objects:  30% (4/13)remote:Compressing objects:  38% (5/13)remote:Compressing objects:  46% (6/13)remote:Compressing objects:  53% (7/13)remote:Compressing objects:  61% (8/13)remote:Compressing objects:  69% (9/13)remote:Compressing objects:  76% (10/13)remote:Compressing objects:  84% (11/13)remote:Compressing objects:  92% (12/13)remote:Compressing objects: 100% (13/13)remote:Compressing objects: 100% (13/13), done.remote:Total 13 (delta 10), reused 2 (delta 0), pack-reused 0 (from 0)From https://github.com/python/cpython * branch                    main       -> FETCH_HEADNote:switching to '298d5440eb83f2dfd5651bac86d1592ec358d54c'.You are in 'detached HEAD' state. You can look around, make experimentalchanges and commit them, and you can discard any commits you make in thisstate without impacting any branches by switching back to a branch.If you want to create a new branch to retain commits you create, you maydo so (now or later) by using -c with the switch command. Example:  git switch -c <new-branch-name>Or undo this operation with:  git switch -Turn off this advice by setting config variable advice.detachedHead to falseHEAD is now at 298d5440eb8 gh-143706: Fix sys.argv not set during multiprocessing forkserver `__main__` preload (#143717)Switched to and reset branch 'main'make:*** [buildbottest] Error 2

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotARM64 macOS 3.x (tier-2) has failed when building commit298d544.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/725/builds/12532) and take a look at the build logs.
  4. Check if the failure is related to this commit (298d544) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/725/builds/12532

Failed tests:

  • test_urllib2net

Summary of the results of the build (if available):

==

Click to see traceback logs
Note:switching to '298d5440eb83f2dfd5651bac86d1592ec358d54c'.You are in 'detached HEAD' state. You can look around, make experimentalchanges and commit them, and you can discard any commits you make in thisstate without impacting any branches by switching back to a branch.If you want to create a new branch to retain commits you create, you maydo so (now or later) by using -c with the switch command. Example:  git switch -c <new-branch-name>Or undo this operation with:  git switch -Turn off this advice by setting config variable advice.detachedHead to falseHEAD is now at 298d5440eb8 gh-143706: Fix sys.argv not set during multiprocessing forkserver `__main__` preload (#143717)Switched to and reset branch 'main'make:*** [buildbottest] Error 2

gpshead added a commit to gpshead/cpython that referenced this pull requestJan 14, 2026
…orkserver `__main__` preload (pythonGH-143717)The forkserver was not passing sys.argv to its main() function, causingsys.argv to be empty during `__main__` module import in child processes. Thisfixes a non-obvious regression inadvertently introduced by thepythongh-126631 mainpreloading fix.(cherry picked from commit298d544)
@bedevere-app
Copy link

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

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelJan 14, 2026
gpshead added a commit that referenced this pull requestJan 14, 2026
…ver `__main__` preload (GH-143717) (#143821)The forkserver was not passing sys.argv to its main() function, causingsys.argv to be empty during `__main__` module import in child processes. Thisfixes a non-obvious regression inadvertently introduced by thegh-126631 mainpreloading fix.(cherry picked from commit298d544)
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotARM64 MacOS M1 Refleaks NoGIL 3.13 (tier-2) has failed when building commit480f480.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1396/builds/1955) and take a look at the build logs.
  4. Check if the failure is related to this commit (480f480) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1396/builds/1955

Failed tests:

  • test.test_multiprocessing_forkserver.test_processes

Failed subtests:

  • test_repr_rlock - test.test_multiprocessing_forkserver.test_processes.WithProcessesTestLock.test_repr_rlock

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/_test_multiprocessing.py", line1493, intest_repr_rlockself.assertEqual('<RLock(SomeOtherThread, nonzero)>',repr(lock))~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError:'<RLock(SomeOtherThread, nonzero)>' != '<RLock(None, 0)>'- <RLock(SomeOtherThread, nonzero)>+ <RLock(None, 0)>

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@duanegduanegduaneg left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

@gpsheadgpshead

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@gpshead@bedevere-bot@duaneg

[8]ページ先頭

©2009-2026 Movatter.jp