NVIDIA world hang: mesh shaders read through root SRVs megabytes past the end of their title-memory copy (DMA page fault, Aftermath); fix on a fork #951

Open
opened 2026-11-26 04:14:46 +00:00 by github-bot · 3 comments
Owner

@⁠gangg111 on GitHub · 2026-11-24 14:26 UTC · original

Setup

  • VIctory based on d2a4bae, plus #459, #483 and local work; diagnostics build (--profile diag --features diagnostics)
  • Windows 11 Pro 26300, NVIDIA GeForce RTX 3080 10 GB (GA102), driver 621.01, no Resizable BAR
  • Retail GTA VI 1.0.2.1, Series X (default)
  • No game files or dumps attached.

How it was measured

Nsight Aftermath (Nsight Graphics 2026.4) in global mode with GPU crash dumps only, shader error reporting off. With shader error reporting on, the driver stops the title on accesses that are otherwise harmless, and every run blamed a different compute shader; those reports were not the hang. The dumps were decoded with the Aftermath SDK, the faulting PC mapped to DXIL via VICTORY_DXIL_DUMP and GFSDK_Aftermath_GetShaderHash.

Finding 1: the world's device removal is a page fault behind a root SRV

Every real hang in the world (7 dumps) is Device state: Error_DMA_PageFault, a read of a GPU address that does not translate, in a mesh shader (857b2e13c9cc107f, c962201cddbdd7dd, f0c7efd2aceb2aaa, c2b963cd8c154f0a, 37f363f0a5dcd806, 7f7b42a21c8e68e3, db4835a364449a45). The faulting instruction is a RawBufferLoad from t3, space1, the title's root SRV.

A root SRV is a bare GPU address without bounds. draw.rs::root_view gives it an address inside the copy (shadow) of the title buffer or loose window it points into, and the shader fetches vertices megabytes past that point, past the end of the copy. On the console that is more title memory; on the host it is the next allocation. Logging every root SRV's host range (VICTORY_ROOT_LOG) against the fault address:

  • a root SRV at title 0x71fffc900 had 14,080 bytes left in its 4 MiB loose window; the fault was 3 MB past the window's end, inside a freed BC7 2048x2048 texture placed right after it (Aftermath resource tracking);
  • other dumps: 3.2 MB and about 16 MB past the end of the copy;
  • one root SRV had 42 KB left before the end of the title's committed memory, and the shader read 741 KB past it. So the reads also go past committed memory (streaming pools; the console answers those reads with zeros, see also ivall/xcl#1031).

This matches #59 (c2b963cd8c154f0a is the mesh shader in the RX 9070 XT fault there) and probably part of #898.

Fix (on a fork)

Two commits on gangg111/VIctory branch gpu-189:

  • gangg111/VIctory@a3a8fe7 GPU: a root SRV gets a copy that holds 32 MB past it: a root SRV closer than 32 MB to the end of its copy gets a copy holding [address, address + 32 MB): a title buffer around it if there is one, else a window of title memory on a power-of-two grid (each byte in at most two windows).
  • gangg111/VIctory@94908df GPU: wide root SRV windows are sparse buffers backed from the root SRV on: a wide window is a reserved buffer. Tiles from the lowest root SRV in it to the end of the title's committed memory map a CPU-visible heap; the rest stay unmapped and read as zeros (tiled resources tier 2+), at no memory cost. A window grows when the title commits more (checked at most every 100 ms) or a lower root SRV comes.

Results on the RTX 3080:

world wide copies
before device removed 1-2 min after entering the world, every run -
reach 8 MB page fault again -
reach 32 MB, fully backed windows 5 min in the world, no hang 180 windows, 11.5 GB
windows cut at the committed end page fault again (reads past committed memory) 4.2 GB
reach 32 MB, sparse windows (gangg111/VIctory@94908df) no page fault in 7 runs of 8-10 min, 6 of them to the end 206 windows, 3.2 GB

The seventh run ended in a TDR: a single 6.4 s list of compute work, no page fault, no Aftermath dump. That looks like the #898 family, not this one.

Finding 2 (preliminary): the world stays black because most indirect mesh records run empty

With the hang gone the world still presents black. Render target dumps (VICTORY_DUMP_TARGETS) at frames 1900 and 2000 show the geometry (a per-pixel class buffer written by compute has the opening cutscene's characters, scaffolding, a crane), but the RGBA8 G-buffer targets are all zero, although about 944 indirect mesh executions and 50 direct mesh dispatches target them and run. In a PIX capture of a world frame, 4,366 ExecuteIndirect calls expand to only 202 executed commands, with zero pixel shader invocations attributed to them. None of these executions use a count buffer.

Raising the argument clamp's per-list budget in indirect.rs (BUDGET 2^27 to 2^31, VICTORY_INDIRECT_BUDGET_LOG2=31, a local knob) made the G-buffer targets at frame 1950 hold the world (power line pylons with wires, the water surface, the sky in the normal target). The final image is still black, so lighting or later passes lose it too. A same-frame A/B against the default budget is running; I will add it here. If it holds, records with garbage arguments (from passes that do not translate) use up the budget early in a list, and every later record runs empty. Note that #898 lowered the budget without curing its hang, which is a different symptom.

Also found earlier: NVIDIA reads a raw view of a structured SRV only up to NumElements * 4 bytes

ByteAddressBuffer.Load through a structured SRV returns zero past NumElements * 4 bytes on NVIDIA (WARP reads the whole buffer). A shader that the translator lowers to raw loads on a structured table slot therefore reads zeros on NVIDIA, which made the world's cascade loops run to the loop limit. Fixed on the same branch in gangg111/VIctory@0a4b89f (raw views for table slots a shader reads only raw). Related: #704, #709.

AI-assisted (Claude).

**@⁠gangg111** on GitHub · 2026-11-24 14:26 UTC · [original](https://github.com/Marvisak/VIctory/issues/951) ### Setup - VIctory based on `d2a4bae`, plus #459, #483 and local work; diagnostics build (`--profile diag --features diagnostics`) - Windows 11 Pro 26300, NVIDIA GeForce RTX 3080 10 GB (GA102), driver 621.01, no Resizable BAR - Retail GTA VI 1.0.2.1, Series X (default) - No game files or dumps attached. ### How it was measured Nsight Aftermath (Nsight Graphics 2026.4) in global mode with **GPU crash dumps only**, shader error reporting off. With shader error reporting on, the driver stops the title on accesses that are otherwise harmless, and every run blamed a different compute shader; those reports were not the hang. The dumps were decoded with the Aftermath SDK, the faulting PC mapped to DXIL via `VICTORY_DXIL_DUMP` and `GFSDK_Aftermath_GetShaderHash`. ### Finding 1: the world's device removal is a page fault behind a root SRV Every real hang in the world (7 dumps) is `Device state: Error_DMA_PageFault`, a read of a GPU address that does not translate, in a **mesh** shader (`857b2e13c9cc107f`, `c962201cddbdd7dd`, `f0c7efd2aceb2aaa`, `c2b963cd8c154f0a`, `37f363f0a5dcd806`, `7f7b42a21c8e68e3`, `db4835a364449a45`). The faulting instruction is a `RawBufferLoad` from `t3, space1`, the title's root SRV. A root SRV is a bare GPU address without bounds. `draw.rs::root_view` gives it an address inside the copy (`shadow`) of the title buffer or loose window it points into, and the shader fetches vertices megabytes past that point, past the end of the copy. On the console that is more title memory; on the host it is the next allocation. Logging every root SRV's host range (`VICTORY_ROOT_LOG`) against the fault address: - a root SRV at title `0x71fffc900` had **14,080 bytes** left in its 4 MiB loose window; the fault was **3 MB past the window's end**, inside a freed BC7 2048x2048 texture placed right after it (Aftermath resource tracking); - other dumps: 3.2 MB and about 16 MB past the end of the copy; - one root SRV had 42 KB left before the end of the title's **committed** memory, and the shader read **741 KB past it**. So the reads also go past committed memory (streaming pools; the console answers those reads with zeros, see also ivall/xcl#1031). This matches #59 (`c2b963cd8c154f0a` is the mesh shader in the RX 9070 XT fault there) and probably part of #898. ### Fix (on a fork) Two commits on `gangg111/VIctory` branch [`gpu-189`](https://github.com/gangg111/VIctory/tree/gpu-189): - gangg111/VIctory@a3a8fe7 *GPU: a root SRV gets a copy that holds 32 MB past it*: a root SRV closer than 32 MB to the end of its copy gets a copy holding `[address, address + 32 MB)`: a title buffer around it if there is one, else a window of title memory on a power-of-two grid (each byte in at most two windows). - gangg111/VIctory@94908df *GPU: wide root SRV windows are sparse buffers backed from the root SRV on*: a wide window is a reserved buffer. Tiles from the lowest root SRV in it to the end of the title's committed memory map a CPU-visible heap; the rest stay unmapped and read as zeros (tiled resources tier 2+), at no memory cost. A window grows when the title commits more (checked at most every 100 ms) or a lower root SRV comes. Results on the RTX 3080: | | world | wide copies | |---|---|---| | before | device removed 1-2 min after entering the world, every run | - | | reach 8 MB | page fault again | - | | reach 32 MB, fully backed windows | 5 min in the world, no hang | 180 windows, 11.5 GB | | windows cut at the committed end | page fault again (reads past committed memory) | 4.2 GB | | **reach 32 MB, sparse windows (gangg111/VIctory@94908df)** | **no page fault in 7 runs of 8-10 min, 6 of them to the end** | **206 windows, 3.2 GB** | The seventh run ended in a TDR: a single 6.4 s list of compute work, no page fault, no Aftermath dump. That looks like the #898 family, not this one. ### Finding 2 (preliminary): the world stays black because most indirect mesh records run empty With the hang gone the world still presents black. Render target dumps (`VICTORY_DUMP_TARGETS`) at frames 1900 and 2000 show the geometry (a per-pixel class buffer written by compute has the opening cutscene's characters, scaffolding, a crane), but the RGBA8 G-buffer targets are all zero, although about 944 indirect mesh executions and 50 direct mesh dispatches target them and run. In a PIX capture of a world frame, **4,366 `ExecuteIndirect` calls expand to only 202 executed commands**, with zero pixel shader invocations attributed to them. None of these executions use a count buffer. Raising the argument clamp's per-list budget in `indirect.rs` (`BUDGET` 2^27 to 2^31, `VICTORY_INDIRECT_BUDGET_LOG2=31`, a local knob) made the G-buffer targets at frame 1950 hold the world (power line pylons with wires, the water surface, the sky in the normal target). The final image is still black, so lighting or later passes lose it too. A same-frame A/B against the default budget is running; I will add it here. If it holds, records with garbage arguments (from passes that do not translate) use up the budget early in a list, and every later record runs empty. Note that #898 lowered the budget without curing its hang, which is a different symptom. ### Also found earlier: NVIDIA reads a raw view of a structured SRV only up to `NumElements * 4` bytes `ByteAddressBuffer.Load` through a structured SRV returns zero past `NumElements * 4` bytes on NVIDIA (WARP reads the whole buffer). A shader that the translator lowers to raw loads on a structured table slot therefore reads zeros on NVIDIA, which made the world's cascade loops run to the loop limit. Fixed on the same branch in gangg111/VIctory@0a4b89f (*raw views for table slots a shader reads only raw*). Related: #704, #709. AI-assisted (Claude).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:14:46 +00:00
Author
Owner

@⁠gangg111 on GitHub · 2026-11-24 14:32 UTC · original

Correction to Finding 2: the same-frame A/B does not support the budget explanation.

With the default budget (2^27), frame 1895 of the world has the G-buffer drawn: two RGBA8 targets hold the scene's geometry (normals of walls and ground, mean 20 and 61 of 255) and the depth-like target holds the same shapes. The all-zero G-buffer at frames 1900 and 2000 of earlier runs came from what was on screen at that moment (the opening cutscene), not from the clamp's budget, and the "raised budget" run that showed pylons and water simply landed on a gameplay frame. Please disregard that part.

What stands: in all variants the presented image stays black while the G-buffer has geometry, so the picture is lost in lighting or a later pass. The root SRV fix (Finding 1) and its measurements are unaffected.

**@⁠gangg111** on GitHub · 2026-11-24 14:32 UTC · [original](https://github.com/Marvisak/VIctory/issues/951#issuecomment-7134540731) Correction to Finding 2: the same-frame A/B does **not** support the budget explanation. With the default budget (2^27), frame 1895 of the world has the G-buffer drawn: two RGBA8 targets hold the scene's geometry (normals of walls and ground, mean 20 and 61 of 255) and the depth-like target holds the same shapes. The all-zero G-buffer at frames 1900 and 2000 of earlier runs came from what was on screen at that moment (the opening cutscene), not from the clamp's budget, and the "raised budget" run that showed pylons and water simply landed on a gameplay frame. Please disregard that part. What stands: in all variants the presented image stays black while the G-buffer has geometry, so the picture is lost in lighting or a later pass. The root SRV fix (Finding 1) and its measurements are unaffected.
Author
Owner

@⁠jamesn-xt on GitHub · 2026-11-24 16:59 UTC · original

Independent RTX 4080 reproduction and a synthetic regression test for the raw-table-view change described here.

Windows 11 x64 build 26200, Ryzen 5 5600, 32 GiB RAM, RTX 4080 / NVIDIA 617.42, Rust 1.98.1.

I backported gangg111's 0a4b89f onto the tested integration from #1096/#492, preserving the original authorship. API adaptations retain current heap-initialization safety and table-allocation failure handling, use #206's current raw-window argument order, and update current HostShader test initializers/cache metadata.

Source: https://github.com/jamesn-xt/VIctory/tree/test/rtx4080-raw-table-views

  • Backport: 5640d9819fb9d56a3006fd0d8f4790eacc51db1a (original author retained).
  • New regression test: 682eed07349a9e642d6031c0ee3db0e6bb78db50.

The new case reuses #206's synthetic read/write fixture, but starts the SRV on a 32-byte element boundary so the misalignment fallback cannot fix it. Four 32-byte records are read through a ByteAddressBuffer; all 128 bytes must match the generated numbered dwords, and existing write/canary checks remain.

  • Raw-only correction enabled: all 32 dwords match on RTX 4080.
  • Negative control VICTORY_RAW_SRV=0: the targeted test fails, returning the first 8 expected dwords and zeros for the remaining 24. This is the measured result, not a claim about the exact general hardware bound.
  • All-feature workspace tests: 360 passed, 6 ignored.
  • Workspace Clippy, all targets/all features, warnings denied: passed.
  • Diagnostics build and staged asset-policy hooks passed.

No title run with this backport yet, so it is not established as a fix for our 32-list device hang or black 3D output. The previous integrated runtime still produced a black 3D-stage frame and device removal as reported in #1096. No retail logs, game captures or title-derived fixtures are attached.

**@⁠jamesn-xt** on GitHub · 2026-11-24 16:59 UTC · [original](https://github.com/Marvisak/VIctory/issues/951#issuecomment-7138511988) Independent RTX 4080 reproduction and a synthetic regression test for the raw-table-view change described here. Windows 11 x64 build 26200, Ryzen 5 5600, 32 GiB RAM, RTX 4080 / NVIDIA 617.42, Rust 1.98.1. I backported gangg111's `0a4b89f` onto the tested integration from #1096/#492, preserving the original authorship. API adaptations retain current heap-initialization safety and table-allocation failure handling, use #206's current raw-window argument order, and update current HostShader test initializers/cache metadata. Source: https://github.com/jamesn-xt/VIctory/tree/test/rtx4080-raw-table-views - Backport: `5640d9819fb9d56a3006fd0d8f4790eacc51db1a` (original author retained). - New regression test: `682eed07349a9e642d6031c0ee3db0e6bb78db50`. The new case reuses #206's synthetic read/write fixture, but starts the SRV on a 32-byte element boundary so the misalignment fallback cannot fix it. Four 32-byte records are read through a ByteAddressBuffer; all 128 bytes must match the generated numbered dwords, and existing write/canary checks remain. - Raw-only correction enabled: all 32 dwords match on RTX 4080. - Negative control `VICTORY_RAW_SRV=0`: the targeted test fails, returning the first 8 expected dwords and zeros for the remaining 24. This is the measured result, not a claim about the exact general hardware bound. - All-feature workspace tests: 360 passed, 6 ignored. - Workspace Clippy, all targets/all features, warnings denied: passed. - Diagnostics build and staged asset-policy hooks passed. No title run with this backport yet, so it is not established as a fix for our 32-list device hang or black 3D output. The previous integrated runtime still produced a black 3D-stage frame and device removal as reported in #1096. No retail logs, game captures or title-derived fixtures are attached.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 06:57 UTC · original · edited 2026-11-25 09:56 UTC

Automated triage for the maintainers.

Thanks for the Aftermath work (RTX 3080, driver 621.01, Windows 11 26300, d2a4bae plus patches), and to @⁠taovuokko for the run on current main.

Raw reads through structured views: confirmed on main (940d32f). buffer_srv in crates/victory-gpu/src/descriptor/host.rs mirrors the title's structured view as a structured host view with its stride. When the translated program reads that slot with raw loads, NVIDIA returns zeros past the first NumElements * 4 bytes, as measured here. The RTX 2080 Ti run ties the world's slowest compute program (8.7-13 s per dispatch) to this and shows that cost disappearing once such views are raw. #1762, which made that change, was closed without being merged. Open PR #2178 ("back structured buffer views with raw descriptors") appears to carry the same change. Review belongs there, including the 16-byte start alignment noted above.

Root SRV page fault: since d71c388, root_view in crates/victory-gpu/src/draw.rs binds a raw view over the whole host copy, so a read past the copy returns zero instead of faulting. Nobody has rerun Aftermath on current main yet. A run showing whether Error_DMA_PageFault in these mesh programs is gone would settle that part. The gpu-189 branch isn't in a pull request, and pull requests are open to everyone. The NVIDIA world hang is tracked in #71.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 06:57 UTC · [original](https://github.com/Marvisak/VIctory/issues/951#issuecomment-7155333702) · edited 2026-11-25 09:56 UTC <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-25T09:36:33Z at=2026-11-25T09:50:38Z --> Automated triage for the maintainers. Thanks for the Aftermath work (RTX 3080, driver 621.01, Windows 11 26300, `d2a4bae` plus patches), and to @⁠taovuokko for the run on current `main`. **Raw reads through structured views: confirmed on `main` (`940d32f`).** `buffer_srv` in `crates/victory-gpu/src/descriptor/host.rs` mirrors the title's structured view as a structured host view with its stride. When the translated program reads that slot with raw loads, NVIDIA returns zeros past the first `NumElements * 4` bytes, as measured here. The RTX 2080 Ti run ties the world's slowest compute program (8.7-13 s per dispatch) to this and shows that cost disappearing once such views are raw. #1762, which made that change, was closed without being merged. Open PR #2178 ("back structured buffer views with raw descriptors") appears to carry the same change. Review belongs there, including the 16-byte start alignment noted above. **Root SRV page fault:** since `d71c388`, `root_view` in `crates/victory-gpu/src/draw.rs` binds a raw view over the whole host copy, so a read past the copy returns zero instead of faulting. Nobody has rerun Aftermath on current `main` yet. A run showing whether `Error_DMA_PageFault` in these mesh programs is gone would settle that part. The `gpu-189` branch isn't in a pull request, and pull requests are open to everyone. The NVIDIA world hang is tracked in #71. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#951
No description provided.