Scripts: smoke.ps1 reads the log of a run it killed on timeout #1270

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

@⁠vladbondarenko97 on GitHub · 2026-11-24 14:03 UTC · original
vladbondarenko97:scripts/smoke-timeout-log → main · +77 −2 · 2 files · 1 commits · open

xcl run prints Log: only when it ends (launcher.rs). So when smoke.ps1 kills a run on its timeout (-Seconds + 120 s), the line is never there, and the script throws XCL printed no log path instead of printing the block with exit: killed (no exit). That branch of the script could not be reached. A title hits it when it stops responding after an unhandled exception: on an RTX 3080 Ti the retail title did this at the world load (0xc0000005 at +0x2215c35, then no exit for 20 min), so the run that most needed a block got none.

On a timeout, the log is now taken from the data: folder that the launcher prints at its start (<data>\logs\xcl.log, as Config::logs_dir). A run that ends by itself without Log: still throws, as before.

This does not overlap #1073 (it ends the process tree so the timeout returns at all) and complements it: with #1073, a timed-out run still has no Log: line.

What is in it

  • scripts/smoke.ps1: on a timeout, fall back to <data>\logs\xcl.log when Log: is missing.
  • scripts/smoke-timeout-log.tests.ps1: runs a private copy of smoke.ps1 with a 3 s deadline against a compiled stand-in that prints XCL's start lines and hangs, then checks the block (exit: killed (no exit), presents, peak commit from the synthetic log). No game files or GPU needed.

Tested

  • RTX 3080 Ti 12 GB (driver 32.0.16.1060), i7-12700KF, Windows 11 Pro 26300, rustc 1.100.0, debug, Windows PowerShell 5.1. Tree: this branch = main 930e8b4 + this commit.
  • scripts\smoke-timeout-log.tests.ps1 against main's smoke.ps1: fails with XCL printed no log path; its output: XCL 0.0.0 - starting 'synthetic' (exit 1). Against this branch: smoke timeout log: 1 passed (exit 0).
  • The same two runs under PowerShell 7.7.0 (pwsh -NoProfile -File scripts\smoke-timeout-log.tests.ps1): main fails with XCL printed no log path (exit 1); this branch: smoke timeout log: 1 passed (exit 0).
  • cargo build --workspace then cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 41 ignored; SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64).

Regression run
Not needed: scripts only.

Not tested

  • AMD.
  • Together with #1073 applied: the two touch different lines; not run as a stack.

AI use

  • Claude Code with Claude Opus 5.5: found the cause from a real run, wrote the change, the test and this description, and ran the tests on my machine. I reviewed the diff.
**@⁠vladbondarenko97** on GitHub · 2026-11-24 14:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/1270) `vladbondarenko97:scripts/smoke-timeout-log` → `main` · +77 −2 · 2 files · 1 commits · open `xcl run` prints `Log:` only when it ends (`launcher.rs`). So when `smoke.ps1` kills a run on its timeout (`-Seconds` + 120 s), the line is never there, and the script throws `XCL printed no log path` instead of printing the block with `exit: killed (no exit)`. That branch of the script could not be reached. A title hits it when it stops responding after an unhandled exception: on an RTX 3080 Ti the retail title did this at the world load (`0xc0000005` at `+0x2215c35`, then no exit for 20 min), so the run that most needed a block got none. On a timeout, the log is now taken from the `data:` folder that the launcher prints at its start (`<data>\logs\xcl.log`, as `Config::logs_dir`). A run that ends by itself without `Log:` still throws, as before. This does not overlap #1073 (it ends the process tree so the timeout returns at all) and complements it: with #1073, a timed-out run still has no `Log:` line. **What is in it** - `scripts/smoke.ps1`: on a timeout, fall back to `<data>\logs\xcl.log` when `Log:` is missing. - `scripts/smoke-timeout-log.tests.ps1`: runs a private copy of `smoke.ps1` with a 3 s deadline against a compiled stand-in that prints XCL's start lines and hangs, then checks the block (`exit: killed (no exit)`, presents, peak commit from the synthetic log). No game files or GPU needed. **Tested** - RTX 3080 Ti 12 GB (driver 32.0.16.1060), i7-12700KF, Windows 11 Pro 26300, rustc 1.100.0, debug, Windows PowerShell 5.1. Tree: this branch = `main` `930e8b4` + this commit. - `scripts\smoke-timeout-log.tests.ps1` against `main`'s `smoke.ps1`: **fails** with `XCL printed no log path; its output: XCL 0.0.0 - starting 'synthetic'` (exit 1). Against this branch: `smoke timeout log: 1 passed` (exit 0). - The same two runs under **PowerShell 7.7.0** (`pwsh -NoProfile -File scripts\smoke-timeout-log.tests.ps1`): `main` fails with `XCL printed no log path` (exit 1); this branch: `smoke timeout log: 1 passed` (exit 0). - `cargo build --workspace` then `cargo test --workspace -- --test-threads=4`: **751 passed, 0 failed, 41 ignored**; SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64). **Regression run** Not needed: scripts only. **Not tested** - AMD. - Together with #1073 applied: the two touch different lines; not run as a stack. **AI use** - Claude Code with Claude Opus 5.5: found the cause from a real run, wrote the change, the test and this description, and ran the tests on my machine. I reviewed the diff.
`xcl run` prints `Log:` only when it ends, so a run that smoke.ps1 kills
after `-Seconds` + 120 s never has that line, and the script threw
"XCL printed no log path" instead of printing the block with
`exit: killed (no exit)`. That branch could not be reached. It is the
case a title hits when it stops responding after an unhandled exception
(seen on an RTX 3080 Ti on the retail title at the world load).

On a timeout the log is taken from the `data:` folder the launcher prints
at its start (`<data>\logs\xcl.log`, Config::logs_dir). A run that ends by
itself without `Log:` still fails as before.

scripts/smoke-timeout-log.tests.ps1 runs a private copy of smoke.ps1 with
a short deadline against a stand-in that prints the start lines and
hangs; it fails on the old script with "XCL printed no log path".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:49:01 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 14:07 UTC · original

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

  • scripts/smoke-timeout-log.tests.ps1: 1 passed, 0 failed.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 14:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/1270#issuecomment-7133882391) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - scripts/smoke-timeout-log.tests.ps1: 1 passed, 0 failed. Thanks!
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 15:06 UTC · original · edited 2026-11-25 15:13 UTC

Tested the script combination listed under Not tested. On 5e4d91a7fe2c1bf2aa7c04bbafbe098f2e3ebbb3, scripts/smoke-timeout-log.tests.ps1 passed independently in Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. I then applied only the scripts/smoke.ps1 diff from #1073 (a95661e6fc) to a temporary copy. It applied cleanly. Both upstream scripts, smoke-timeout-log.tests.ps1 and smoke-timeout.tests.ps1, passed against the combined script in each shell, including the normal, timeout, failed termination and open-pipe cases.

For the combined failure mode, I adapted #1073’s synthetic fixture to print only the startup data: line, write a 2,345 MB marker in logs/xcl.log, then wait on a child that inherits the output pipes. With the fixture’s five-second deadline, the smoke block reported exit: killed (no exit) and peak commit: 2345 MB. The fixture checked that both recorded PIDs had exited. This passed in each shell under normal Windows process permissions. An initial restricted-session run reached the fixture’s open-pipe assertion, so these results do not establish cleanup in that restricted environment.

Windows 11 26100.9711, i7-13700, RTX 4060. This was a two-script integration test with shortened deadlines, no retail run or Rust/GPU suite. OpenAI Codex (GPT-6) assembled the stack, ran both fixtures and wrote the report.

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 15:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/1270#issuecomment-7166314948) · edited 2026-11-25 15:13 UTC Tested the script combination listed under **Not tested**. On `5e4d91a7fe2c1bf2aa7c04bbafbe098f2e3ebbb3`, `scripts/smoke-timeout-log.tests.ps1` passed independently in Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. I then applied only the `scripts/smoke.ps1` diff from #1073 (`a95661e6fc`) to a temporary copy. It applied cleanly. Both upstream scripts, `smoke-timeout-log.tests.ps1` and `smoke-timeout.tests.ps1`, passed against the combined script in each shell, including the normal, timeout, failed termination and open-pipe cases. For the combined failure mode, I adapted #1073’s synthetic fixture to print only the startup `data:` line, write a 2,345 MB marker in `logs/xcl.log`, then wait on a child that inherits the output pipes. With the fixture’s five-second deadline, the smoke block reported `exit: killed (no exit)` and `peak commit: 2345 MB`. The fixture checked that both recorded PIDs had exited. This passed in each shell under normal Windows process permissions. An initial restricted-session run reached the fixture’s open-pipe assertion, so these results do not establish cleanup in that restricted environment. Windows 11 26100.9711, i7-13700, RTX 4060. This was a two-script integration test with shortened deadlines, no retail run or Rust/GPU suite. OpenAI Codex (GPT-6) assembled the stack, ran both fixtures and wrote the report.
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/1270/head:github-bot/gh-1270'
git switch 'github-bot/gh-1270'

Merge

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