Skip to content

tests: intermittent Windows timeout in contained guest runner adversarial oracle #1321

Open

Description

Summary

The Windows adversarial test
AdversarialOracleTests.test_contained_guest_runner_timeout_kills_descendants
intermittently errors with:

TimeoutError: guest workload did not finish within 0.5s

The test expects RuntimeError matching did not finish, while the deadline
branch in scripts/nvx_tools/benchmark.py can raise TimeoutError.
An independent rerun of both the individual test and the complete suite passed
without changing code, assertions, deadlines, or skips. This is a report of an
intermittent failure, not a deterministic reproducer or a claim that its cause
has been fixed.

Environment and observed sequence

  • Native Windows 11 x64, build 26300; CPython 3.14.9 x64.
  • Observed while validating a local rebase of activation: keep only guest-applied settings in record v2 #1311, at 96a8494e
    (not yet published). The named test uses a synthetic Python subprocess tree,
    not a real guest VM.
  • In the complete Windows validate-nvx inventory, the preceding 1,818 unit
    tests passed. The subsequent adversarial suite ran all 84 tests and ended
    with one error and 11 platform skips.
  • The error was in the contained-guest timeout test. Its following
    descendant-exit assertion was not reached on that failed run.
  • A fresh process then passed the individual test in 0.522s. Another fresh
    process passed the complete 84-test suite in 8.568s, with exactly the same
    11 skip names and reasons. Source files and Python version were unchanged.

How to run

From the NVX repository root in PowerShell, using a native Windows Python
environment with the repository's development dependencies:

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements-dev.txt

Run the individual test:

.\.venv\Scripts\python.exe scripts\test_adversarial.py -v AdversarialOracleTests.test_contained_guest_runner_timeout_kills_descendants

Run the complete surrounding suite:

.\.venv\Scripts\python.exe scripts\test_adversarial.py -v

To match the original broader context, run the Validate NVX CLI on Windows
command inventory in
validate-nvx/action.yml.
That inventory runs the main Python unit tests before invoking the adversarial
suite above. These are local test commands, not a request to dispatch CI.
Use any compilation-admission wrapper required by the local environment.

The standalone commands may pass: no reliable trigger has been isolated.
When reporting another occurrence, retain the exact checkout, Python version,
full traceback, suite order, and whether the individual test and full suite
were run in separate processes.

Actual failure

ERROR: test_contained_guest_runner_timeout_kills_descendants
  scripts/test_adversarial.py:869
    with self.assertRaisesRegex(RuntimeError, "did not finish"):
  scripts/nvx_tools/benchmark.py:2886
    raise TimeoutError(f"guest workload did not finish within {timeout:g}s")
TimeoutError: guest workload did not finish within 0.5s

Ran 84 tests in 11.133s
FAILED (errors=1, skipped=11)

Expected behavior and scope

The test should consistently verify timeout containment and descendant
termination across the existing error paths. Keep the measured 0.5s workload
deadline, descendant-exit/cleanup assertions, and platform skip set intact.
Do not conceal the failure by skipping the test or relaxing its deadline.

This issue documents the observation and rerun instructions; no test or
production changes are included. Shared fixture work is being coordinated
with #1278. The closed Linux containment/reaping report #320 is related
background, not evidence that these Windows observations have the same cause.

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

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions