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
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#951
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@gangg111 on GitHub · 2026-11-24 14:26 UTC · original
Setup
d2a4bae, plus #459, #483 and local work; diagnostics build (--profile diag --features diagnostics)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_DUMPandGFSDK_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 aRawBufferLoadfromt3, space1, the title's root SRV.A root SRV is a bare GPU address without bounds.
draw.rs::root_viewgives 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:0x71fffc900had 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);This matches #59 (
c2b963cd8c154f0ais the mesh shader in the RX 9070 XT fault there) and probably part of #898.Fix (on a fork)
Two commits on
gangg111/VIctorybranchgpu-189:[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).Results on the RTX 3080:
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,366ExecuteIndirectcalls 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(BUDGET2^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 * 4bytesByteAddressBuffer.Loadthrough a structured SRV returns zero pastNumElements * 4bytes 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: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.
@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
0a4b89fonto 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
5640d9819fb9d56a3006fd0d8f4790eacc51db1a(original author retained).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.
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.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.
@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,
d2a4baeplus patches), and to @taovuokko for the run on currentmain.Raw reads through structured views: confirmed on
main(940d32f).buffer_srvincrates/victory-gpu/src/descriptor/host.rsmirrors 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 firstNumElements * 4bytes, 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_viewincrates/victory-gpu/src/draw.rsbinds a raw view over the whole host copy, so a read past the copy returns zero instead of faulting. Nobody has rerun Aftermath on currentmainyet. A run showing whetherError_DMA_PageFaultin these mesh programs is gone would settle that part. Thegpu-189branch 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