Skip to content

subint_forkserver: test_nested_multierrors cancel-cascade hang gated by pytest --capture=fd #449

@goodboy

Description

@goodboy

tests/test_cancellation.py::test_nested_multierrors[subint_forkserver]
hangs the full multi-level (root → spawner → grandchild → errorer)
cancel cascade under --spawn-backend=subint_forkserver. Several
fixes landed during PR #447 closed earlier layers of the bug — FD
hygiene via _close_inherited_fds, pidfd_open-based
_ForkedProc.wait, _parent_chan_cs shielded-loop wiring, bounded
wait_for_no_more_peers — but the final-gate behavior was
empirically traced to pytest's own --capture=fd stdout/stderr pipe
filling under the high error-traceback volume of the test; only
pytest -s makes the test pass cleanly. The skip-mark
skipon_spawn_backend('subint_forkserver') remains on the test.

Open follow-ups

  • Decide whether to redirect subactor stdout/stderr to /dev/null
    (or a session-scoped log file) in the fork-child prelude, OR
    document pytest -s (or --capture=sys) as required for
    multi-level forkserver-backend tests.
  • Identify whether any unbounded wait remains above async_main in
    the teardown cascade once the capture-pipe gate is bypassed.

See also

ai/conc-anal/subint_forkserver_test_cancellation_leak_issue.md
— full multi-session post-mortem with the cascade-tree view and the
"VERY late: pytest capture pipe is the final gate" finding.


Tracked from #379 (subint umbrella).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions