Scripts: terminate the title process tree when a smoke run times out #1065
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1073"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by storrmzz on 2026-11-24T11:18:41Z.
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 deadline to five seconds.Tested
Current validation (2026-11-30)
a042f77c5f10dd5fb46479f5a24bef205823ad38, rebased onto main9dfbe3ea6653a9c76ef3ea0d66187a4b5407483bwithout conflicts. No Rust or runtime changes in this PR.Build and test (Windows, no GPU)and both PowerShell smoke-timeout jobs. Runner GPU/sample skips are not retail coverage../scripts/test.ps1 --nocapture --skip test_title_runs_and_game_folder_is_untouched: 2885 passed, 0 failed, 51 ignored across 43 Cargo test/doc-test targets, plus 73 benchmark self-checks passed, with 289 distinct explicit SKIPPED messages. The synthetic title e2e exclusion is the existing upstream CI configuration, unchanged here.scripts/smoke-timeout.tests.ps1with-NoProfile -ExecutionPolicy Bypass -Fileunderpowershell.exeandpwsh: each 4 passed, 0 failed, 0 skipped.scripts/smoke-title.tests.ps1andscripts/test-smoke-artifacts.tests.ps1also passed in both shells.git diff --checkpassed. No new local full Rust suite run for this scripts/CI-only update.0xc0000005(STATUS_ACCESS_VIOLATION), so that suite was incomplete. The rebased head has the same file tree as that attempt's tested merge9654f79; the successful repeat did not reproduce the crash. The initial crash remains unexplained, not claimed fixed by the rebase. Main's own CI run also passed.CI workflow correction (2026-11-30)
67b9599e41ed8a3f4eb0c860864925c696c2b33a. GitHub rejected the preceding workflow before starting any jobs:Unrecognized named-value: 'matrix'at the step'sshellfield. Use literalpowershell/pwshshells on conditional steps, retaining both matrix jobs.powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/smoke-timeout.tests.ps1and the same command withpwsh: each 4 passed, 0 failed, 0 skipped.git diff --check: passed.Rebase validation (2026-11-29)
3bd548315b106e76bc5b2b149679f444d2cbfdfe, rebased onto maind8bd9a38204667f3ca7dd9eeffcc2f1c937b07b0. Same Windows PC/toolchain as below.StartupTimeoutSeconds, artifact output and newer README test/benchmark documentation; retained process-tree termination and adjusted the timeout fixture to the configurable deadline.powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/smoke-timeout.tests.ps1: 4 passed, no failures or skips. Same command withpwsh.exe: 4 passed, no failures or skips.scripts/smoke-title.tests.ps1andscripts/test-smoke-artifacts.tests.ps1: both passed under Windows PowerShell 5.1 and PowerShell 7 (all four invocations exit 0).git diff --check: passed. Full Rust workspace suite not rerun for this script-only rebase.Earlier revision results (historical; not the rebased head)
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 withpwsh: 4 passed (7.6.9).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 --checkpasses.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).
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:15:16Z.
Tested exact head
a95661e, script tests only, since this PR has no test report yet.Tested
powershell.exe -NoProfile -File scripts/smoke-timeout.tests.ps1at the head: exit 0,PASS normal,PASS timeout,PASS failure,PASS open-pipes(31 s).930e8b4): exit 1:PASS normal, thentimeout: smoke.ps1 did not return after the deadline., so the test reproduces the hang on main'ssmoke.ps1. So the new test catches the problem the PR fixes.Not tested
AI use
upstream-sync referenced this pull request2026-11-24 23:06:49 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T08:51:26Z.
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!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:40:46Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:45:32Z.
Triage (#1607) – head
a042f77#1270 also changes the timeout path of scripts/smoke.ps1, but it reads the log of the killed run; this PR kills the launcher's whole process tree (taskkill /T) so the inherited output pipes close. The two are complementary, not duplicates. #1080 rewrites the same
WaitForExit(($Seconds + $StartupTimeoutSeconds) * 1000)line, and smoke-timeout.tests.ps1 looks for that exact expression, so whichever merges second needs a rebase and a fixture update.No problems found in the diff.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.