A panic while a pipeline is made refuses it, the worker goes on #219

Open
Ingenioeren wants to merge 1 commit from upstream-pr/219 into main
Ingenioeren commented 2026-11-26 02:13:15 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by Ingenioeren on 2026-11-26T02:13:15Z.


What

Catch Rust panics during host pipeline creation. Log the shaders and any string panic message, record a refusal, and wake waiters so the worker can continue.

Part of #217 (the second item; the per-pipeline waited-time cap is a behaviour change left out).

The same fix is proposed upstream as Marvisak/VIctory#2980.

Why

A panic killed the worker and left the pipeline marked as being made. Later frames binding it could spend the full wait budget.

How tested

  • cargo test --locked --offline -p victory-gpu pipeline::make::tests::a_panic_refuses_the_pipeline -- --exact — failed without the guard with pipeline creation panicked (1 failed, exit 101). With the guard, 1 passed.
  • cargo test --locked --offline -p victory-gpu — 114 passed, 0 failed, 4 ignored. Fresh origin/main had 113 passed, 0 failed, 4 ignored.
  • cargo test --locked --offline -p victory-gpu --features diagnostics pipeline::make::tests::a_panic_refuses_the_pipeline -- --exact — 1 passed.
  • cargo clippy --locked --offline -p victory-gpu --all-targets — passed with warnings outside the changed file.
  • cargo fmt --check -p victory-gpu — exit 1 for existing formatting differences. No differences in the changed hunks.
  • cargo run --locked --offline -p xtask -- policy --staged — passed for the one staged file.

Not tested

No hardware run of a real panicking pipeline. No game run.

AI assistance: prepared with OpenAI Codex under Claude Code's direction, reviewed by Ingenioeren.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:issue:6617993923 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/219). Originally posted by [Ingenioeren](https://github.com/Ingenioeren) on 2026-11-26T02:13:15Z. --- ## What Catch Rust panics during host pipeline creation. Log the shaders and any string panic message, record a refusal, and wake waiters so the worker can continue. Part of #217 (the second item; the per-pipeline waited-time cap is a behaviour change left out). The same fix is proposed upstream as Marvisak/VIctory#2980. ## Why A panic killed the worker and left the pipeline marked as being made. Later frames binding it could spend the full wait budget. ## How tested - `cargo test --locked --offline -p victory-gpu pipeline::make::tests::a_panic_refuses_the_pipeline -- --exact` — failed without the guard with `pipeline creation panicked` (1 failed, exit 101). With the guard, 1 passed. - `cargo test --locked --offline -p victory-gpu` — 114 passed, 0 failed, 4 ignored. Fresh `origin/main` had 113 passed, 0 failed, 4 ignored. - `cargo test --locked --offline -p victory-gpu --features diagnostics pipeline::make::tests::a_panic_refuses_the_pipeline -- --exact` — 1 passed. - `cargo clippy --locked --offline -p victory-gpu --all-targets` — passed with warnings outside the changed file. - `cargo fmt --check -p victory-gpu` — exit 1 for existing formatting differences. No differences in the changed hunks. - `cargo run --locked --offline -p xtask -- policy --staged` — passed for the one staged file. ## Not tested No hardware run of a real panicking pipeline. No game run. AI assistance: prepared with OpenAI Codex under Claude Code's direction, reviewed by Ingenioeren.
ySKELLETONX commented 2026-11-26 11:26:12 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by ySKELLETONX on 2026-11-26T11:26:12Z.


Tested on RX 7600 XT, merged together with #229 on main 4f62c2a: all victory-gpu lib tests pass, including a_panic_refuses_the_pipeline. [profile.release] doesn't set panic = "abort", so the catch_unwind takes effect in release builds too. LGTM.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:comment:7190724755 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/219#issuecomment-7190724755). Originally posted by [ySKELLETONX](https://github.com/ySKELLETONX) on 2026-11-26T11:26:12Z. --- Tested on RX 7600 XT, merged together with #229 on `main` 4f62c2a: all `victory-gpu` lib tests pass, including `a_panic_refuses_the_pipeline`. `[profile.release]` doesn't set `panic = "abort"`, so the `catch_unwind` takes effect in release builds too. LGTM.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/219:upstream-pr/219'
git switch 'upstream-pr/219'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/219'
git switch 'upstream-pr/219'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/219'
git switch 'upstream-pr/219'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/219'
git switch 'main'
git merge --squash 'upstream-pr/219'
git switch 'main'
git merge --ff-only 'upstream-pr/219'
git switch 'main'
git merge 'upstream-pr/219'
git push origin 'main'
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
Belobug/VIctory-Belobug-AMD!219
No description provided.