Closed
Description
Bug report
Seen in https://github.com/python/cpython/actions/runs/12082953758/job/33695120037?pr=127399
======================================================================
FAIL: test_start_new_thread_failed (test.test_threading.ThreadTests.test_start_new_thread_failed)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/admin/actions-runner/_work/cpython/cpython/Lib/test/test_threading.py", line 1201, in test_start_new_thread_failed
_, out, err = assert_python_ok("-u", "-c", code)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/Users/admin/actions-runner/_work/cpython/cpython/Lib/test/support/script_helper.py", line 182, in assert_python_ok
return _assert_python(True, *args, **env_vars)
File "/Users/admin/actions-runner/_work/cpython/cpython/Lib/test/support/script_helper.py", line 167, in _assert_python
res.fail(cmd_line)
~~~~~~~~^^^^^^^^^^
File "/Users/admin/actions-runner/_work/cpython/cpython/Lib/test/support/script_helper.py", line 80, in fail
raise AssertionError(f"Process return code is {exitcode}\n"
...<10 lines>...
f"---")
AssertionError: Process return code is -6 (SIGABRT)
command line: ['/Users/admin/actions-runner/_work/cpython/cpython/python.exe', '-X', 'faulthandler', '-I', '-u', '-c', 'if 1:\n import resource\n import _thread\n\n def f():\n print("shouldn\'t be printed")\n\n limits = resource.getrlimit(resource.RLIMIT_NPROC)\n [_, hard] = limits\n resource.setrlimit(resource.RLIMIT_NPROC, (0, hard))\n\n try:\n _thread.start_new_thread(f, ())\n except RuntimeError:\n print(\'ok\')\n else:\n print(\'!skip!\')\n ']