gpu: rescue dead pipeline workers on a 4 GiB stack and fingerprint refused pipelines #400

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

@⁠Kikoarl on GitHub · 2026-11-27 21:55 UTC · original
Kikoarl:fix/pipeline-worker-rescue → main · +574 −43 · 2 files · 1 commits · open

Summary

Ports dead pipeline-worker rescue on a 4 GiB stack, OnceLock-free completion state, and fingerprinted refused-pipelines.txt from Hasusmogus/cool_fox (#39, 5e7faabe) and DoubleGhosty/cool_fox (42b95b99) (GPL-3.0-or-later), rebased onto main (df2daaf).

Relation to PR #249

PR #249 catches Rust panics inside a pipeline build using catch_unwind in make.rs. However, hard worker thread terminations (such as stack overflows during shader translation or NVIDIA driver compilation) unwind or abort past catch_unwind, leaving callers stuck waiting on an empty OnceLock and shrinking the worker pool permanently.

Changes

  • crates/victory-gpu/src/pipeline/make.rs:
    • Replaces Pending's OnceLock with explicit completion state so stalled/terminated builds release waiters instead of staying unpopulated forever.
    • Detects ended worker threads (reap()) during 1 s waits, respawns replacement workers, and rescues affected pipelines once on a dedicated 4 GiB stack (VICTORY_PIPELINE_RESCUE=0 disables rescue).
  • crates/victory-gpu/src/pipeline/library.rs:
    • Stores refused pipeline keys in refused-pipelines.txt scoped by translator/driver fingerprint so builds are retried automatically after a translator or driver change (and manually with VICTORY_REFUSED_RETRY=1).

Verification

Verified on Windows (x86_64-pc-windows-msvc) against main (df2daaf):

  • git diff --check main..HEAD — clean
  • cargo test -p xtask --locked — 6 passed, 0 failed (asset policy: 287 files ok)
  • cargo clippy -p victory-gpu --all-targets --locked — exit 0, 0 warnings in changed files (main has pre-existing clippy warnings in untouched files)
  • cargo test -p victory-gpu --locked pipeline:: — 27 passed, 0 failed
**@⁠Kikoarl** on GitHub · 2026-11-27 21:55 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/400) `Kikoarl:fix/pipeline-worker-rescue` → `main` · +574 −43 · 2 files · 1 commits · open ### Summary Ports dead pipeline-worker rescue on a 4 GiB stack, `OnceLock`-free completion state, and fingerprinted `refused-pipelines.txt` from `Hasusmogus/cool_fox` (#39, `5e7faabe`) and `DoubleGhosty/cool_fox` (`42b95b99`) (`GPL-3.0-or-later`), rebased onto `main` (`df2daaf`). ### Relation to PR #249 PR #249 catches Rust panics inside a pipeline build using `catch_unwind` in `make.rs`. However, hard worker thread terminations (such as stack overflows during shader translation or NVIDIA driver compilation) unwind or abort past `catch_unwind`, leaving callers stuck waiting on an empty `OnceLock` and shrinking the worker pool permanently. ### Changes - **`crates/victory-gpu/src/pipeline/make.rs`**: - Replaces `Pending`'s `OnceLock` with explicit completion state so stalled/terminated builds release waiters instead of staying unpopulated forever. - Detects ended worker threads (`reap()`) during 1 s waits, respawns replacement workers, and rescues affected pipelines once on a dedicated 4 GiB stack (`VICTORY_PIPELINE_RESCUE=0` disables rescue). - **`crates/victory-gpu/src/pipeline/library.rs`**: - Stores refused pipeline keys in `refused-pipelines.txt` scoped by translator/driver fingerprint so builds are retried automatically after a translator or driver change (and manually with `VICTORY_REFUSED_RETRY=1`). ### Verification Verified on Windows (`x86_64-pc-windows-msvc`) against `main` (`df2daaf`): - `git diff --check main..HEAD` — clean - `cargo test -p xtask --locked` — 6 passed, 0 failed (`asset policy: 287 files ok`) - `cargo clippy -p victory-gpu --all-targets --locked` — exit 0, 0 warnings in changed files (`main` has pre-existing clippy warnings in untouched files) - `cargo test -p victory-gpu --locked pipeline::` — 27 passed, 0 failed
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 21:58:19 +00:00
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/400/head:github-bot/gh-400'
git switch 'github-bot/gh-400'

Merge

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