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

Closed
github-bot wants to merge 0 commits from github-bot/gh-412 into main AGit
Owner

@⁠kwaadrat on GitHub · 2026-12-01 23:33 UTC · original
kwaadrat:fix/skip-warm-bad-pipelines → main · +64 −7 · 2 files · 73 commits · closed without merging

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.
**@⁠kwaadrat** on GitHub · 2026-12-01 23:33 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/412) `kwaadrat:fix/skip-warm-bad-pipelines` → `main` · +64 −7 · 2 files · 73 commits · closed without merging ## 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 23:35:53 +00:00
Author
Owner

@⁠readmet3xt-lab on GitHub · 2026-12-02 01:48 UTC · original

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.

**@⁠readmet3xt-lab** on GitHub · 2026-12-02 01:48 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/412#issuecomment-7332137821) 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.
Author
Owner

@⁠kwaadrat on GitHub · 2026-12-02 06:51 UTC · original

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.

**@⁠kwaadrat** on GitHub · 2026-12-02 06:51 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/412#issuecomment-7337481529) 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`.
github-bot closed this pull request 2026-12-02 07:54:17 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.