GPU: every removal report carries the DRED data #3736

Open
Ingenioeren wants to merge 1 commit from upstream-pr/3736 into main
Ingenioeren commented 2026-11-28 13:22:04 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Ingenioeren on 2026-11-28T13:22:04Z.


What

Route host GPU failures through fail_after, which appends the removal reason, DRED data, then debug-layer details when the device is removed. Ordinary callers pass no lists; submission failures pass their lists for breadcrumb matching and retain last_notes and removed_during. Remove the submission path's separate DRED append so the report contains it once.

Add pure composition tests in crates/victory-gpu/src/host.rs: failure_text_keeps_removal_data_once and failure_text_skips_removal_data_on_a_live_device.

Why

Command-list close, reset, or state-prelude recording can discover device removal before submission does. Those failures previously included only the removal reason, losing the page-fault address, allocations, and breadcrumbs needed to diagnose the crash.

How tested

Baseline: unchanged origin/main at 63bcca4.

  • cargo test --locked --offline -p victory-gpu: baseline passed (231 passed, 1 ignored); final passed (233 passed, 1 ignored). No failing tests; doc tests passed (0 tests).
  • cargo test --locked --offline -p victory-gpu failure_text: with the fix stashed, used a behavior-preserving extraction of the original reason-only composition and the same test assertions. The removal-data test failed (exit 101): actual text ended after the removal reason, while expected text also contained the synthetic page-fault, allocation, and breadcrumb data. The live-device test passed. Restored the fix with git stash pop; both tests passed, including in the final full suite. No test was weakened.
  • cargo test --locked --offline -p victory-gpu --features diagnostics failure_text: passed (2 passed).
  • cargo clippy --locked --offline -p victory-gpu --all-targets -- -D warnings: passed on baseline and final.
  • cargo clippy --locked --offline -p victory-gpu --all-targets --features diagnostics -- -D warnings: passed on baseline and final.
  • cargo fmt --check: failed on baseline and final (exit 1), with the same 925 existing formatting hunks. Compared the requested formatting edits: identical; only context and line positions changed. The patch adds no formatting failures.
  • git diff --check and git diff --cached --check: passed.
  • git add -A followed by cargo run -p xtask -- policy --staged: passed (asset policy: 1 files ok).

The regression uses synthetic strings and does not remove or disturb the shared host device. Only host.rs changes; no game files are included.

Not tested

No hardware device-removal run. Actual DRED collection following device removal was not exercised.

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

<!-- greyfinch-sync:Marvisak/VIctory:issue:5540550579 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3736). Originally posted by [Ingenioeren](https://github.com/Ingenioeren) on 2026-11-28T13:22:04Z. --- ## What Route host GPU failures through `fail_after`, which appends the removal reason, DRED data, then debug-layer details when the device is removed. Ordinary callers pass no lists; submission failures pass their lists for breadcrumb matching and retain `last_notes` and `removed_during`. Remove the submission path's separate DRED append so the report contains it once. Add pure composition tests in `crates/victory-gpu/src/host.rs`: `failure_text_keeps_removal_data_once` and `failure_text_skips_removal_data_on_a_live_device`. ## Why Command-list close, reset, or state-prelude recording can discover device removal before submission does. Those failures previously included only the removal reason, losing the page-fault address, allocations, and breadcrumbs needed to diagnose the crash. ## How tested Baseline: unchanged `origin/main` at `63bcca4`. - `cargo test --locked --offline -p victory-gpu`: baseline passed (231 passed, 1 ignored); final passed (233 passed, 1 ignored). No failing tests; doc tests passed (0 tests). - `cargo test --locked --offline -p victory-gpu failure_text`: with the fix stashed, used a behavior-preserving extraction of the original reason-only composition and the same test assertions. The removal-data test failed (exit 101): actual text ended after the removal reason, while expected text also contained the synthetic page-fault, allocation, and breadcrumb data. The live-device test passed. Restored the fix with `git stash pop`; both tests passed, including in the final full suite. No test was weakened. - `cargo test --locked --offline -p victory-gpu --features diagnostics failure_text`: passed (2 passed). - `cargo clippy --locked --offline -p victory-gpu --all-targets -- -D warnings`: passed on baseline and final. - `cargo clippy --locked --offline -p victory-gpu --all-targets --features diagnostics -- -D warnings`: passed on baseline and final. - `cargo fmt --check`: failed on baseline and final (exit 1), with the same 925 existing formatting hunks. Compared the requested formatting edits: identical; only context and line positions changed. The patch adds no formatting failures. - `git diff --check` and `git diff --cached --check`: passed. - `git add -A` followed by `cargo run -p xtask -- policy --staged`: passed (`asset policy: 1 files ok`). The regression uses synthetic strings and does not remove or disturb the shared host device. Only `host.rs` changes; no game files are included. ## Not tested No hardware device-removal run. Actual DRED collection following device removal was not exercised. AI assistance: prepared with OpenAI Codex under Claude Code's direction, reviewed by Ingenioeren.
oni-swr commented 2026-11-28 13:31:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-28T13:31:31Z.


Independent software-WARP verification of #3736 at 210a01ec612e229d97398a6e516c4862ba6bb3d9. GitHub test merge 56cf771be575325eebb35a5119228dbad1fa84dd has pinned main 63bcca43c6a00a758510398fa43096ce7e4f7df0 and the PR head as its exact parents.

  • Synthetic control. With the same assertions driving a test-only extraction of main’s reason-only formatting, the removal case failed on the missing synthetic page fault, allocation, and breadcrumbs. The live-device case passed. Both passed on the test merge with and without diagnostics (2/2 each).
  • Software-WARP pair. Clean main and the test merge each passed four diagnostics host checks covering adapter selection, compositor initialization, list submission/reset, and breadcrumb name matching, plus one synthetic compute test with nine checked inputs. DXGI returned Microsoft’s software adapter (vendor 0x1414, flags 0x2), and the compute test confirmed SDK DXIL validation.
  • Error-path review. The report text keeps the failure and submission notes first, followed by the removal reason, a single DRED append on removal, then debug-layer detail. Submission passes its command lists for breadcrumb matching. Close, reset, and prelude failures share the same reporting path with no list context.

Windows 11 25H2 build 26200.9974, D3D12/WARP 10.0.26100.9818, rustc/Cargo 1.98.1, Windows SDK 10.0.26100.0 x64 dxil.dll 1.8.2502.11. Both WARP flags were set to 1. Cargo used -j 4. Synthetic data only. Runtime DRED collection after an actual device removal remains unverified.

AI-assisted with Codex (gpt-6.2-sol).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7239997531 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3736#issuecomment-7239997531). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-28T13:31:31Z. --- Independent software-WARP verification of #3736 at `210a01ec612e229d97398a6e516c4862ba6bb3d9`. GitHub test merge `56cf771be575325eebb35a5119228dbad1fa84dd` has pinned main `63bcca43c6a00a758510398fa43096ce7e4f7df0` and the PR head as its exact parents. - **Synthetic control.** With the same assertions driving a test-only extraction of main’s reason-only formatting, the removal case failed on the missing synthetic page fault, allocation, and breadcrumbs. The live-device case passed. Both passed on the test merge with and without `diagnostics` (2/2 each). - **Software-WARP pair.** Clean main and the test merge each passed four diagnostics host checks covering adapter selection, compositor initialization, list submission/reset, and breadcrumb name matching, plus one synthetic compute test with nine checked inputs. DXGI returned Microsoft’s software adapter (vendor `0x1414`, flags `0x2`), and the compute test confirmed SDK DXIL validation. - **Error-path review.** The report text keeps the failure and submission notes first, followed by the removal reason, a single DRED append on removal, then debug-layer detail. Submission passes its command lists for breadcrumb matching. Close, reset, and prelude failures share the same reporting path with no list context. Windows 11 25H2 build 26200.9974, D3D12/WARP 10.0.26100.9818, rustc/Cargo 1.98.1, Windows SDK 10.0.26100.0 x64 `dxil.dll` 1.8.2502.11. Both WARP flags were set to `1`. Cargo used `-j 4`. Synthetic data only. Runtime DRED collection after an actual device removal remains unverified. AI-assisted with Codex (gpt-6.2-sol).
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/3736:upstream-pr/3736'
git switch 'upstream-pr/3736'

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/3736'
git switch 'upstream-pr/3736'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3736'
git switch 'upstream-pr/3736'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3736'
git switch 'main'
git merge --squash 'upstream-pr/3736'
git switch 'main'
git merge --ff-only 'upstream-pr/3736'
git switch 'main'
git merge 'upstream-pr/3736'
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
Marvisak/VIctory!3736
No description provided.