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

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

@⁠hxghr6 on GitHub · 2026-11-25 03:53 UTC · original
hxghr6:diag/gpu-failure-memory → main · +86 −3 · 1 files · 1 commits · open

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.

**@⁠hxghr6** on GitHub · 2026-11-25 03:53 UTC · [original](https://github.com/fxceless/victory-fork/pull/645) `hxghr6:diag/gpu-failure-memory` → `main` · +86 −3 · 1 files · 1 commits · open 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.
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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:48:06 +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/645/head:github-bot/gh-645'
git switch 'github-bot/gh-645'

Merge

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