Host GPU failure: say how full the system's and the card's memory were #645

Open
hxghr6 wants to merge 1 commit from upstream-pr/645 into main
hxghr6 commented 2026-11-25 03:53:54 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by hxghr6 on 2026-11-25T03:53:54Z.


A host GPU failure gives the removal reason and the debug layer's first error, but not how full memory was, though memory running out removes a device as well. On an RX 9070 XT the device went during world loads with a cold driver shader cache, and crashes.log said only device removed ... (0x887A0006).

The report (the log's error line and crashes.log) now ends with how full the system's commit and the card's memory were, of what can be read:

; memory: the system's commit <in use> of <limit> MiB (this process <private> MiB); the card's own <in use> of <budget> MiB, shared <in use> of <budget> MiB

from K32GetPerformanceInfo, K32GetProcessMemoryInfo and Host::video_memory (the adapter's QueryVideoMemoryInfo, already used by the frame statistics).

Tested on an RX 9070 XT

Windows 11, Adrenalin 32.0.31044.16, 31 GB RAM with a page file Windows grows on demand. Diag build of this branch on main 310c6eb, the title run into the world with scripted keys and a cold driver shader cache. The device was removed 128 s in; crashes.log:

VIctory: host GPU failure: host GPU device removed after 3 submissions sent ahead (VICTORY_RELAY=1) of 10 lists; no breadcrumbs (...) (0x887A0004)); device removed: (...) (0x887A0006); a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command; memory: the system's commit 56828 of 57987 MiB (this process 29203 MiB); the card's own 12250 of 13936 MiB, shared 6238 of 15162 MiB

The system's commit stood at 98 % of its limit; the page file had already grown the limit from 37 GB (it was back at 38 GB after the run). The process's own private bytes, sampled every 10 s from outside, went from 10.3 GB in the menus to 13.4 GB as the world began and 28.6 GB ten seconds before the failure, while the world's pipelines compiled. So this removal came with memory running out, which the report now says. The same failure in earlier runs on this machine read only the removal reason.

Checks

  • New test host::trail::a_failure_says_how_full_memory_was: the line's wording with all numbers, with only the system's, and with none, and that this process's own numbers are read.
  • cargo test --workspace --locked: 511 passed, 0 failed (GPU tests on the RX 9070 XT, DXIL validation on).
  • cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features: nothing in the changed code; both fail on main 310c6eb as it stands (draw.rs sort_unstable_by_key, indirect.rs depth_written, resource.rs placed_filler_twins), which #642 fixes.
  • cargo xtask policy: ok.

Related: #392 warns once in diagnostics builds when the commit headroom drops under 2 GiB while the run goes on; this puts the numbers into every build's failure report. #603 adds the pipelines being compiled to the same crashes.log entry; neither touches the same code as this.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6596833082 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/645). Originally posted by [hxghr6](https://github.com/hxghr6) on 2026-11-25T03:53:54Z. --- A host GPU failure gives the removal reason and the debug layer's first error, but not how full memory was, though memory running out removes a device as well. On an RX 9070 XT the device went during world loads with a cold driver shader cache, and `crashes.log` said only `device removed ... (0x887A0006)`. The report (the log's error line and `crashes.log`) now ends with how full the system's commit and the card's memory were, of what can be read: ``` ; memory: the system's commit <in use> of <limit> MiB (this process <private> MiB); the card's own <in use> of <budget> MiB, shared <in use> of <budget> MiB ``` from `K32GetPerformanceInfo`, `K32GetProcessMemoryInfo` and `Host::video_memory` (the adapter's `QueryVideoMemoryInfo`, already used by the frame statistics). ## Tested on an RX 9070 XT Windows 11, Adrenalin 32.0.31044.16, 31 GB RAM with a page file Windows grows on demand. Diag build of this branch on `main` 310c6eb, the title run into the world with scripted keys and a cold driver shader cache. The device was removed 128 s in; `crashes.log`: ``` VIctory: host GPU failure: host GPU device removed after 3 submissions sent ahead (VICTORY_RELAY=1) of 10 lists; no breadcrumbs (...) (0x887A0004)); device removed: (...) (0x887A0006); a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command; memory: the system's commit 56828 of 57987 MiB (this process 29203 MiB); the card's own 12250 of 13936 MiB, shared 6238 of 15162 MiB ``` The system's commit stood at 98 % of its limit; the page file had already grown the limit from 37 GB (it was back at 38 GB after the run). The process's own private bytes, sampled every 10 s from outside, went from 10.3 GB in the menus to 13.4 GB as the world began and 28.6 GB ten seconds before the failure, while the world's pipelines compiled. So this removal came with memory running out, which the report now says. The same failure in earlier runs on this machine read only the removal reason. ## Checks - New test `host::trail::a_failure_says_how_full_memory_was`: the line's wording with all numbers, with only the system's, and with none, and that this process's own numbers are read. - `cargo test --workspace --locked`: 511 passed, 0 failed (GPU tests on the RX 9070 XT, DXIL validation on). - `cargo clippy --workspace --all-targets --locked -- -D warnings`, with and without `--all-features`: nothing in the changed code; both fail on `main` 310c6eb as it stands (`draw.rs` `sort_unstable_by_key`, `indirect.rs` `depth_written`, `resource.rs` `placed_filler_twins`), which #642 fixes. - `cargo xtask policy`: ok. Related: #392 warns once in diagnostics builds when the commit headroom drops under 2 GiB while the run goes on; this puts the numbers into every build's failure report. #603 adds the pipelines being compiled to the same `crashes.log` entry; neither touches the same code as this.
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/645:upstream-pr/645'
git switch 'upstream-pr/645'

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/645'
git switch 'upstream-pr/645'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/645'
git switch 'upstream-pr/645'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/645'
git switch 'main'
git merge --squash 'upstream-pr/645'
git switch 'main'
git merge --ff-only 'upstream-pr/645'
git switch 'main'
git merge 'upstream-pr/645'
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
fxceless/victory-fork!645
No description provided.