Skip to content

test_asyncio.test_unix_events: test_fork_signal_handling() fails randomly on Linux/macOS #109582

Closed
@vstinner

Description

@vstinner
FAIL: test_fork_signal_handling (test.test_asyncio.test_unix_events.TestFork.test_fork_signal_handling)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/unittest/async_case.py", line 90, in _callTestMethod
    if self._callMaybeAsync(method) is not None:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/cpython/cpython/Lib/unittest/async_case.py", line 117, in _callMaybeAsync
    return self._asyncioTestContext.run(func, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/cpython/cpython/Lib/test/support/hashlib_helper.py", line 49, in wrapper
    return func_or_class(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/cpython/cpython/Lib/test/test_asyncio/test_unix_events.py", line 1937, in test_fork_signal_handling
    self.assertTrue(child_handled.is_set())
AssertionError: False is not true

build: https://github.com/python/cpython/actions/runs/6237986497/job/16932828971

Passed when re-run:

Re-running test.test_asyncio.test_unix_events in verbose mode (matching: test_fork_signal_handling)
test_fork_signal_handling (test.test_asyncio.test_unix_events.TestFork.test_fork_signal_handling) ... /Users/runner/work/cpython/cpython/Lib/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=14768) is multi-threaded, use of fork() may lead to deadlocks in the child.
  self.pid = os.fork()
ok

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions