Warm: a process that ends before it begins a pipeline blames none #1931

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

@⁠joeypercia on GitHub · 2026-11-29 03:11 UTC · original
joeypercia:warm-failed-starts → main · +133 −13 · 1 files · 1 commits · open

What it changes

When a warm process ended badly, the parent noted the first pipeline of what that process had left in warm-bad.txt and started the next process at once. A process that never began a pipeline — 0xc0000142 (DLL initialization failed), which Windows returns when the PC is out of desktop heap or other session resources — was taken for one that crashed the compiler on that pipeline. With ten workers, each failed start blamed one more pipeline and started another process straight away.

On my PC, a preload of 88,562 pipelines made 3,837, then every new process failed to start: 577 pipelines were written to warm-bad.txt in a few seconds, every one of them exit code: 0xc0000142, and the PC went down shortly after. Every later preload, and the step that fills the pipeline library, leaves those 577 out (bad.contains(key)), so they were never built ahead of a run again.

This PR:

  • has child report the pipeline the process had begun (at n, which known::make already prints before each one) and not finished, and blames only that one, wherever it lies in the rest (pipelines with no entry are passed over without a line, so it isn't always the first);
  • treats a process that ended before it began any pipeline as a failed start: no pipeline is noted, and it is started again after 2, 4, 8, 16 s; after 5 failed starts in a row the worker stops (break 'chunks) and prints that the next preload goes on with what is left. Only processes that made no pipeline count: one that made some and ended between two starts the count again and the rest goes on at once (failed_in_a_row). A process that could not be spawned at all, which before this was taken as having made its whole chunk (skipped silently), is a failed start the same way.

A process that crashes or hangs on a pipeline is still noted as before.

How it was tested

  • GPU and profile: RTX 4070 Ti 12 GB, Windows 11 26200, 32 GB RAM; not a renderer change.
  • Before: the preload above, on d4b5d51: 577 0xc0000142 lines in warm-bad.txt (all of its lines), no real compiler crash among them.
  • After: after() and pause() have unit tests (warm::tests): a process that ended at a pipeline blames that one, also when it is not the first left; one that ended before it began any blames none and is tried again; the pause grows 2, 4, 8, 16 s and stops at 30; processes that made pipelines never stop a worker, and progress after empty ones starts the count again (a_process_that_made_pipelines_is_no_failed_start, @⁠ANDREANIADS's two sequences). I did not rerun a full preload on this branch (it exhausts this PC's resources, which is how the bug showed).
  • For shader changes, the wave sizes tested: not a shader change.
  • cargo test passed for the crates it touches: yes, cargo test --locked -p victory on 1d00f27 (on main 568c5e5): 32 passed, 0 failed, and 2 passed, 0 failed.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #779 (the warm-bad.txt quarantine follows the fingerprint, and VICTORY_WARM_BAD=0 retries it; it still blames a pipeline for a process that never started) and #1923 (child's callback reports why a pipeline has no host pipeline); both edit lines next to these and will conflict textually, but neither changes how a failed start is blamed.

Written with Claude Code (Claude Opus 5.5): it found the bug in the preload output, wrote the change, the tests and this description, and ran the tests above.

**@⁠joeypercia** on GitHub · 2026-11-29 03:11 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1931) `joeypercia:warm-failed-starts` → `main` · +133 −13 · 1 files · 1 commits · open ## What it changes When a `warm` process ended badly, the parent noted the first pipeline of what that process had left in `warm-bad.txt` and started the next process at once. A process that never began a pipeline — `0xc0000142` (DLL initialization failed), which Windows returns when the PC is out of desktop heap or other session resources — was taken for one that crashed the compiler on that pipeline. With ten workers, each failed start blamed one more pipeline and started another process straight away. On my PC, a `preload` of 88,562 pipelines made 3,837, then every new process failed to start: **577 pipelines were written to `warm-bad.txt` in a few seconds, every one of them `exit code: 0xc0000142`**, and the PC went down shortly after. Every later `preload`, and the step that fills the pipeline library, leaves those 577 out (`bad.contains(key)`), so they were never built ahead of a run again. This PR: - has `child` report the pipeline the process had begun (`at n`, which `known::make` already prints before each one) and not finished, and blames only that one, wherever it lies in the rest (pipelines with no entry are passed over without a line, so it isn't always the first); - treats a process that ended before it began any pipeline as a failed start: no pipeline is noted, and it is started again after 2, 4, 8, 16 s; after 5 failed starts in a row the worker stops (`break 'chunks`) and prints that the next preload goes on with what is left. Only processes that made no pipeline count: one that made some and ended between two starts the count again and the rest goes on at once (`failed_in_a_row`). A process that could not be spawned at all, which before this was taken as having made its whole chunk (skipped silently), is a failed start the same way. A process that crashes or hangs on a pipeline is still noted as before. ## How it was tested - GPU and profile: RTX 4070 Ti 12 GB, Windows 11 26200, 32 GB RAM; not a renderer change. - Before: the `preload` above, on `d4b5d51`: 577 `0xc0000142` lines in `warm-bad.txt` (all of its lines), no real compiler crash among them. - After: `after()` and `pause()` have unit tests (`warm::tests`): a process that ended at a pipeline blames that one, also when it is not the first left; one that ended before it began any blames none and is tried again; the pause grows 2, 4, 8, 16 s and stops at 30; processes that made pipelines never stop a worker, and progress after empty ones starts the count again (`a_process_that_made_pipelines_is_no_failed_start`, @⁠ANDREANIADS's two sequences). I did not rerun a full preload on this branch (it exhausts this PC's resources, which is how the bug showed). - For shader changes, the wave sizes tested: not a shader change. - `cargo test` passed for the crates it touches: yes, `cargo test --locked -p victory` on `1d00f27` (on `main` `568c5e5`): 32 passed, 0 failed, and 2 passed, 0 failed. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #779 (the `warm-bad.txt` quarantine follows the fingerprint, and `VICTORY_WARM_BAD=0` retries it; it still blames a pipeline for a process that never started) and #1923 (`child`'s callback reports why a pipeline has no host pipeline); both edit lines next to these and will conflict textually, but neither changes how a failed start is blamed. Written with Claude Code (Claude Opus 5.5): it found the bug in the `preload` output, wrote the change, the tests and this description, and ran the tests above.
When a warm process ended badly, the first pipeline of what it had left
was noted in warm-bad.txt and the next process started at once. A process
that never began one (0xc0000142: the PC out of resources) was so taken
for a pipeline that crashes the compiler: on an RTX 4070 Ti with 32 GB,
577 pipelines were noted as bad in a few seconds, by ten workers starting
processes as fast as they failed, and every later preload and the
library step left them out.

The process now tells which pipeline it is at ("at n" before each), and
only that one is blamed. One that ended before it began any blames none
and is started again after 2, 4, 8, 16 s; after 5 in a row the worker
stops and the next preload goes on with what is left.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 03:12:25 +00:00
Author
Owner

@⁠ANDREANIADS on GitHub · 2026-11-29 03:24 UTC · original

At 36e4c8a, try a chunk [1,2,3,4,5,6] and five synthetic abnormal exits. On attempt N the reader gets at N, then made N 0 1, then EOF before the next at. In an isolated Rust replay of the reader and worker decision, no pipeline was blamed, but failed_starts reached 5 and the worker stopped with pipeline 6 pending. Four empty attempts followed by one completed pipeline also stopped the worker. Five genuinely empty attempts stopped as intended.

Could the Again branch reset the failed-start streak when made > 0 and count only attempts with zero progress toward STARTS? A regression test for the mixed sequence would cover this distinction. Tested with synthetic CPU state transitions only, without a Windows child process or GPU.

**@⁠ANDREANIADS** on GitHub · 2026-11-29 03:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1931#issuecomment-7250028618) At `36e4c8a`, try a chunk `[1,2,3,4,5,6]` and five synthetic abnormal exits. On attempt N the reader gets `at N`, then `made N 0 1`, then EOF before the next `at`. In an isolated Rust replay of the reader and worker decision, no pipeline was blamed, but `failed_starts` reached 5 and the worker stopped with pipeline 6 pending. Four empty attempts followed by one completed pipeline also stopped the worker. Five genuinely empty attempts stopped as intended. Could the `Again` branch reset the failed-start streak when `made > 0` and count only attempts with zero progress toward `STARTS`? A regression test for the mixed sequence would cover this distinction. Tested with synthetic CPU state transitions only, without a Windows child process or GPU.
github-bot force-pushed github-bot/gh-1931 from 36e4c8ac39 to b2cedf749d 2026-11-29 03:33:42 +00:00 Compare
Author
Owner

@⁠joeypercia on GitHub · 2026-11-29 03:33 UTC · original

@⁠ANDREANIADS thanks, you're right: a process that made pipelines and ended between two counted toward the five. Fixed in b2cedf7 (squashed into the PR's commit): failed_in_a_row counts only processes that made no pipeline, and one that made some starts the count again and the rest goes on at once. a_process_that_made_pipelines_is_no_failed_start checks your two sequences (five attempts with one pipeline each never stop the worker; four empty ones then one with progress reset it) next to five empty ones, which still stop it. cargo test --locked -p victory: 32 passed, 0 failed, and 2 passed, 0 failed.

(Written with Claude Code, Claude Opus 5.5.)

**@⁠joeypercia** on GitHub · 2026-11-29 03:33 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1931#issuecomment-7250120701) @⁠ANDREANIADS thanks, you're right: a process that made pipelines and ended between two counted toward the five. Fixed in `b2cedf7` (squashed into the PR's commit): `failed_in_a_row` counts only processes that made no pipeline, and one that made some starts the count again and the rest goes on at once. `a_process_that_made_pipelines_is_no_failed_start` checks your two sequences (five attempts with one pipeline each never stop the worker; four empty ones then one with progress reset it) next to five empty ones, which still stop it. `cargo test --locked -p victory`: 32 passed, 0 failed, and 2 passed, 0 failed. (Written with Claude Code, Claude Opus 5.5.)
github-bot force-pushed github-bot/gh-1931 from b2cedf749d to 1d00f272c4 2026-11-29 03:39:11 +00:00 Compare
Author
Owner

@⁠ANDREANIADS on GitHub · 2026-11-29 03:35 UTC · original

Thanks for adding the progress regression test. A separate, pre-existing path is still reachable at b2cedf7: an Err from current_exe().and_then(...spawn...) returns (these.len(), None, None). The caller consumes the chunk before deciding whether to retry.

I injected an open error in an isolated Rust harness with three pipeline IDs. Both a transient error and a persistent error ended after one attempt, with zero callbacks and an empty remaining slice. Returning (0, Some(e.to_string()), None) for that error reused the bounded retry: a transient error completed all three on attempt two, and persistent errors stopped after five attempts with all three pending. Immediate success still completed all three on the first attempt. The final summary counts callbacks correctly but omits the skipped chunk. CPU-only logic test; no Windows process was launched.

**@⁠ANDREANIADS** on GitHub · 2026-11-29 03:35 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1931#issuecomment-7250138809) Thanks for adding the progress regression test. A separate, pre-existing path is still reachable at `b2cedf7`: an `Err` from `current_exe().and_then(...spawn...)` returns `(these.len(), None, None)`. The caller consumes the chunk before deciding whether to retry. I injected an open error in an isolated Rust harness with three pipeline IDs. Both a transient error and a persistent error ended after one attempt, with zero callbacks and an empty remaining slice. Returning `(0, Some(e.to_string()), None)` for that error reused the bounded retry: a transient error completed all three on attempt two, and persistent errors stopped after five attempts with all three pending. Immediate success still completed all three on the first attempt. The final summary counts callbacks correctly but omits the skipped chunk. CPU-only logic test; no Windows process was launched.
Author
Owner

@⁠joeypercia on GitHub · 2026-11-29 03:36 UTC · original

@⁠ANDREANIADS right again, and it's the same kind of failure, so it belongs here: in 1d00f27 (squashed) a spawn error now returns (0, Some("not started: …"), None) instead of the whole chunk as made, and a process without its output pipe is killed and returns (0, Some(…), None). Both go through after()'s Again (covered by a_process_that_never_began_blames_no_pipeline) and the bounded retry, so a transient error goes on and a lasting one stops the worker after five with the rest left for the next preload. cargo test --locked -p victory: 32 passed, 0 failed, and 2 passed, 0 failed. Not covered by a unit test of its own: child launches a real process.

(Written with Claude Code, Claude Opus 5.5.)

**@⁠joeypercia** on GitHub · 2026-11-29 03:36 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1931#issuecomment-7250154020) @⁠ANDREANIADS right again, and it's the same kind of failure, so it belongs here: in `1d00f27` (squashed) a spawn error now returns `(0, Some("not started: …"), None)` instead of the whole chunk as made, and a process without its output pipe is killed and returns `(0, Some(…), None)`. Both go through `after()`'s `Again` (covered by `a_process_that_never_began_blames_no_pipeline`) and the bounded retry, so a transient error goes on and a lasting one stops the worker after five with the rest left for the next preload. `cargo test --locked -p victory`: 32 passed, 0 failed, and 2 passed, 0 failed. Not covered by a unit test of its own: `child` launches a real process. (Written with Claude Code, Claude Opus 5.5.)
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 09:46 UTC · original · edited 2026-12-01 10:09 UTC

I cherry-picked 1d00f27 onto current main 5fabb46 as 781f6dc, preserving joeypercia as Git author. The rebased commit preserves the current per-fingerprint quarantine and the outer retry rounds. A worker stops for the current round after five starts with no progress. The outer loop can try its remaining pipelines when other workers made progress.

I replayed synthetic worker stdout through the exact parser and retry decision on Windows. With jobs [7, 8, 9], a failed start with no output would quarantine 7 on main. After made 7, a failure between pipelines would quarantine 8. The rebased code retries in both cases. at 9 quarantines only 9; an at outside the remaining jobs leaves the queue eligible for retry. Consecutive failed starts back off for 2, 4, 8 and 16 seconds before the fifth stops the worker. cargo check --locked -p victory --bin victory --jobs 2 and the staged policy check passed. These checks used no game data.

Git merges this rebase cleanly with #4786 at a0f1a34. It conflicts with #4779 at 5993f4f in warm.rs, where both change child. The integration needs to carry the last at marker alongside #4779's child_result and retain its watchdog wake on exit. The branch above is ready against current main if you'd like to update this PR.

Integration update. I resolved the child conflict in a separate integration branch, carrying the last at marker out with the failure status and keeping the watchdog wake on exit. The branch preserves both parents (781f6dc and 5993f4f). The 18 tests in warm::tests and the staged policy check passed on Windows. The rebase above still applies directly to main.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 09:46 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1931#issuecomment-7307187773) · edited 2026-12-01 10:09 UTC I cherry-picked `1d00f27` onto current `main` `5fabb46` as [`781f6dc`](https://github.com/andrewpozdnakov7-jpg/VIctory-NVIDIA/commit/781f6dc16e8656daf9199e0a66ebfd2d4ec2ffdc), preserving joeypercia as Git author. The rebased commit preserves the current per-fingerprint quarantine and the outer retry rounds. A worker stops for the current round after five starts with no progress. The outer loop can try its remaining pipelines when other workers made progress. I replayed synthetic worker stdout through the exact parser and retry decision on Windows. With jobs `[7, 8, 9]`, a failed start with no output would quarantine `7` on main. After `made 7`, a failure between pipelines would quarantine `8`. The rebased code retries in both cases. `at 9` quarantines only `9`; an `at` outside the remaining jobs leaves the queue eligible for retry. Consecutive failed starts back off for 2, 4, 8 and 16 seconds before the fifth stops the worker. `cargo check --locked -p victory --bin victory --jobs 2` and the staged policy check passed. These checks used no game data. Git merges this rebase cleanly with #4786 at `a0f1a34`. It conflicts with #4779 at `5993f4f` in `warm.rs`, where both change `child`. The integration needs to carry the last `at` marker alongside #4779's `child_result` and retain its watchdog wake on exit. The branch above is ready against current main if you'd like to update this PR. **Integration update.** I resolved the `child` conflict in a separate [integration branch](https://github.com/andrewpozdnakov7-jpg/VIctory-NVIDIA/tree/review/1931-4778-integration), carrying the last `at` marker out with the failure status and keeping the watchdog wake on exit. The branch preserves both parents (`781f6dc` and `5993f4f`). The 18 tests in `warm::tests` and the staged policy check passed on Windows. The rebase above still applies directly to main.
This pull request has changes conflicting with the target branch.
  • apps/victory/src/warm.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1931'
git switch 'github-bot/gh-1931'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1931'
git switch 'github-bot/gh-1931'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1931'
git switch 'main'
git merge --squash 'github-bot/gh-1931'
git switch 'main'
git merge --ff-only 'github-bot/gh-1931'
git switch 'main'
git merge 'github-bot/gh-1931'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1931
No description provided.