victory-gpu: skip known warm-bad.txt pipelines during live compilation #412

Closed
kwaadrat wants to merge 0 commits from upstream-pr/412 into main
kwaadrat commented 2026-12-01 23:33:05 +00:00 (Migrated from github.com)

Imported from readmet3xt-lab/foxhound. Originally posted by kwaadrat on 2026-12-01T23:33:05Z.


Summary

  • Read warm-bad.txt (written by victory warm when a pipeline hangs or crashes its worker process) in victory_gpu::pipeline::library::bad, cached once in a OnceLock<HashSet<String>>.
  • Mark matching pipelines as left_out in Pending::new (crates/victory-gpu/src/pipeline/make.rs) so in-game worker threads never queue or stall on pipelines already known to hang or crash the driver/compiler.

Problem

victory warm runs compilations in isolated child processes with a 180 s watchdog and records failing pipeline keys in warm-bad.txt (e.g. 4cb6add108d16861be59755a103be250 hung for 180 s, 38 bad total on vkd3d-proton).

However, live in-game compilation in pipeline::make only consulted slow-pipelines.txt and never checked warm-bad.txt. When a player skips warm (or hits a cold scene), the in-game worker pool runs in-process without a watchdog — hitting any of those warm-bad.txt pipelines wedges worker threads indefinitely and stalls the rest of the queue.

Observed before/after (RTX 3060 12 GB / i5-9600KF / Proton Experimental)

  • Before (foxhound-20261202-002156.log): being made stayed frozen at 1763–1764 across multiple minutes while draws continued to be dropped (dropped 2346 without a host pipeline (1764 being made)).
  • After (foxhound-20261202-003110.log): being made drained steadily without wedging workers (1029 -> 917 -> 829 -> 736 over 15 seconds, ~20 pipelines/s).

Design Notes

  • Mirrors slow_ones() in library.rs, reading from the same pipelines directory (DIR).
  • Uses OnceLock<HashSet<String>> so lookups in Pending::new are lock-free after initialization.
  • Reuses Pending::left_out so skipped pipelines are never queued, never waited on, and accurately accounted for in take_left_out() instead of inflating being made.

Verification

  • Built victory.exe on windows-latest (cargo build --release --locked -p victory) and verified live pipeline queue progression on cold/skipped runs.
<!-- greyfinch-sync:readmet3xt-lab/foxhound:issue:5596617284 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/412). Originally posted by [kwaadrat](https://github.com/kwaadrat) on 2026-12-01T23:33:05Z. --- ## Summary - Read `warm-bad.txt` (written by `victory warm` when a pipeline hangs or crashes its worker process) in `victory_gpu::pipeline::library::bad`, cached once in a `OnceLock<HashSet<String>>`. - Mark matching pipelines as `left_out` in `Pending::new` (`crates/victory-gpu/src/pipeline/make.rs`) so in-game worker threads never queue or stall on pipelines already known to hang or crash the driver/compiler. ## Problem `victory warm` runs compilations in isolated child processes with a 180 s watchdog and records failing pipeline keys in `warm-bad.txt` (e.g. `4cb6add108d16861be59755a103be250 hung for 180 s`, `38 bad` total on `vkd3d-proton`). However, live in-game compilation in `pipeline::make` only consulted `slow-pipelines.txt` and never checked `warm-bad.txt`. When a player skips `warm` (or hits a cold scene), the in-game worker pool runs in-process without a watchdog — hitting any of those `warm-bad.txt` pipelines wedges worker threads indefinitely and stalls the rest of the queue. ### Observed before/after (RTX 3060 12 GB / i5-9600KF / Proton Experimental) - **Before (`foxhound-20261202-002156.log`):** `being made` stayed frozen at `1763`–`1764` across multiple minutes while draws continued to be dropped (`dropped 2346 without a host pipeline (1764 being made)`). - **After (`foxhound-20261202-003110.log`):** `being made` drained steadily without wedging workers (`1029 -> 917 -> 829 -> 736` over 15 seconds, ~20 pipelines/s). ## Design Notes - Mirrors `slow_ones()` in `library.rs`, reading from the same `pipelines` directory (`DIR`). - Uses `OnceLock<HashSet<String>>` so lookups in `Pending::new` are lock-free after initialization. - Reuses `Pending::left_out` so skipped pipelines are never queued, never waited on, and accurately accounted for in `take_left_out()` instead of inflating `being made`. ## Verification - Built `victory.exe` on `windows-latest` (`cargo build --release --locked -p victory`) and verified live pipeline queue progression on cold/skipped runs.
readmet3xt-lab commented 2026-12-02 01:48:52 +00:00 (Migrated from github.com)

Imported from readmet3xt-lab/foxhound. Originally posted by readmet3xt-lab on 2026-12-02T01:48:52Z.


Thank you, this is a real fault: a pipeline that hung victory warm can wedge a worker in the running game, since live compilation has no watchdog. We'd like to take it with three changes: skip only entries written by the current driver and translator (so a pipeline that hung once under an old driver gets tried again), log once at start how many are skipped and that deleting warm-bad.txt retries them, and a switch to turn it off. If you'd like to make those changes, great; otherwise we'll port it with credit.

<!-- greyfinch-sync:readmet3xt-lab/foxhound:comment:7332137821 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/412#issuecomment-7332137821). Originally posted by [readmet3xt-lab](https://github.com/readmet3xt-lab) on 2026-12-02T01:48:52Z. --- Thank you, this is a real fault: a pipeline that hung `victory warm` can wedge a worker in the running game, since live compilation has no watchdog. We'd like to take it with three changes: skip only entries written by the current driver and translator (so a pipeline that hung once under an old driver gets tried again), log once at start how many are skipped and that deleting `warm-bad.txt` retries them, and a switch to turn it off. If you'd like to make those changes, great; otherwise we'll port it with credit.
kwaadrat commented 2026-12-02 06:51:10 +00:00 (Migrated from github.com)

Imported from readmet3xt-lab/foxhound. Originally posted by kwaadrat on 2026-12-02T06:51:10Z.


Updated in 3fda5aa with all three requested changes:

  1. Fingerprint-scoped warm-bad.txt: victory warm now writes <fingerprint> <key> <why> (matching warm-done.txt), and both warm.rs and library::bad filter entries against the current known::fingerprint() (so entries from an older driver/translator or the old un-tagged format are retried automatically).
  2. Startup log: library::bad logs once via tracing::info! when entries are skipped (skipping pipelines listed in warm-bad.txt for this driver and translator (delete warm-bad.txt or set VICTORY_SKIP_BAD=0 to retry them)).
  3. Disable switch: added VICTORY_SKIP_BAD=0 to turn off skipping (skip_bad_on()).

Also added a unit test (parse_bad_filters_by_current_fingerprint) in crates/victory-gpu/src/pipeline/library.rs.

<!-- greyfinch-sync:readmet3xt-lab/foxhound:comment:7337481529 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/412#issuecomment-7337481529). Originally posted by [kwaadrat](https://github.com/kwaadrat) on 2026-12-02T06:51:10Z. --- Updated in `3fda5aa` with all three requested changes: 1. **Fingerprint-scoped `warm-bad.txt`**: `victory warm` now writes `<fingerprint> <key> <why>` (matching `warm-done.txt`), and both `warm.rs` and `library::bad` filter entries against the current `known::fingerprint()` (so entries from an older driver/translator or the old un-tagged format are retried automatically). 2. **Startup log**: `library::bad` logs once via `tracing::info!` when entries are skipped (`skipping pipelines listed in warm-bad.txt for this driver and translator (delete warm-bad.txt or set VICTORY_SKIP_BAD=0 to retry them)`). 3. **Disable switch**: added `VICTORY_SKIP_BAD=0` to turn off skipping (`skip_bad_on()`). Also added a unit test (`parse_bad_filters_by_current_fingerprint`) in `crates/victory-gpu/src/pipeline/library.rs`.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
readmet3xt-lab/foxhound!412
No description provided.