World load: device hung, DRED hides it #1348

Open
opened 2026-11-26 04:28:20 +00:00 by github-bot · 4 comments
Owner

@⁠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

  • VIctory main at ffe310e (with #566 included), release build with --features diagnostics
  • Windows 11 Pro 10.0.26300
  • AMD Radeon RX 6750 XT, driver 32.0.21045.29003
  • Also reproduced on the WARP software adapter (VICTORY_D3D12_WARP=1)

Repro

cargo build --release -p victory --features diagnostics
victory run <title>\game_scarlett_master.exe --execute

No input is needed. The crash follows on its own once the world starts drawing.

Hardware result (RX 6750 XT)

host GPU device removed (0x887a0006) after a submission of 30 lists; no breadcrumbs
(The specified device interface or feature level is not supported on this system. (0x887A0004));
device removed: The GPU will not respond to more commands ... (0x887A0006)
  • Frame 1370, about 100 s after launch.
  • Draw load at this point is 300–2000 draws/frame, with about 1000 dropped for missing pipelines and about 1000 indirect draws dropped.
  • DXGI_ERROR_DEVICE_HUNG usually 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=1 on 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

  • The removal reason is 0x887a0005. With VICTORY_D3D12_DEBUG=1, the debug layer reports no API errors, only RemoveDevice ... Plug-and-play stop, which points to a removal from inside WARP rather than API misuse.
  • VICTORY_D3D12_DRED=1 breadcrumbs are empty on WARP, so the "in flight" list it reports means nothing.
  • It always happens right after the same 32-list submission.

Bisecting by VICTORY_SKIP_PIPELINES (WARP)

  • 49 shaders first bind in the batch before the removal.
  • Skipping the 16 most likely suspects (hair, fog/density, new compute) still crashes. In every quarter split of those 16, the device removal no longer appeared in the log, but each run still exited with code 5. The control run that skipped all 16 behaved the same way, so these splits don't isolate a culprit.
  • Skipping all 49, or the other 33, keeps the device alive, but then the game segfaults (exit 139), probably because it depends on the output of those passes. So we couldn't narrow it down to one shader by skipping groups.

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:

  1. s_buffer_load on a descriptor read from ResourceDescriptorHeap[] was emitted as a CBV load. It is now a raw buffer load. This fixed GBV errors and garbage reads in the hair shaders.
  2. image_sample in compute shaders (for example CS_DensityShadowBlur_H) used implicit-derivative sampling, which fails validation outside pixel shaders. It now samples at level 0. image_sample_o and image_sample_b outside pixel shaders are reported as unsupported instead of emitting invalid DXIL.

The commit also adds the GetDeviceRemovedReason code to the failure message, and prints the runtime shader hash in shader-info --verbose so log hashes can be matched to containers.

Neither fix changes the device removal.

Untranslated shaders in the same run (405 warnings, for context)

count reason
79 a select on an untracked mask
71 a lane mask holding lanes elsewhere read as data
54 a descriptor read only as data
43 a structured buffer of unknown stride
35 an address in an SGPR that is no root parameter
33 a scalar memory read as data
17 an address not from a root parameter
14 a 64-bit image atomic
11 a lane mask read as data
8 an address from a phi
7 image_gather4_l

A 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

  • Look for a missing barrier, fence wait or early free around the copy and copy-back paths, since DRED hides the hang.
  • Use PIX or RGP with the hardware device to see which dispatch or draw hangs. On AMD, DRED with real breadcrumbs should name it too.
  • A per-draw breadcrumb or flush mode, run one shader at a time, to bisect the batch without the game crashing.
**@⁠icdmkg2** on GitHub · 2026-11-24 17:34 UTC · [original](https://github.com/Marvisak/VIctory/issues/1348) ## 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 - VIctory `main` at `ffe310e` (with #566 included), release build with `--features diagnostics` - Windows 11 Pro 10.0.26300 - AMD Radeon RX 6750 XT, driver 32.0.21045.29003 - Also reproduced on the WARP software adapter (`VICTORY_D3D12_WARP=1`) ### Repro ``` cargo build --release -p victory --features diagnostics victory run <title>\game_scarlett_master.exe --execute ``` No input is needed. The crash follows on its own once the world starts drawing. ### Hardware result (RX 6750 XT) ``` host GPU device removed (0x887a0006) after a submission of 30 lists; no breadcrumbs (The specified device interface or feature level is not supported on this system. (0x887A0004)); device removed: The GPU will not respond to more commands ... (0x887A0006) ``` - Frame 1370, about 100 s after launch. - Draw load at this point is 300–2000 draws/frame, with about 1000 dropped for missing pipelines and about 1000 indirect draws dropped. - `DXGI_ERROR_DEVICE_HUNG` usually 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=1` on 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 - The removal reason is `0x887a0005`. With `VICTORY_D3D12_DEBUG=1`, the debug layer reports no API errors, only `RemoveDevice ... Plug-and-play stop`, which points to a removal from inside WARP rather than API misuse. - `VICTORY_D3D12_DRED=1` breadcrumbs are empty on WARP, so the "in flight" list it reports means nothing. - It always happens right after the same 32-list submission. ### Bisecting by `VICTORY_SKIP_PIPELINES` (WARP) - 49 shaders first bind in the batch before the removal. - Skipping the 16 most likely suspects (hair, fog/density, new compute) still crashes. In every quarter split of those 16, the device removal no longer appeared in the log, but each run still exited with code 5. The control run that skipped all 16 behaved the same way, so these splits don't isolate a culprit. - Skipping all 49, or the other 33, keeps the device alive, but then the game segfaults (exit 139), probably because it depends on the output of those passes. So we couldn't narrow it down to one shader by skipping groups. ### 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: 1. `s_buffer_load` on a descriptor read from `ResourceDescriptorHeap[]` was emitted as a CBV load. It is now a raw buffer load. This fixed GBV errors and garbage reads in the hair shaders. 2. `image_sample` in compute shaders (for example `CS_DensityShadowBlur_H`) used implicit-derivative sampling, which fails validation outside pixel shaders. It now samples at level 0. `image_sample_o` and `image_sample_b` outside pixel shaders are reported as unsupported instead of emitting invalid DXIL. The commit also adds the `GetDeviceRemovedReason` code to the failure message, and prints the runtime shader hash in `shader-info --verbose` so log hashes can be matched to containers. Neither fix changes the device removal. ### Untranslated shaders in the same run (405 warnings, for context) | count | reason | |---|---| | 79 | a select on an untracked mask | | 71 | a lane mask holding lanes elsewhere read as data | | 54 | a descriptor read only as data | | 43 | a structured buffer of unknown stride | | 35 | an address in an SGPR that is no root parameter | | 33 | a scalar memory read as data | | 17 | an address not from a root parameter | | 14 | a 64-bit image atomic | | 11 | a lane mask read as data | | 8 | an address from a phi | | 7 | `image_gather4_l` | A 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 - Look for a missing barrier, fence wait or early free around the copy and copy-back paths, since DRED hides the hang. - Use PIX or RGP with the hardware device to see which dispatch or draw hangs. On AMD, DRED with real breadcrumbs should name it too. - A per-draw breadcrumb or flush mode, run one shader at a time, to bisect the batch without the game crashing.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:28:20 +00:00
Author
Owner

@⁠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.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 17:40 UTC · [original](https://github.com/Marvisak/VIctory/issues/1348#issuecomment-7139536848) 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.
Author
Owner

@⁠icdmkg2 on GitHub · 2026-11-24 17:48 UTC · original

Hardware for the runs in this issue (and #1409):

CPU Intel Core i9-13900K (24 cores / 32 threads)
RAM 32 GB DDR5-6000 (2 × 16 GB)
GPU (used) AMD Radeon RX 6750 XT (12 GB), driver 32.0.21045.29003
iGPU Intel UHD Graphics 770, driver 32.0.101.7088. Present, but not the D3D12 adapter used.
Motherboard MSI B760 GAMING PLUS WIFI (MS-7D98)
OS Windows 11 Pro 10.0.26300
Storage NVMe and SATA SSDs (WD_BLACK SN750 2 TB, WD Blue SN5000 1 TB, Crucial BX500 1 TB)
TDR / HAGS registry keys not set (Windows defaults)

A Parsec virtual display adapter is also installed.

Update since the report: with VICTORY_D3D12_DRED=1 the removal still happens (frame 1685 on a longer run), so DRED doesn't hide it. On the RX 6750 XT, DRED reports page faults:

  • In smh_modify:CS_InterpolateStrandStyle (269b802f878c24e1), reading a buffer through a heap-loaded descriptor.
  • With that shader skipped, in another dispatch (3a79195f06d3ed85) at frame 1132. The faulting address is inside a freed 1024x1024 texture.
**@⁠icdmkg2** on GitHub · 2026-11-24 17:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/1348#issuecomment-7139742310) Hardware for the runs in this issue (and #1409): | | | |---|---| | CPU | Intel Core i9-13900K (24 cores / 32 threads) | | RAM | 32 GB DDR5-6000 (2 × 16 GB) | | GPU (used) | AMD Radeon RX 6750 XT (12 GB), driver 32.0.21045.29003 | | iGPU | Intel UHD Graphics 770, driver 32.0.101.7088. Present, but not the D3D12 adapter used. | | Motherboard | MSI B760 GAMING PLUS WIFI (MS-7D98) | | OS | Windows 11 Pro 10.0.26300 | | Storage | NVMe and SATA SSDs (WD_BLACK SN750 2 TB, WD Blue SN5000 1 TB, Crucial BX500 1 TB) | | TDR / HAGS registry keys | not set (Windows defaults) | A Parsec virtual display adapter is also installed. Update since the report: with `VICTORY_D3D12_DRED=1` the removal still happens (frame 1685 on a longer run), so DRED doesn't hide it. On the RX 6750 XT, DRED reports page faults: - In `smh_modify:CS_InterpolateStrandStyle` (`269b802f878c24e1`), reading a buffer through a heap-loaded descriptor. - With that shader skipped, in another dispatch (`3a79195f06d3ed85`) at frame 1132. The faulting address is inside a freed 1024x1024 texture.
Author
Owner

@⁠Logan-Gaillard on GitHub · 2026-11-25 10:13 UTC · original

Follow-up: on an RTX 5070 Laptop, the reported 0x887A0004 is GetAutoBreadcrumbsOutput failing, and the real reason is 0x887A0006 DEVICE_HUNG

Measured by @⁠AlexisLRC (PC2) on the three-agent test bench (PC1 runs the game, PC2/PC3 code), on Zettrox/ztrx at 90b529f (one commit on top of upstream 940d32f).

Machine. Hybrid laptop, RTX 5070 Laptop 8 GB + Intel iGPU, 23.4 GB RAM, Windows, default TdrDelay (2 s), title 1.0.2.1, cargo xwin build --release -p victory.

1. The 0x887A0004 is a diagnostics artifact, not the cause.

The original run exits with host GPU failure ... (0x887A0004). With a --features diagnostics build and VICTORY_D3D12_DRED=1, GetDeviceRemovedReason returns 0x887A0006 (DXGI_ERROR_DEVICE_HUNG). The 0x887A0004 comes from GetAutoBreadcrumbsOutput being 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 with D3D12_DEVICE_FLAG_ENABLE_AUTO_BREADCRUMBS reports 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.

Run Build Cache Window Result
e0a8 release default 180 s held
c442 diagnostics + DRED warm (149 MB) 300 s held
9320 diagnostics + DRED cold, own dir 360 s held
991b diagnostics + DRED warm 420 s held, 13 054 MB working set

The 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.

e0a8 rejected the shared pipeline cache with 0x887E0001 (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.

**@⁠Logan-Gaillard** on GitHub · 2026-11-25 10:13 UTC · [original](https://github.com/Marvisak/VIctory/issues/1348#issuecomment-7159409314) ### Follow-up: on an RTX 5070 Laptop, the reported `0x887A0004` is `GetAutoBreadcrumbsOutput` failing, and the real reason is `0x887A0006` DEVICE_HUNG Measured by @⁠AlexisLRC (PC2) on the three-agent test bench (PC1 runs the game, PC2/PC3 code), on `Zettrox/ztrx` at `90b529f` (one commit on top of upstream `940d32f`). **Machine.** Hybrid laptop, RTX 5070 Laptop 8 GB + Intel iGPU, 23.4 GB RAM, Windows, default `TdrDelay` (2 s), title `1.0.2.1`, `cargo xwin build --release -p victory`. **1. The `0x887A0004` is a diagnostics artifact, not the cause.** The original run exits with `host GPU failure ... (0x887A0004)`. With a `--features diagnostics` build and `VICTORY_D3D12_DRED=1`, `GetDeviceRemovedReason` returns `0x887A0006` (`DXGI_ERROR_DEVICE_HUNG`). The `0x887A0004` comes from `GetAutoBreadcrumbsOutput` being 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 with `D3D12_DEVICE_FLAG_ENABLE_AUTO_BREADCRUMBS` reports 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.** | Run | Build | Cache | Window | Result | | --- | --- | --- | --- | --- | | `e0a8` | release | default | 180 s | held | | `c442` | diagnostics + DRED | warm (149 MB) | 300 s | held | | `9320` | diagnostics + DRED | cold, own dir | 360 s | held | | `991b` | diagnostics + DRED | warm | 420 s | held, 13 054 MB working set | The 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.** `e0a8` rejected the shared pipeline cache with `0x887E0001` (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.
Author
Owner

@⁠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, main gained d71c388, 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 current main and 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_load on heap descriptors; image_sample outside pixel shaders) are on a local branch. Pull requests are open to everyone, so please open one so they can be reviewed against current main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 10:16 UTC · [original](https://github.com/Marvisak/VIctory/issues/1348#issuecomment-7159481946) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-24T17:48:52Z at=2026-11-25T09:50:38Z --> 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`, `main` gained `d71c388`, 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 current `main` and 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_load` on heap descriptors; `image_sample` outside pixel shaders) are on a local branch. Pull requests are open to everyone, so please open one so they can be reviewed against current `main`. --- _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#1348
No description provided.