Skip to content

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

Open
hxghr6 wants to merge 1 commit into
fxceless:mainfrom
hxghr6:diag/gpu-failure-memory
Open

hxghr6 wants to merge 1 commit into
fxceless:mainfrom
hxghr6:diag/gpu-failure-memory

Conversation

@hxghr6

@hxghr6 hxghr6 commented Nov 25, 2026 •

Copy link
Copy Markdown

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 GPU: clippy passes on main again #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.

A host GPU failure (a removed device, 0x887A0006 and the like) gave 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
with a 37 GB commit limit the process stood at 35.6 GB private when its
device went, and the report said nothing of it.

The report (the log's error line and crashes.log) now ends with

  ; 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 the adapter's
QueryVideoMemoryInfo (Host::video_memory), of what can be read.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant