victory warm reports work it did not do: a failed spawn counts as a whole chunk made, a bad pipeline is never retried, and --used silently makes nothing #26

Closed
opened 2026-11-26 03:31:26 +00:00 by github-bot · 3 comments
Owner

@⁠itsonewi on GitHub · 2026-11-25 23:49 UTC · original

victory warm has three paths where it reports success while doing nothing, and each one looks like a finished warm-up from the outside.

1. A process that cannot be started is counted as a whole chunk made

apps/victory/src/warm.rs:135-149:

let Ok(mut process) = spawned else { return (these.len(), None) };
let Some(out) = process.stdout.take() else { return (these.len(), None) };

(these.len(), None) is the return the caller reads as "every pipeline in this chunk was made and the process ended well" (:98-108: rest = &rest[made.min(rest.len())..], then ended == None ⇒ break). So when Command::spawn fails — an antivirus holding the exe, no memory, a path issue — the chunk is dropped with no message, no warm-bad.txt line, and the run still prints a summary. It should be (0, Some("could not start the process: {e}")).

2. A pipeline that crashed once is never retried, and nothing says so

:57 filters !bad.contains(key) unconditionally, and --again only relaxes the done set:

(again || !done.contains(key)) && !bad.contains(key) && (!used || early.contains(key))

warm-bad.txt is written at :103 and read at :49-50; no switch clears it, and the file is not mentioned in docs/. So on a machine where the AMD compiler crashed once on a pipeline (the case in #8), that pipeline is skipped by every later victory warm and by nothing else, until someone deletes a file whose name appears only in the source. A --retry-bad flag, or having --again also clear bad, would make the state reachable from the command line.

3. --used with no early-pipelines.txt silently makes nothing

:51-57: early is empty when the file is absent, so !used || early.contains(key) is false for every key. The output is then

0 pipelines known, 0 made before (...), 0 bad; 0 to make, N processes

and exit code 0 — identical in shape to a cache that is already complete. That file is written by a run with VICTORY_PIPELINE_BOOK=1 (apps/victory/src/main.rs:108-111), which the README does not require before telling a new user to run victory warm --used as one of the two pre-steps. One line — "no early-pipelines.txt in

; run with VICTORY_PIPELINE_BOOK=1 to write it" — would turn a confusing no-op into an instruction.

Two smaller notes in the same file, not defects on their own: :184 prints hung for 180 s for any kill of the watchdog, including one where the child was making progress but slowly (a 180 s single pipeline is also possible on a cold driver), and :17 AT_ONCE = 40 means a chunk that hangs costs the up-to-40 pipelines after the last reported one, since rest is advanced only by the reported made lines.

Not checked

Source reading at 0a43566. I did not run victory warm or build the binary here, so the spawn-failure path is not observed, only read.

AI use

AI-assisted review (source reading). No build, no run, no game files.

**@⁠itsonewi** on GitHub · 2026-11-25 23:49 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/26) `victory warm` has three paths where it reports success while doing nothing, and each one looks like a finished warm-up from the outside. ## 1. A process that cannot be started is counted as a whole chunk made `apps/victory/src/warm.rs:135-149`: ```rust let Ok(mut process) = spawned else { return (these.len(), None) }; let Some(out) = process.stdout.take() else { return (these.len(), None) }; ``` `(these.len(), None)` is the return the caller reads as "every pipeline in this chunk was made and the process ended well" (`:98-108`: `rest = &rest[made.min(rest.len())..]`, then `ended == None` ⇒ `break`). So when `Command::spawn` fails — an antivirus holding the exe, no memory, a path issue — the chunk is dropped with no message, no `warm-bad.txt` line, and the run still prints a summary. It should be `(0, Some("could not start the process: {e}"))`. ## 2. A pipeline that crashed once is never retried, and nothing says so `:57` filters `!bad.contains(key)` unconditionally, and `--again` only relaxes the `done` set: ```rust (again || !done.contains(key)) && !bad.contains(key) && (!used || early.contains(key)) ``` `warm-bad.txt` is written at `:103` and read at `:49-50`; no switch clears it, and the file is not mentioned in `docs/`. So on a machine where the AMD compiler crashed once on a pipeline (the case in #8), that pipeline is skipped by every later `victory warm` and by nothing else, until someone deletes a file whose name appears only in the source. A `--retry-bad` flag, or having `--again` also clear `bad`, would make the state reachable from the command line. ## 3. `--used` with no `early-pipelines.txt` silently makes nothing `:51-57`: `early` is empty when the file is absent, so `!used || early.contains(key)` is false for every key. The output is then ``` 0 pipelines known, 0 made before (...), 0 bad; 0 to make, N processes ``` and exit code 0 — identical in shape to a cache that is already complete. That file is written by a run with `VICTORY_PIPELINE_BOOK=1` (`apps/victory/src/main.rs:108-111`), which the README does not require before telling a new user to run `victory warm --used` as one of the two pre-steps. One line — "no early-pipelines.txt in <dir>; run with VICTORY_PIPELINE_BOOK=1 to write it" — would turn a confusing no-op into an instruction. Two smaller notes in the same file, not defects on their own: `:184` prints `hung for 180 s` for any kill of the watchdog, including one where the child was making progress but slowly (a 180 s single pipeline is also possible on a cold driver), and `:17` `AT_ONCE = 40` means a chunk that hangs costs the up-to-40 pipelines after the last reported one, since `rest` is advanced only by the reported `made` lines. ## Not checked Source reading at `0a43566`. I did not run `victory warm` or build the binary here, so the spawn-failure path is not observed, only read. ## AI use AI-assisted review (source reading). No build, no run, no game files.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:31:26 +00:00
Author
Owner

@⁠itsonewi on GitHub · 2026-11-26 00:07 UTC · original

A second counting path in the same file, found while looking for the first: the child's success return reports the whole batch, not what it made.

apps/victory/src/warm.rs:178-182:

let status = lock(&process).wait();
let well = status.as_ref().is_ok_and(|s| s.success());
if well {
    return (these.len(), None);   // every number of the batch, whether or not it was made
}

made — the count actually parsed from the child's made N ms there lines (:166-176) — is used only on the failure path. Meanwhile the child skips numbers it cannot find without printing anything:

crates/victory-gpu/src/pipeline/known.rs:238-241:

for n in which {
    let Some(entry) = entries.get(n) else { continue };   // no "made" line at all
    each(*n, None);
    ...
}

So --these 999999 (a number past the end of known-pipelines.bin, or one from a list written by an older, longer book) makes the child exit 0 having done nothing, and the parent adds the whole chunk to the "made" total and to nothing in warm-bad.txt — the same shape as the spawn-failure path at :148-149, one branch later.

The fix is the same one the failure path already needs: return made, and treat made < these.len() as a failure of that chunk so the numbers land in warm-bad.txt (where --retry-bad could pick them up, as the first report asks).

Not observed in a run — read from the code at 0a43566, like the rest of the report.

(AI-assisted, source reading only.)

**@⁠itsonewi** on GitHub · 2026-11-26 00:07 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/26#issuecomment-7178424221) A second counting path in the same file, found while looking for the first: the child's **success** return reports the whole batch, not what it made. `apps/victory/src/warm.rs:178-182`: ```rust let status = lock(&process).wait(); let well = status.as_ref().is_ok_and(|s| s.success()); if well { return (these.len(), None); // every number of the batch, whether or not it was made } ``` `made` — the count actually parsed from the child's `made N ms there` lines (`:166-176`) — is used only on the failure path. Meanwhile the child skips numbers it cannot find without printing anything: `crates/victory-gpu/src/pipeline/known.rs:238-241`: ```rust for n in which { let Some(entry) = entries.get(n) else { continue }; // no "made" line at all each(*n, None); ... } ``` So `--these 999999` (a number past the end of `known-pipelines.bin`, or one from a list written by an older, longer book) makes the child exit 0 having done nothing, and the parent adds the whole chunk to the "made" total and to nothing in `warm-bad.txt` — the same shape as the spawn-failure path at `:148-149`, one branch later. The fix is the same one the failure path already needs: return `made`, and treat `made < these.len()` as a failure of that chunk so the numbers land in `warm-bad.txt` (where `--retry-bad` could pick them up, as the first report asks). Not observed in a run — read from the code at `0a43566`, like the rest of the report. (AI-assisted, source reading only.)
Author
Owner

@⁠WuDiXiaoBo on GitHub · 2026-11-26 00:51 UTC · original

Adding the user-side data point to this, because it decides whether the first session can be helped at all.

On an NVIDIA RTX 4060 Ti 16 GB, scripts\play.ps1 with its defaults, this is what target\diag\victory.exe warm --used printed after a four-minute session that was drawing 200–4,300 draws a frame in the world:

0 pipelines known, 0 made before (78eb177cfbcb0e1e), 0 bad; 0 to make, 8 processes
0 made in 0 s (0 have no host pipeline, 0 ended their process); ms each: median 0.0, p90 0.0, p99 0.0, most 0, sum -0 s

One caveat on my side, in case it matters: my session did not end cleanly. The title's own watchdog was still counting and I stopped the process myself, so if the record of used pipelines is written at exit, an empty list is exactly what you would expect. I could not tell that from the outside.

The consequence either way is the same for a new user: 1,276 host pipelines were still made during the second session while cache\pipelines already held 72 MB from the first, and every frame in between spent 459–539 ms in waiting for pipelines with the card idle — median 0.0 ms on the GPU of a 398 ms frame. There is no way on this host to reach the "pay the compile cost ahead of time" behaviour the README promises.

So the useful question for me is: where is that record written, and at what point? If it survives a killed run, tell me the file name and I will check whether it exists and what it holds. If it is only written at exit, then --used may need another source (the pipeline cache's own contents?) to be useful after a watchdog kill — which is how most sessions end on a 6-core machine here.

Full numbers, three screenshots and both 3.7 MB logs are in #61.

**@⁠WuDiXiaoBo** on GitHub · 2026-11-26 00:51 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/26#issuecomment-7179184469) Adding the user-side data point to this, because it decides whether the first session can be helped at all. On an NVIDIA RTX 4060 Ti 16 GB, `scripts\play.ps1` with its defaults, this is what `target\diag\victory.exe warm --used` printed after a four-minute session that was drawing 200–4,300 draws a frame in the world: ``` 0 pipelines known, 0 made before (78eb177cfbcb0e1e), 0 bad; 0 to make, 8 processes 0 made in 0 s (0 have no host pipeline, 0 ended their process); ms each: median 0.0, p90 0.0, p99 0.0, most 0, sum -0 s ``` One caveat on my side, in case it matters: my session did not end cleanly. The title's own watchdog was still counting and I stopped the process myself, so if the record of used pipelines is written at exit, an empty list is exactly what you would expect. I could not tell that from the outside. The consequence either way is the same for a new user: 1,276 host pipelines were still made during the **second** session while `cache\pipelines` already held 72 MB from the first, and every frame in between spent 459–539 ms in `waiting for pipelines` with the card idle — median **0.0 ms on the GPU** of a 398 ms frame. There is no way on this host to reach the "pay the compile cost ahead of time" behaviour the README promises. So the useful question for me is: where is that record written, and at what point? If it survives a killed run, tell me the file name and I will check whether it exists and what it holds. If it is only written at exit, then `--used` may need another source (the pipeline cache's own contents?) to be useful after a watchdog kill — which is how most sessions end on a 6-core machine here. Full numbers, three screenshots and both 3.7 MB logs are in #61.
github-bot 2026-11-26 08:24:50 +00:00
Author
Owner

@⁠avatarmanz on GitHub · 2026-11-26 08:19 UTC · original

Fixed by #128, now in main (0ce46d5a).

**@⁠avatarmanz** on GitHub · 2026-11-26 08:19 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/26#issuecomment-7186447520) Fixed by #128, now in main (0ce46d5a).
This discussion has been locked. Commenting is limited to contributors.
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/avatarmanz--VIctory-7900XTX#26
No description provided.