Skip to content

test(protocols): the #1428 deadline test can hang and take down its xdist worker #1889

Closed

Description

@JarryShaw

tests/protocols/test_option_generator_deadline_scale_1428_unit.py::GeneratorDeadlineScaleTests::test_a_hang_is_still_recorded_as_timeout_naming_the_scaled_deadline took down its xdist worker on #1882's Python 3.12 job (117297215943). The log reads [gw2] node down: Not properly terminated and then worker 'gw2' crashed while running that test. #1882 adds typing stubs and annotations only, so the failure is unrelated to it.

The test arms a 1-second SIGALRM deadline (scale 0.5 × 2s) around a case that spins, and expects roundtrip to record 'TIMEOUT'. The job took 22 minutes against about 9 for the same leg on other PRs. That fits a spin the alarm never interrupted, left running until pytest-timeout's 900-second thread-method backstop (pyproject.toml:409-410) ended the worker. This mechanism is an inference from the timing and has not been reproduced.

Fix: find why the alarm can fail to interrupt the spin under xdist, then make the test bounded however the alarm is delivered, for example by having the spin give up after a few seconds. Add a test that would catch an unbounded spin, and check that it fails without the fix.

Activity

  1. added
    testPull requests that add or correct tests (test: subject prefix)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 17, 2026
  2. added 3 commits that reference this issue on Oct 17, 2026
  3. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 17, 2026
  4. added 2 commits that reference this issue on Oct 17, 2026
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

    testPull requests that add or correct tests (test: subject prefix)

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions