Skip to content

test_start_new_thread_failed flaky: failed on macOS (free threading) #127421

Description

@colesbury

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        ']

Linked PRs

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions