Skip to content

[3.15] Fix _PyThreadState_ResumeDetached() assertion with attach waiters - #159372

Merged
nascheme merged 1 commit into
python:3.15from
nascheme:fix-resume-detached-3.15
Oct 13, 2026
Merged

nascheme merged 1 commit into
python:3.15from
nascheme:fix-resume-detached-3.15

Conversation

@nascheme

@nascheme nascheme commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Make _PyThreadState_ResumeDetached() waiter-aware and use it from start_the_world(), matching main branch. Remove tstate_resume().

This fixes a broken backport and should fix broken CI tests. The backport PR is GH-158186.

Make _PyThreadState_ResumeDetached() waiter-aware and use it from
start_the_world(), matching main branch.  Remove tstate_resume().
@nascheme
nascheme marked this pull request as ready for review October 13, 2026 18:58
@nascheme
nascheme merged commit ef498e0 into python:3.15 Oct 13, 2026
59 checks passed
@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot aarch64 CentOS9 3.15 (tier-1) has failed when building commit ef498e0.

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/2176/builds/396) and take a look at the build logs.
  4. Check if the failure is related to this commit (ef498e0) 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/2176/builds/396

Failed tests:

  • test_cext

Failed subtests:

  • test_build - test.test_cext.TestPublicC.test_build

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/Lib/test/test_cext/runtests.py", line 68, in <module>
    main()
    ~~~~^^
  File "/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/Lib/test/test_cext/runtests.py", line 62, in main
    raise AssertionError(f'Tests leaked {diff} references')
AssertionError: Tests leaked 1 references
ERROR


Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/Lib/test/test_cext/__init__.py", line 114, in test_build
    self.check_build('_test_cext')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/Lib/test/test_cext/__init__.py", line 106, in check_build
    run_cmd('Tests', cmd)
    ~~~~~~~^^^^^^^^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/Lib/test/test_cext/__init__.py", line 81, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/Lib/subprocess.py", line 692, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ['/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/build_oot/build/test_python_2529270æ/tempcwd/env/bin/python', '-X', 'dev', '/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/Lib/test/test_cext/runtests.py', '_test_cext'] returned non-zero exit status 1.


Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/Lib/test/test_cext/__init__.py", line 114, in test_build
    self.check_build('_test_cext')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/Lib/test/test_cext/__init__.py", line 106, in check_build
    run_cmd('Tests', cmd)
    ~~~~~~~^^^^^^^^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/Lib/test/test_cext/__init__.py", line 81, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/Lib/subprocess.py", line 692, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ['/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/build_oot/build/test_python_2571427æ/tempcwd/env/bin/python', '-X', 'dev', '/var/lib/buildbot/worker/cstratak-CentOS9-aarch64/3.15.cstratak-CentOS9-aarch64/build/Lib/test/test_cext/runtests.py', '_test_cext'] returned non-zero exit status 1.

@nascheme

nascheme commented Oct 13, 2026 •

Copy link
Copy Markdown
Member Author

This PR should fix GH-159373.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants