World load: device hung, DRED hides it #1348
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#1348
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?
@icdmkg2 on GitHub · 2026-11-24 17:34 UTC · original
Device removed when the world starts drawing (hardware: DEVICE_HUNG, WARP: internal removal)
Summary
The game reaches the menu and loading screens, then starts drawing the world at around 1 fps. Within about 90 s the host D3D12 device is removed, right after a large batch of command lists, and VIctory exits with
host GPU failure. It reproduces on hardware and on WARP.Environment
mainatffe310e(with #566 included), release build with--features diagnosticsVICTORY_D3D12_WARP=1)Repro
No input is needed. The crash follows on its own once the world starts drawing.
Hardware result (RX 6750 XT)
DXGI_ERROR_DEVICE_HUNGusually means a shader that loops forever, or a fault from an out-of-bounds or garbage descriptor access.With DRED enabled, it doesn't crash (hardware)
With
VICTORY_D3D12_DRED=1on the same RX 6750 XT, it ran for the full 240 s, past frame 3218 at 400–3700 draws/frame, with no device removal. Without DRED it is removed at frame 1370 every time. So far this is one DRED run against two crashing runs.DRED's auto-breadcrumbs change submission timing, so this looks like a synchronization or lifetime race, not a bad shader. Possible causes: a missing barrier or fence wait, a resource or descriptor reused or freed while still in flight, or a copy-back read racing the GPU. The heavy per-frame copy traffic, 150–860 MB of copies plus copy-back, may make the window wider.
WARP result
0x887a0005. WithVICTORY_D3D12_DEBUG=1, the debug layer reports no API errors, onlyRemoveDevice ... Plug-and-play stop, which points to a removal from inside WARP rather than API misuse.VICTORY_D3D12_DRED=1breadcrumbs are empty on WARP, so the "in flight" list it reports means nothing.Bisecting by
VICTORY_SKIP_PIPELINES(WARP)Two translator bugs found and fixed along the way
These are on a local branch, one commit on top of
ffe310e(I can open a PR), with all 120 victory-shader tests passing:s_buffer_loadon a descriptor read fromResourceDescriptorHeap[]was emitted as a CBV load. It is now a raw buffer load. This fixed GBV errors and garbage reads in the hair shaders.image_samplein compute shaders (for exampleCS_DensityShadowBlur_H) used implicit-derivative sampling, which fails validation outside pixel shaders. It now samples at level 0.image_sample_oandimage_sample_boutside pixel shaders are reported as unsupported instead of emitting invalid DXIL.The commit also adds the
GetDeviceRemovedReasoncode to the failure message, and prints the runtime shader hash inshader-info --verboseso log hashes can be matched to containers.Neither fix changes the device removal.
Untranslated shaders in the same run (405 warnings, for context)
image_gather4_lA pass whose producer shader is dropped may leave buffers that a later, translated shader then indexes with garbage. That is one plausible cause of the hang.
Suggested next steps
@MichaelSmithAI on GitHub · 2026-11-24 17:40 UTC · original
Could you share the scalar-buffer fix you offered as a commit or PR? The part we’d like to compare is how the translator identifies a read-only ResourceDescriptorHeap entry as a raw SRV when lowering
s_buffer_load. A description of the deciding metadata or instruction use would also help. The shader or title assets aren’t needed.On #1354 at
cd9699f, a source-built shader that reads and writes one descriptor inferred a raw UAV for that slot. Its other, read-only descriptor still emitted CBV properties under ResourceHeap. On an RTX 4090 under Wine, that read returned the seeded 73 with a matching CBV. With the same instructions and an explicitly declared raw table SRV, it returned the seeded 41. Both modules validated. This gives us two controls for testing the selection rule. The world-load removal remains a separate finding.@icdmkg2 on GitHub · 2026-11-24 17:48 UTC · original
Hardware for the runs in this issue (and #1409):
A Parsec virtual display adapter is also installed.
Update since the report: with
VICTORY_D3D12_DRED=1the removal still happens (frame 1685 on a longer run), so DRED doesn't hide it. On the RX 6750 XT, DRED reports page faults:smh_modify:CS_InterpolateStrandStyle(269b802f878c24e1), reading a buffer through a heap-loaded descriptor.3a79195f06d3ed85) at frame 1132. The faulting address is inside a freed 1024x1024 texture.@Logan-Gaillard on GitHub · 2026-11-25 10:13 UTC · original
Follow-up: on an RTX 5070 Laptop, the reported
0x887A0004isGetAutoBreadcrumbsOutputfailing, and the real reason is0x887A0006DEVICE_HUNGMeasured by @AlexisLRC (PC2) on the three-agent test bench (PC1 runs the game, PC2/PC3 code), on
Zettrox/ztrxat90b529f(one commit on top of upstream940d32f).Machine. Hybrid laptop, RTX 5070 Laptop 8 GB + Intel iGPU, 23.4 GB RAM, Windows, default
TdrDelay(2 s), title1.0.2.1,cargo xwin build --release -p victory.1. The
0x887A0004is a diagnostics artifact, not the cause.The original run exits with
host GPU failure ... (0x887A0004). With a--features diagnosticsbuild andVICTORY_D3D12_DRED=1,GetDeviceRemovedReasonreturns0x887A0006(DXGI_ERROR_DEVICE_HUNG). The0x887A0004comes fromGetAutoBreadcrumbsOutputbeing called on a device that was created without DRED, so "no breadcrumbs" and "DXGI_ERROR_UNSUPPORTED" are the same failure of the same call (crates/victory-gpu/src/host.rs:4202). A device created withD3D12_DEVICE_FLAG_ENABLE_AUTO_BREADCRUMBSreports the hung submission instead.2. What precedes the death.
In the original log, host submissions slow down first: 260 ms, 2296 ms, 4173 ms, then the device is gone during the 4178 ms wait, while ~355 pipelines are still being fabricated. Frame time tracks pipeline fabrication exactly: 1.4–3.2 s/frame while hundreds of pipelines are building, 0.25–0.7 s/frame once the queue is empty. That is a TDR during the fabrication window, not an invalid command (the
E_INVALIDARG"did not load it" lines are pipeline-cache misses; the PSO is created right after,pipeline/library.rs:549). Related: #1615 (every library load under one mutex).3. Five runs, none reproduced the death.
e0a8c4429320991bThe original death was at ~3 min 28, so the 180 s run was too short and the 300/360/420 s runs loaded a warm cache. A cold-cache 600 s run with submission timing is the next step to either reproduce it or exclude the TDR window.
4. One machine-level trap worth knowing.
e0a8rejected the shared pipeline cache with0x887E0001(a blob from another adapter), which means an earlier exe of the same build ran on the Intel iGPU and wrote that cache. On this hybrid laptop a freshly built exe is created on the iGPU unless a per-exe GPU preference exists, so A/B results can silently mix adapters. Two signals to check in any log:wave lanes(8–32 on the iGPU, 32–32 on the RTX) and the card budget.Thanks — the DRED/breadcrumb distinction came out of this thread.
@Marvisak on GitHub · 2026-11-25 10:16 UTC · original
Automated triage for the maintainers.
Thanks, a complete report (RX 6750 XT, driver 32.0.21045.29003, Windows 11 26300,
ffe310e, DRED, plus WARP). Your follow-up corrects the title: DRED doesn't hide the removal, and it reports page faults, the second one inside a freed 1024x1024 texture. That is the world device removal tracked in #557, the oldest complete report of it, where the A/B data lives.Since
ffe310e,maingainedd71c388, which binds root views as bounded views of their host copy; #557's latest results point to reads past the end of a title-memory copy, which this targets. Please try currentmainand post the result, with the commit hash, in #557. Open PR #2048 also references this report.The two translator fixes (raw loads for
s_buffer_loadon heap descriptors;image_sampleoutside pixel shaders) are on a local branch. Pull requests are open to everyone, so please open one so they can be reviewed against currentmain.Generated by Claude Code