Skip to content

gh-161805: Match -arch ARG at the end of the string too - #162097

Merged
ned-deily merged 1 commit into
python:mainfrom
jmarshall:archflags
Nov 30, 2026
Merged

ned-deily merged 1 commit into
python:mainfrom
jmarshall:archflags

Conversation

@jmarshall

@jmarshall jmarshall commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Drop the following \s so the -arch argument matches before either whitespace or end-of-string. Replace with '' (rather than ' ') correspondingly, to preserve existing rewriting behaviour.

Drop the following \s so the -arch argument matches before either
whitespace or end-of-string. Replace with '' (rather than ' ')
correspondingly, to preserve existing rewriting behaviour.

@ned-deily ned-deily left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The PR looks good. Thanks, @jmarshall!

@ned-deily
ned-deily merged commit 21f63a8 into python:main Nov 30, 2026
60 checks passed
@ned-deily ned-deily added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Nov 30, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @jmarshall for the PR, and @ned-deily for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @jmarshall for the PR, and @ned-deily for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Nov 30, 2026

Copy link
Copy Markdown

GH-162854 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 30, 2026
@bedevere-app

bedevere-app Bot commented Nov 30, 2026

Copy link
Copy Markdown

GH-162855 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Nov 30, 2026
@jmarshall

jmarshall commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

I realise this issue was discovered a few weeks after the 3.13 branch switched to security support, but is there a case to apply this fix to that branch too? People will continue to build packages for 3.13, and at present 3.13 will be soon be the only release that will continue to exhibit this problem.

@ned-deily

Copy link
Copy Markdown
Member

I realise this issue was discovered a few weeks after the 3.13 branch switched to security support, but is there a case to apply this fix to that branch too? People will continue to build packages for 3.13, and at present 3.13 will be soon be the only release that will continue to exhibit this problem.

While the risk of breaking anything is quite small, our policy on what gets backported to branches in the security-fix-only phase is pretty clear. It would be up to the 3.13 release manager to grant an exception. @Yhg1s?

ned-deily pushed a commit that referenced this pull request Nov 30, 2026
…162097) (#162855)

Drop the following \s so the -arch argument matches before either
whitespace or end-of-string. Replace with '' (rather than ' ')
correspondingly, to preserve existing rewriting behaviour.
(cherry picked from commit 21f63a8)
Co-authored-by: John Marshall <jmarshall@hey.com>
ned-deily pushed a commit that referenced this pull request Nov 30, 2026
…162097) (#162854)

Drop the following \s so the -arch argument matches before either
whitespace or end-of-string. Replace with '' (rather than ' ')
correspondingly, to preserve existing rewriting behaviour.
(cherry picked from commit 21f63a8)
Co-authored-by: John Marshall <jmarshall@hey.com>
@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 CentOS9 NoGIL Refleaks 3.15 (tier-1) has failed when building commit 54639dc.

What do you need to do:

  1. Don't panic.
  2. Check the 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/2078/builds/699) and take a look at the build logs.
  4. Check if the failure is related to this commit (54639dc) 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/2078/builds/699

Failed tests:

  • test_multiprocessing_fork.test_processes

Failed subtests:

  • test_interrupt - test.test_multiprocessing_fork.test_processes.WithProcessesTestProcess.test_interrupt

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/contextlib.py", line 116, in inner
    return func(*args, **kwds)
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/test/_test_multiprocessing.py", line 650, in test_interrupt
    exitcode = self._kill_process(multiprocessing.Process.interrupt)
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/contextlib.py", line 116, in inner
    return func(*args, **kwds)
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/test/_test_multiprocessing.py", line 631, in _kill_process
    self.assertEqual(join(), None)
                     ~~~~^^
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/test/_test_multiprocessing.py", line 304, in __call__
    return self.func(*args, **kwds)
           ~~~~~~~~~^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/multiprocessing/process.py", line 156, in join
    res = self._popen.wait(timeout)
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/multiprocessing/popen_fork.py", line 44, in wait
    return self.poll(os.WNOHANG if timeout == 0.0 else 0)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/multiprocessing/popen_fork.py", line 28, in poll
    pid, sts = os.waitpid(self.pid, flag)
               ~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/test/_test_multiprocessing.py", line 627, in handler
    raise RuntimeError(f'join took longer than {timeout} seconds: {p}')
RuntimeError: join took longer than 67.5 seconds: <Process name='Process-540' pid=3439115 parent=3428482 started daemon>


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/multiprocessing/process.py", line 320, in _bootstrap
    self.run()
    ~~~~~~~~^^
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/test/_test_multiprocessing.py", line 578, in _sleep_some_event
    time.sleep(100)
    ~~~~~~~~~~^^^^^
KeyboardInterrupt
k


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/contextlib.py", line 116, in inner
    return func(*args, **kwds)
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/test/_test_multiprocessing.py", line 650, in test_interrupt
    exitcode = self._kill_process(multiprocessing.Process.interrupt)
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/contextlib.py", line 116, in inner
    return func(*args, **kwds)
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/test/_test_multiprocessing.py", line 631, in _kill_process
    self.assertEqual(join(), None)
                     ~~~~^^
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/test/_test_multiprocessing.py", line 304, in __call__
    return self.func(*args, **kwds)
           ~~~~~~~~~^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/multiprocessing/process.py", line 156, in join
    res = self._popen.wait(timeout)
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/multiprocessing/popen_fork.py", line 44, in wait
    return self.poll(os.WNOHANG if timeout == 0.0 else 0)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/multiprocessing/popen_fork.py", line 28, in poll
    pid, sts = os.waitpid(self.pid, flag)
               ~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.itamaro-centos-aws.refleak.nogil/build/Lib/test/_test_multiprocessing.py", line 627, in handler
    raise RuntimeError(f'join took longer than {timeout} seconds: {p}')
RuntimeError: join took longer than 67.5 seconds: <Process name='Process-1' pid=3858601 parent=3858570 started daemon>

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants