Scripts: terminate the title process tree when a smoke run times out #1073

Open
github-bot wants to merge 1 commit from github-bot/gh-1073 into main AGit
Owner

@⁠storrmzz on GitHub · 2026-11-24 11:18 UTC · original
storrmzz:scripts/smoke-timeout-process-tree → main · +161 −1 · 4 files · 1 commits · open

When a smoke run times out, killing only the launcher leaves the title child alive with inherited output pipes. The subsequent ReadToEndAsync result can then wait indefinitely. Terminate the process tree with Windows taskkill /T /F and bound the post-timeout waits; report a termination failure instead of hanging.

What is in it

  • scripts/smoke.ps1: terminate the title's process tree on timeout, compatible with Windows PowerShell 5.1.
  • scripts/smoke-timeout.tests.ps1: synthetic native parent/child processes exercise normal exit, timeout cleanup, failed termination and unclosed pipes. A private script copy shortens the grace period to five seconds.
  • CI runs the regression under PowerShell 5.1 and 7; README documents it.

Tested

  • Commit a95661e6fc063b139a59a6ff0d0c3eadef399001. Windows 11 build 26300, Ryzen 7 8840HS, Radeon 780M (driver 32.0.31033.3); rustc 1.100.0 MSVC, debug, Windows SDK 10.0.26100.0 / DXC 1.9.2602.17.
  • cargo build --locked --workspace --jobs 2: passed.
  • cargo test --locked --workspace --no-fail-fast --jobs 2 -- --test-threads=4: 741 passed, 0 failed, 41 ignored; 0 SKIPPED GPU tests. Includes the synthetic title e2e run.
  • powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/smoke-timeout.tests.ps1: 4 passed (5.1.26100.9818). Same command with pwsh: 4 passed (7.6.9).
  • The regression against the original smoke script at 384f7f7: normal exit passes, timeout fails in both shells because the script never returns. Fixture processes are cleaned up.
  • python -B -m unittest discover -s scripts -p 'test_*.py' -v: 9 passed; existing native-stderr script test passes in both shells; git diff --check passes.

Regression run
No runtime changes: scripts, CI and README only.

Not tested
Retail titles and optional XCL_SAMPLE_* inputs (all unset), the 41 ignored diagnostic tests, other GPUs, and Wine. File-dependent tests that return early without samples are not retail coverage.

AI use
This PR was created with AI assistance from OpenAI Codex (GPT-6).

**@⁠storrmzz** on GitHub · 2026-11-24 11:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/1073) `storrmzz:scripts/smoke-timeout-process-tree` → `main` · +161 −1 · 4 files · 1 commits · open When a smoke run times out, killing only the launcher leaves the title child alive with inherited output pipes. The subsequent ReadToEndAsync result can then wait indefinitely. Terminate the process tree with Windows taskkill /T /F and bound the post-timeout waits; report a termination failure instead of hanging. **What is in it** - `scripts/smoke.ps1`: terminate the title's process tree on timeout, compatible with Windows PowerShell 5.1. - `scripts/smoke-timeout.tests.ps1`: synthetic native parent/child processes exercise normal exit, timeout cleanup, failed termination and unclosed pipes. A private script copy shortens the grace period to five seconds. - CI runs the regression under PowerShell 5.1 and 7; README documents it. **Tested** - Commit `a95661e6fc063b139a59a6ff0d0c3eadef399001`. Windows 11 build 26300, Ryzen 7 8840HS, Radeon 780M (driver 32.0.31033.3); rustc 1.100.0 MSVC, debug, Windows SDK 10.0.26100.0 / DXC 1.9.2602.17. - `cargo build --locked --workspace --jobs 2`: passed. - `cargo test --locked --workspace --no-fail-fast --jobs 2 -- --test-threads=4`: **741 passed, 0 failed, 41 ignored; 0 SKIPPED GPU tests**. Includes the synthetic title e2e run. - `powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/smoke-timeout.tests.ps1`: 4 passed (5.1.26100.9818). Same command with `pwsh`: 4 passed (7.6.9). - The regression against the original smoke script at `384f7f7`: normal exit passes, timeout fails in both shells because the script never returns. Fixture processes are cleaned up. - `python -B -m unittest discover -s scripts -p 'test_*.py' -v`: 9 passed; existing native-stderr script test passes in both shells; `git diff --check` passes. **Regression run** No runtime changes: scripts, CI and README only. **Not tested** Retail titles and optional `XCL_SAMPLE_*` inputs (all unset), the 41 ignored diagnostic tests, other GPUs, and Wine. File-dependent tests that return early without samples are not retail coverage. **AI use** This PR was created with AI assistance from OpenAI Codex (GPT-6).
The smoke timeout killed only the launcher. Its title child could keep running and hold inherited output pipes open, leaving ReadToEndAsync blocked. Terminate the tree with taskkill /T and bound the post-timeout waits. Cover normal exit, timeout cleanup, termination failure and open pipes under Windows PowerShell 5.1 and PowerShell 7.

Assisted-by: OpenAI Codex (GPT-6)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:42:34 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 14:15 UTC · original

Tested exact head a95661e, script tests only, since this PR has no test report yet.

Tested

  • Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here).
  • powershell.exe -NoProfile -File scripts/smoke-timeout.tests.ps1 at the head: exit 0, PASS normal, PASS timeout, PASS failure, PASS open-pipes (31 s).
  • The PR's test file(s) against current main's script (930e8b4): exit 1: PASS normal, then timeout: smoke.ps1 did not return after the deadline., so the test reproduces the hang on main's smoke.ps1. So the new test catches the problem the PR fixes.

Not tested

  • PowerShell 7, the CI workflow itself, a game (no runtime code changed).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 14:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/1073#issuecomment-7134079262) Tested exact head `a95661e`, script tests only, since this PR has no test report yet. **Tested** - Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here). - `powershell.exe -NoProfile -File scripts/smoke-timeout.tests.ps1` at the head: exit 0, `PASS normal`, `PASS timeout`, `PASS failure`, `PASS open-pipes` (31 s). - The PR's test file(s) against current main's script (`930e8b4`): exit 1: `PASS normal`, then `timeout: smoke.ps1 did not return after the deadline.`, so the test reproduces the hang on main's `smoke.ps1`. So the new test catches the problem the PR fixes. **Not tested** - PowerShell 7, the CI workflow itself, a game (no runtime code changed). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 08:51 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 08:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/1073#issuecomment-7157557998) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1073/head:github-bot/gh-1073'
git switch 'github-bot/gh-1073'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1073'
git switch 'github-bot/gh-1073'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1073'
git switch 'github-bot/gh-1073'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1073'
git switch 'main'
git merge --squash 'github-bot/gh-1073'
git switch 'main'
git merge --ff-only 'github-bot/gh-1073'
git switch 'main'
git merge 'github-bot/gh-1073'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.