D3D12.X: the GPU hangs after thousands of dispatches put off to the submit (#2118) when the waits are bounded #2617

Open
opened 2026-11-26 05:34:58 +00:00 by github-bot · 0 comments
Owner

@⁠iggyvilla on GitHub · 2026-11-26 02:21 UTC · original

On main 08db802, a retail title hangs the GPU (device removed, 0x887a0007) some time after its world start. This happens when dispatches whose pipeline is still being built are put off to the submit (#2118) and nothing waits there until the pipeline is built. With XCL_PSO_WAIT_MS=1 it happens on main alone. #2581 reports the same setting on NVIDIA, ending in Close → E_OUTOFMEMORY and then a device removal; this is an RDNA2 run with no E_OUTOFMEMORY. Turning the put-off off (as #2581 does with a budget, and #2615 does always) made the hang go away in 3 of 3 walks. Its cause inside the put-off path is not found.

Steps

  1. main 08db802, release build. Retail title, restored save, past the world start. XCL_PSO_WAIT_MS=1, XCL_NETWORK=0, everything else default (warm XCL and driver caches from earlier runs).
  2. Let it run for 360 s.
  3. The log counts put-off dispatches into the thousands, and the device is then removed.

What we saw (AMD Radeon RX 6650 XT 8 GB, RDNA2, driver 32.0.21045.29003, Ryzen 7 5700X, 32 GB RAM + 64 GB pagefile, Windows 11 26300; 360 s walks, one at a time)

build setting walks put-off calls (last logged) device removed
main 08db802 XCL_PSO_WAIT_MS=1 1 #8192 at 187 s 200.6 s
main 08db802 + #2615 without its defer check (no bind waits; put-off kept) + #751 unset 3 #8192 at 172–217 s 174.8 s, 218.0 s, 222.2 s
#2615 (defer returns false: no put-off) + #751 unset 2 0 none (361 s; 357 s, ended by an out-of-RAM Close → E_OUTOFMEMORY and the title's int3, not a removal)
#2615 + #751 XCL_PSO_WAIT_MS=200 1 0 none (356 s)
main 08db802 unset 2 ≤ #512 none, but it stops presenting at 144–150 s (the submit waits for a 2.4 MB compute compile; see #2615)
  • In the runs with the put-off, most of the put-off dispatches find their pipeline built by the submit and run. Builds were fast, from the driver's blobs of earlier runs. For example, 2 602 of 32 768 dispatches were skipped on main, and 659 of 35 326 in one of the others.
  • Shortly before the removal, two of the four runs show a CPU-side wait that times out for a value the compute queue writes (Write64), with the memory one value short:
    D3D12.X: Wait64BitValueX timed out after 2000 ms at 0x70417ff00 (op 7, want 0x818, … memory holds Some(817); queue_type=0 …)
    D3D12 device removed: 0x887a0007 The GPU will not respond to more commands …
    
  • With XCL_DRED=1 (one run with the put-off):
    DRED page fault at GPU VA 0x0; allocations there: []; recently freed: []
    
    No breadcrumb lines followed, so no list or pipeline is named.
  • In all four runs that hung, 0.3–2 s before the removal, the title asks for an interface it asks for in no other run, with or without the put-off:
    D3D12.X: QueryInterface(3febd6dd-4973-4787-8194-e45f9e28923e) – interface unknown on the PC (console-only?)
    
    It is most likely the title reacting to the stuck GPU, not a cause.
  • Ruled out as the difference: video memory (runs without the put-off ended with more in use), and the "submitted while its previous submit is still on the GPU" and "reset while its last submit is on the GPU" lines, which appear at 4–8 s in every run.
  • In the one run with the put-off that someone watched, the intro's year card flashed twice before the hang. That had not been seen before.

What is known / not known

  • The GPU used a null address (DRED, VA 0). Which command list, segment or pipeline did it is not known.
  • Read in the code and found consistent:
    • list_x::deferred_segment resets and closes each placeholder segment.
    • record_deferred resets the list's own allocator through alloc_pool, which takes another backing while one is in flight, and records the segments in order.
  • Not checked, candidates:
    1. A put-off dispatch recorded at the submit builds its root arguments from the segment's bind state (inherit_for_split, then pass_arena from segment to segment). An address left 0 there would fault at 0.
    2. A producer dispatch is skipped because its pipeline is not built by the submit, while a consumer put off after it, whose pipeline is built by then, runs and reads an address or argument the producer should have written. Without the put-off, both are recorded at the bind and both are skipped or both run, unless one of the two pipelines is built in between.
    3. A segment or recording is run twice (the flash above).
  • On main with default settings the submit waits until each pipeline is built, so this path is reached rarely: there it stops at the 2.4 MB compile first.

Related

  • #2118 (the put-off), #2581 (no put-off while XCL_PSO_WAIT_MS is set; NVIDIA, Close → E_OUTOFMEMORY), #2615 (no wait to the end, and so no put-off).

AI use

  • Claude Code, Claude Opus 5.5 (a3): read the logs and the code, and wrote this issue.
  • Walks: launched by Claude Code, Claude Opus 5.5 (the coordinator) and Claude Code, Claude Sonnet 5.5 (a1), on the hardware above.
  • Not tested: NVIDIA (see #2581), RDNA4.
**@⁠iggyvilla** on GitHub · 2026-11-26 02:21 UTC · [original](https://github.com/xcl-dev/xcl/issues/2617) On `main` `08db802`, a retail title hangs the GPU (device removed, `0x887a0007`) some time after its world start. This happens when dispatches whose pipeline is still being built are put off to the submit (#2118) and nothing waits there until the pipeline is built. With `XCL_PSO_WAIT_MS=1` it happens on `main` alone. #2581 reports the same setting on NVIDIA, ending in `Close` → `E_OUTOFMEMORY` and then a device removal; this is an RDNA2 run with no `E_OUTOFMEMORY`. Turning the put-off off (as #2581 does with a budget, and #2615 does always) made the hang go away in 3 of 3 walks. Its cause inside the put-off path is not found. **Steps** 1. `main` `08db802`, release build. Retail title, restored save, past the world start. `XCL_PSO_WAIT_MS=1`, `XCL_NETWORK=0`, everything else default (warm XCL and driver caches from earlier runs). 2. Let it run for 360 s. 3. The log counts put-off dispatches into the thousands, and the device is then removed. **What we saw** (AMD Radeon RX 6650 XT 8 GB, RDNA2, driver 32.0.21045.29003, Ryzen 7 5700X, 32 GB RAM + 64 GB pagefile, Windows 11 26300; 360 s walks, one at a time) | build | setting | walks | put-off calls (last logged) | device removed | |---|---|---|---|---| | `main` `08db802` | `XCL_PSO_WAIT_MS=1` | 1 | #8192 at 187 s | 200.6 s | | `main` `08db802` + #2615 without its `defer` check (no bind waits; put-off kept) + #751 | unset | 3 | #8192 at 172–217 s | 174.8 s, 218.0 s, 222.2 s | | #2615 (`defer` returns false: no put-off) + #751 | unset | 2 | 0 | none (361 s; 357 s, ended by an out-of-RAM `Close` → `E_OUTOFMEMORY` and the title's int3, not a removal) | | #2615 + #751 | `XCL_PSO_WAIT_MS=200` | 1 | 0 | none (356 s) | | `main` `08db802` | unset | 2 | ≤ #512 | none, but it stops presenting at 144–150 s (the submit waits for a 2.4 MB compute compile; see #2615) | - In the runs with the put-off, most of the put-off dispatches find their pipeline built by the submit and run. Builds were fast, from the driver's blobs of earlier runs. For example, 2 602 of 32 768 dispatches were skipped on `main`, and 659 of 35 326 in one of the others. - Shortly before the removal, two of the four runs show a CPU-side wait that times out for a value the compute queue writes (`Write64`), with the memory one value short: ``` D3D12.X: Wait64BitValueX timed out after 2000 ms at 0x70417ff00 (op 7, want 0x818, … memory holds Some(817); queue_type=0 …) D3D12 device removed: 0x887a0007 The GPU will not respond to more commands … ``` - With `XCL_DRED=1` (one run with the put-off): ``` DRED page fault at GPU VA 0x0; allocations there: []; recently freed: [] ``` No breadcrumb lines followed, so no list or pipeline is named. - In all four runs that hung, 0.3–2 s before the removal, the title asks for an interface it asks for in no other run, with or without the put-off: ``` D3D12.X: QueryInterface(3febd6dd-4973-4787-8194-e45f9e28923e) – interface unknown on the PC (console-only?) ``` It is most likely the title reacting to the stuck GPU, not a cause. - Ruled out as the difference: video memory (runs without the put-off ended with more in use), and the "submitted while its previous submit is still on the GPU" and "reset while its last submit is on the GPU" lines, which appear at 4–8 s in every run. - In the one run with the put-off that someone watched, the intro's year card flashed twice before the hang. That had not been seen before. **What is known / not known** - The GPU used a null address (DRED, VA 0). Which command list, segment or pipeline did it is not known. - Read in the code and found consistent: - `list_x::deferred_segment` resets and closes each placeholder segment. - `record_deferred` resets the list's own allocator through `alloc_pool`, which takes another backing while one is in flight, and records the segments in order. - Not checked, candidates: 1. A put-off dispatch recorded at the submit builds its root arguments from the segment's bind state (`inherit_for_split`, then `pass_arena` from segment to segment). An address left 0 there would fault at 0. 2. A producer dispatch is skipped because its pipeline is not built by the submit, while a consumer put off after it, whose pipeline is built by then, runs and reads an address or argument the producer should have written. Without the put-off, both are recorded at the bind and both are skipped or both run, unless one of the two pipelines is built in between. 3. A segment or recording is run twice (the flash above). - On `main` with default settings the submit waits until each pipeline is built, so this path is reached rarely: there it stops at the 2.4 MB compile first. **Related** - #2118 (the put-off), #2581 (no put-off while `XCL_PSO_WAIT_MS` is set; NVIDIA, `Close` → `E_OUTOFMEMORY`), #2615 (no wait to the end, and so no put-off). **AI use** - Claude Code, Claude Opus 5.5 (a3): read the logs and the code, and wrote this issue. - Walks: launched by Claude Code, Claude Opus 5.5 (the coordinator) and Claude Code, Claude Sonnet 5.5 (a1), on the hardware above. - Not tested: NVIDIA (see #2581), RDNA4.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:34:58 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.