Retail title: null write at +0x2215c35 (#159) still hits on NVIDIA RTX 4070 Ti, with and without XCL_NETWORK=0 #232

Open
opened 2026-11-26 04:16:57 +00:00 by github-bot · 51 comments
Owner

@⁠Alexbeav on GitHub · 2026-11-23 21:34 UTC · original

The null write at +0x2215c35 from #159 still happens here on NVIDIA with a build newer than 956a476, with and without XCL_NETWORK=0.

Setup

  • GPU: NVIDIA GeForce RTX 4070 Ti (12 GB), driver 32.0.16.2101; waves of 32 lanes
  • CPU: i9-13900K, 64 GB RAM, Windows 11 (build 26300)
  • DXC: Windows SDK 10.0.26100
  • Title: <package id>, Series package 1.0.2.1, files hash-checked against a manifest
  • XCL: release build of af20b4b (main), with #203, #211 and #215 merged locally. #215 conflicted in hle/d3d12x/bind.rs (main's pso_user_sgprs / inline_for change against #215's abi_views split). I resolved it by passing user_sgprs into abi_views. I have not yet repeated the run on plain main, so the local merges are a possible factor.

What happens

Two runs, the same crash, about 73-84 s in:

unhandled exception 0xc0000005 in game_scarlett_master.exe+0x2215c35 (write at address 0x0) rax=0x140004380 rbx=0x0 rcx=0x4189374bc6a7f0 rdx=0x359ff96583 rsi=0x62acfff828 rdi=0x2183f25594e rbp=0x0 r8=0x83 r9=0x7ffef000 r12=0x2181dbe55ca r13=0x146845c28 r14=0x7ffcca51b220 r15=0x2182db51edf rsp=0x62acfff800; on the stack: game_scarlett_master.exe+0x71b9a20, game_scarlett_master.exe+0x2215eca
  • Run 1: without XCL_NETWORK=0; outbound traffic blocked by a firewall rule. Run 2: XCL_NETWORK=0 (hle:xcl-netoff.dll: 6 imports). Same address and same registers apart from stack and heap addresses.
  • PresentX starts at ~17.7 s (swap chain 3840x2160). The report counts 4 presents and 4 frame boundaries.
  • background_pipelines: [4, 0, 57819] and translated_pipelines: 4: almost nothing got built before the crash. At the crash, every xcl-pso-N worker sits in the same wait (ntdll+0x16a054 < ntdll+0x88fd3 < KERNELBASE+0xddce8 < xcl.exe+0x480664 …). This looks like #156 (NVIDIA PSO builds that never finish). I have not confirmed a link to the crash.
  • 40 mesh pipeline with its MS … in the AS slot – refused translation errors (minimap), and one DispatchMesh slot called … without a console mesh pipeline bound – dropped at 54.6 s.
  • Stubs called: ID3D12CommandQueue::#31 (newer layout) 20×, ID3D12CommandAllocator::#9 4×, ID3D12GraphicsCommandList10::#131/#132 6×/5×, #142 3×, #75 3×.

#159 was closed after ryosen0's run on an RTX 3060 Ti at 956a476 got past this address, so it may depend on timing or the pipeline-build state rather than being fixed. I can run plain main or add XCL_THREAD_DUMP_AT / other diagnostics if that helps. No game files are attached.

**@⁠Alexbeav** on GitHub · 2026-11-23 21:34 UTC · [original](https://github.com/xcl-dev/xcl/issues/232) The null write at `+0x2215c35` from #159 still happens here on NVIDIA with a build newer than 956a476, with and without `XCL_NETWORK=0`. ## Setup - GPU: NVIDIA GeForce RTX 4070 Ti (12 GB), driver 32.0.16.2101; waves of 32 lanes - CPU: i9-13900K, 64 GB RAM, Windows 11 (build 26300) - DXC: Windows SDK 10.0.26100 - Title: `<package id>`, Series package 1.0.2.1, files hash-checked against a manifest - XCL: release build of `af20b4b` (main), with #203, #211 and #215 merged locally. #215 conflicted in `hle/d3d12x/bind.rs` (main's `pso_user_sgprs` / `inline_for` change against #215's `abi_views` split). I resolved it by passing `user_sgprs` into `abi_views`. I have not yet repeated the run on plain main, so the local merges are a possible factor. ## What happens Two runs, the same crash, about 73-84 s in: ``` unhandled exception 0xc0000005 in game_scarlett_master.exe+0x2215c35 (write at address 0x0) rax=0x140004380 rbx=0x0 rcx=0x4189374bc6a7f0 rdx=0x359ff96583 rsi=0x62acfff828 rdi=0x2183f25594e rbp=0x0 r8=0x83 r9=0x7ffef000 r12=0x2181dbe55ca r13=0x146845c28 r14=0x7ffcca51b220 r15=0x2182db51edf rsp=0x62acfff800; on the stack: game_scarlett_master.exe+0x71b9a20, game_scarlett_master.exe+0x2215eca ``` - Run 1: without `XCL_NETWORK=0`; outbound traffic blocked by a firewall rule. Run 2: `XCL_NETWORK=0` (`hle:xcl-netoff.dll: 6` imports). Same address and same registers apart from stack and heap addresses. - `PresentX` starts at ~17.7 s (swap chain 3840x2160). The report counts 4 presents and 4 frame boundaries. - `background_pipelines: [4, 0, 57819]` and `translated_pipelines: 4`: almost nothing got built before the crash. At the crash, every `xcl-pso-N` worker sits in the same wait (`ntdll+0x16a054 < ntdll+0x88fd3 < KERNELBASE+0xddce8 < xcl.exe+0x480664 …`). This looks like #156 (NVIDIA PSO builds that never finish). I have not confirmed a link to the crash. - 40 `mesh pipeline with its MS … in the AS slot – refused` translation errors (minimap), and one `DispatchMesh slot called … without a console mesh pipeline bound – dropped` at 54.6 s. - Stubs called: `ID3D12CommandQueue::#31 (newer layout)` 20×, `ID3D12CommandAllocator::#9` 4×, `ID3D12GraphicsCommandList10::#131/#132` 6×/5×, `#142` 3×, `#75` 3×. #159 was closed after ryosen0's run on an RTX 3060 Ti at 956a476 got past this address, so it may depend on timing or the pipeline-build state rather than being fixed. I can run plain main or add `XCL_THREAD_DUMP_AT` / other diagnostics if that helps. No game files are attached.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:16:57 +00:00
Author
Owner

@⁠mariuslozo-boop on GitHub · 2026-11-23 21:36 UTC · original

A data point from a run that does not hit +0x2215c35, on current main without local merges.

  • GPU: RTX 5070 Ti (16 GB), driver 616.92, 32-lane waves. Windows 11 26300, DXC from SDK 10.0.26100.
  • XCL: plain main d4f17ca, release build, lazy pipelines on (default).
  • Title: RockstarGamesInc.28872443D20A7 1.0.2.1 (exe SHA-256 e95020b2…d08993). XCL_NETWORK=0 plus a firewall block on xcl.exe.

Result:

  • The title ran for 270 s: 3,599 presents and 3,599 frame boundaries, 15–28 fps. There was no null write at +0x2215c35, and the game reached the account picker and the Navigation menu (pad input through the keyboard).
  • background_pipelines: [13, 0, 57810], translated_pipelines: 13, failed_pipelines: 0. With lazy creation, the 57,810 are stand-ins that were never bound, not a queue that is waiting.
  • Same 40 mesh pipeline with its MS … in the AS slot – refused translation errors as yours.
  • The run ended at exactly 270 s. That was not the game: it was the third XCL_THREAD_DUMP_AT dump crashing in ntdll!RtlVirtualUnwind2 (details in #106).

Since your build is af20b4b plus #203/#211/#215, a rerun on plain current main (with lazy pipelines) would show whether the watchdog still fires once pipeline builds are no longer queued up front.

On privacy, in case it is useful to others: at the crash the title's crash reporter (Breakpad/Backtrace) tried to POST a 28 MB minidump to submit.backtrace.io. XCL_NETWORK=0 stopped it (WinHttpSendRequest error 12007).

AI-assisted (Claude Code). No game files attached.

**@⁠mariuslozo-boop** on GitHub · 2026-11-23 21:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7114682791) A data point from a run that does not hit `+0x2215c35`, on current main without local merges. - GPU: RTX 5070 Ti (16 GB), driver 616.92, 32-lane waves. Windows 11 26300, DXC from SDK 10.0.26100. - XCL: plain main `d4f17ca`, release build, lazy pipelines on (default). - Title: `RockstarGamesInc.28872443D20A7` 1.0.2.1 (exe SHA-256 `e95020b2…d08993`). `XCL_NETWORK=0` plus a firewall block on `xcl.exe`. Result: - The title ran for 270 s: 3,599 presents and 3,599 frame boundaries, 15–28 fps. There was no null write at `+0x2215c35`, and the game reached the account picker and the Navigation menu (pad input through the keyboard). - `background_pipelines: [13, 0, 57810]`, `translated_pipelines: 13`, `failed_pipelines: 0`. With lazy creation, the 57,810 are stand-ins that were never bound, not a queue that is waiting. - Same 40 `mesh pipeline with its MS … in the AS slot – refused` translation errors as yours. - The run ended at exactly 270 s. That was not the game: it was the third `XCL_THREAD_DUMP_AT` dump crashing in `ntdll!RtlVirtualUnwind2` (details in #106). Since your build is `af20b4b` plus #203/#211/#215, a rerun on plain current main (with lazy pipelines) would show whether the watchdog still fires once pipeline builds are no longer queued up front. On privacy, in case it is useful to others: at the crash the title's crash reporter (Breakpad/Backtrace) tried to POST a 28 MB minidump to `submit.backtrace.io`. `XCL_NETWORK=0` stopped it (`WinHttpSendRequest` error 12007). AI-assisted (Claude Code). No game files attached.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-23 21:48 UTC · original

From the code at af20b4b / d4f17ca and the #159 thread. No new run.

1. The parked xcl-pso-N workers are most likely idle. I don't think this is #156.

  • Each worker loops on rx.lock().unwrap().recv() (pso_async::queue). With lazy pipelines, a pipeline goes to the workers only at its first bind. A worker with nothing queued waits in std's futex wait: ntdll < ntdll < KERNELBASE (WaitOnAddress) < xcl.exe, called from xcl.exe itself. That is the stack you saw, and the same stack on every worker is what idle looks like.
  • A worker building a pipeline calls the driver on its own thread (finish_pso), so during a driver build (#156's slow case) the driver's frames sit between xcl.exe and any wait.
  • The same stack shape also fits a worker waiting on DXC's pool or on the one-at-a-time slot for big compiles, so the stack alone cannot rule those out.
  • background_pipelines = (built, failed, not done), and "not done" includes stand-ins that were never bound. Your [4, 0, 57819] and mariuslozo-boop's [13, 0, 57810] on a run that reached the menu are the same picture.

2. What #159 showed about +0x2215c35:

  • The same null write on an RX 6600 and an RTX 3060 Ti, with identical rax, rbx, rcx, r13 and return addresses. Both runs had 2 presents.
  • It went away on 956a476 (6,557 presents at 30 fps). That commit made every frame event due at a deadline fire. Before it, the title's present thread waited on an event that never fired (HANDOFF.md).
  • Your run: 4 presents in the ~60 s after PresentX started. Across the reports, the crash has come only in runs whose frames stalled (2, 2 and 4 presents), and in none whose frames kept coming (6,557 on 956a476, 3,599 on d4f17ca). So I'd look for what stalls frames, not at the write itself.
  • Nothing ties the faulting code to a watchdog.

3. What in your build could stall frames:

  • #218 is not in af20b4b. Before it, Wait64BitValueX read the argument after the value as a mask. The title's GREATER_EQUAL waits then never held: each timed out after 2 s, and the game stood still. If your log has Wait64BitValueX timed out after 2000 ms, this is it. One caveat: the same code ran at 30 fps on 956a476, where #218 says the stall came after the first cinematic.
  • #215 adds GPU work that main doesn't do. Two-pass pipelines (a compute pass, a UAV barrier, then the mesh pass) are drawn. If one of those faults or hangs the queue, its fences stop and presents stop with them.
  • Your #215 conflict resolution can be wrong in one way. On main, bind_abi first waits for the pipeline (resolve_wait), then reads pso_user_sgprs(real) (from 7495271). In #215, abi_views runs before resolve_wait. If the count is read there from the stand-in: pso_user_sgprs calls the non-waiting resolve, which returns the stand-in for a pipeline not built yet. The count is then None, and inline_for falls back to l.inline, the argument layout 7495271 fixed. With lazy pipelines that is every compute pipeline's first dispatch through bind_abi. The right order is let real = resolve_wait(pso), then pso_user_sgprs(real), then abi_views. What this breaks is compute arguments (7495271's case: dispatches that ran and wrote nothing), which is not a proven stall.
  • #203 moves the title's large-page GPU data (a 1.2 GB block, by its comment) into a sparse window, which is backed by video-memory tiles, and prunes to_zero once. On a 12 GB card that is 1.2 GB more video memory than main uses. I found no wait in it.

4. The rest of your report:

  • The stub profile (queue #31 ×14–20, allocator #9 ×3–4, list #131 / #132 / #142 / #75) is the same as in #159's runs. HANDOFF.md says allocator #9 registers the title's command-memory callback. Nothing ties these stubs to the crash.
  • #236 makes list #131 / #132 named no-ops that return 0. The stub for a slot past the PC's vtable already returns 0 and does nothing, so #236 changes only the logging there, not behaviour.
  • 12 GB against 16 GB: nothing in the logs shows video memory ran short. #203 adds to it (above). XCL_ACTIVITY=1 logs local and non-local video memory every 2 s.

What would separate the causes:

  1. Look in your existing log for BitValueX timed out. If it is there, #218 is the first suspect.
  2. Run plain main (d4f17ca or newer), no local merges, on the same card. If it runs like mariuslozo-boop's, the cause is in the difference: #218 missing, or #215 / #203 merged.
  3. If it still stalls, run with XCL_ACTIVITY=1 (presents, draws and frame events every 2 s show when frames stop) and XCL_THREAD_DUMP_AT=40,65. That is two dumps before the crash at ~73 s: the third dump in mariuslozo-boop's run crashed in RtlVirtualUnwind2 (#106). They show what the present thread waits on.
  4. To isolate #215: main + #215 against main, with resolve_wait before pso_user_sgprs in bind_abi.

Tested:

  • Code reading only: pso_async.rs, bind.rs, console_list::inline_for, real::pso_user_sgprs and the stub table at af20b4b / d4f17ca.
  • Your merge stack rebuilt locally (af20b4b + #203 + #211 + #215) to see the conflict. It conflicts only in bind.rs, as you said.
  • #236's diff.

Not tested:

  • No run of the title.
  • Your binary: I matched xcl.exe+0x480664 by the stack's shape, not by symbols.
  • The RTX 4070 Ti.
  • Whether #218's timeouts or #215's draws happened in your run.

🤖 Claude Opus 5.5

**@⁠Kalmarv** on GitHub · 2026-11-23 21:48 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7114947896) From the code at `af20b4b` / `d4f17ca` and the #159 thread. No new run. **1. The parked `xcl-pso-N` workers are most likely idle.** I don't think this is #156. - Each worker loops on `rx.lock().unwrap().recv()` (`pso_async::queue`). With lazy pipelines, a pipeline goes to the workers only at its first bind. A worker with nothing queued waits in std's futex wait: `ntdll < ntdll < KERNELBASE (WaitOnAddress) < xcl.exe`, called from xcl.exe itself. That is the stack you saw, and the same stack on every worker is what idle looks like. - A worker building a pipeline calls the driver on its own thread (`finish_pso`), so during a driver build (#156's slow case) the driver's frames sit between xcl.exe and any wait. - The same stack shape also fits a worker waiting on DXC's pool or on the one-at-a-time slot for big compiles, so the stack alone cannot rule those out. - `background_pipelines` = (built, failed, not done), and "not done" includes stand-ins that were never bound. Your `[4, 0, 57819]` and mariuslozo-boop's `[13, 0, 57810]` on a run that reached the menu are the same picture. **2. What #159 showed about `+0x2215c35`:** - The same null write on an RX 6600 and an RTX 3060 Ti, with identical `rax`, `rbx`, `rcx`, `r13` and return addresses. Both runs had 2 presents. - It went away on `956a476` (6,557 presents at 30 fps). That commit made every frame event due at a deadline fire. Before it, the title's present thread waited on an event that never fired (HANDOFF.md). - Your run: 4 presents in the ~60 s after `PresentX` started. Across the reports, the crash has come only in runs whose frames stalled (2, 2 and 4 presents), and in none whose frames kept coming (6,557 on `956a476`, 3,599 on `d4f17ca`). So I'd look for what stalls frames, not at the write itself. - Nothing ties the faulting code to a watchdog. **3. What in your build could stall frames:** - **#218 is not in `af20b4b`.** Before it, `Wait64BitValueX` read the argument after the value as a mask. The title's GREATER_EQUAL waits then never held: each timed out after 2 s, and the game stood still. If your log has `Wait64BitValueX timed out after 2000 ms`, this is it. One caveat: the same code ran at 30 fps on `956a476`, where #218 says the stall came after the first cinematic. - **#215 adds GPU work that `main` doesn't do.** Two-pass pipelines (a compute pass, a UAV barrier, then the mesh pass) are drawn. If one of those faults or hangs the queue, its fences stop and presents stop with them. - **Your #215 conflict resolution can be wrong in one way.** On `main`, `bind_abi` first waits for the pipeline (`resolve_wait`), then reads `pso_user_sgprs(real)` (from 7495271). In #215, `abi_views` runs before `resolve_wait`. If the count is read there from the stand-in: `pso_user_sgprs` calls the non-waiting `resolve`, which returns the stand-in for a pipeline not built yet. The count is then `None`, and `inline_for` falls back to `l.inline`, the argument layout 7495271 fixed. With lazy pipelines that is every compute pipeline's first dispatch through `bind_abi`. The right order is `let real = resolve_wait(pso)`, then `pso_user_sgprs(real)`, then `abi_views`. What this breaks is compute arguments (7495271's case: dispatches that ran and wrote nothing), which is not a proven stall. - **#203** moves the title's large-page GPU data (a 1.2 GB block, by its comment) into a sparse window, which is backed by video-memory tiles, and prunes `to_zero` once. On a 12 GB card that is 1.2 GB more video memory than `main` uses. I found no wait in it. **4. The rest of your report:** - The stub profile (queue `#31` ×14–20, allocator `#9` ×3–4, list `#131` / `#132` / `#142` / `#75`) is the same as in #159's runs. HANDOFF.md says allocator `#9` registers the title's command-memory callback. Nothing ties these stubs to the crash. - #236 makes list `#131` / `#132` named no-ops that return 0. The stub for a slot past the PC's vtable already returns 0 and does nothing, so #236 changes only the logging there, not behaviour. - 12 GB against 16 GB: nothing in the logs shows video memory ran short. #203 adds to it (above). `XCL_ACTIVITY=1` logs local and non-local video memory every 2 s. **What would separate the causes:** 1. Look in your existing log for `BitValueX timed out`. If it is there, #218 is the first suspect. 2. Run plain `main` (`d4f17ca` or newer), no local merges, on the same card. If it runs like mariuslozo-boop's, the cause is in the difference: #218 missing, or #215 / #203 merged. 3. If it still stalls, run with `XCL_ACTIVITY=1` (presents, draws and frame events every 2 s show when frames stop) and `XCL_THREAD_DUMP_AT=40,65`. That is two dumps before the crash at ~73 s: the third dump in mariuslozo-boop's run crashed in `RtlVirtualUnwind2` (#106). They show what the present thread waits on. 4. To isolate #215: `main` + #215 against `main`, with `resolve_wait` before `pso_user_sgprs` in `bind_abi`. **Tested:** - Code reading only: `pso_async.rs`, `bind.rs`, `console_list::inline_for`, `real::pso_user_sgprs` and the stub table at `af20b4b` / `d4f17ca`. - Your merge stack rebuilt locally (`af20b4b` + #203 + #211 + #215) to see the conflict. It conflicts only in `bind.rs`, as you said. - #236's diff. **Not tested:** - No run of the title. - Your binary: I matched `xcl.exe+0x480664` by the stack's shape, not by symbols. - The RTX 4070 Ti. - Whether #218's timeouts or #215's draws happened in your run. 🤖 Claude Opus 5.5
Author
Owner

@⁠MKS2508 on GitHub · 2026-11-23 22:08 UTC · original

The faulting code is a stall watchdog — here is the decode

Re the open point in the thread ("nothing ties the faulting code to a watchdog"): it does. I dumped game_scarlett_master.exe 1.0.2.1 (image base 0x140000000) and the function containing +0x2215c35 is a self-contained watchdog, not a generic crash path.

FUN_0x142215a60, 0x2215A60..0x2215E09, 937 bytes:

QueryPerformanceCounter(&a); Sleep(1000); QueryPerformanceCounter(&b);
elapsed = (b - a) * ticks_to_ms;
if (elapsed > 2.0f) { /* sample discarded: this thread was descheduled */ }

for (i = 0; i < 30; i++)
  for (slot = 0; slot < 0x40; slot++) {
    if (watched_index[slot] == 0) continue;   /* slot not registered */
    if (watched_ts[slot] == 0)    continue;   /* nothing posted yet */
    if (now - watched_ts[slot] >= 300.0f && rand_gate(0x89aee1d6))
        goto ABORT;
  }
ABORT:
  FUN_0x144e4ba80();
  if (report_hook) report_hook();   /* DAT_0x1471b6348 — NULL, so skipped */
  *(int *)0 = 0;                    /* +0x2215c35 */
  int3;

Constants in the image: 2.0f (0x40000000) at RVA 0x6159BD4, 300.0f (0x43960000) at RVA 0x6159E20.

Timer table: 0x146844A20, stride 72 bytes per slot — +0x00 u32 slot index (a healthy run shows 1..0x39 registered), +0x08..+0x48 eight u64 QPC timestamps.

Live check. I attached x64dbg to a non-crashing run (RX 5700, initial menu, 4,800 presents, ~27 fps) and read the table: every timestamp is 0. So a healthy run has the watchdog armed but unable to fire — the abort needs a registered slot whose non-zero timestamp is ≥300 ms old.

That fits this thread's own data: the crash appears only in runs whose frames stalled (2, 2, 4 presents) and never in runs that kept presenting (6,557 / 3,599). Stalled frames ⇒ some watched subsystem stops posting ⇒ ≥300 ms ⇒ abort. The rand_gate is why it is not deterministic, and why #159 looked fixed.

Diagnostic recipe for whoever reproduces it: break at 0x142215C35, and at the hit dump 4 KiB at 0x146844A20 (57 slots × 72 B). The slot with a non-zero index and the oldest non-zero timestamp names the subsystem that stopped posting. That turns "it stalled somewhere" into a specific component.

**@⁠MKS2508** on GitHub · 2026-11-23 22:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7115375719) **The faulting code is a stall watchdog — here is the decode** Re the open point in the thread ("nothing ties the faulting code to a watchdog"): it does. I dumped `game_scarlett_master.exe` 1.0.2.1 (image base `0x140000000`) and the function containing `+0x2215c35` is a self-contained watchdog, not a generic crash path. `FUN_0x142215a60`, `0x2215A60..0x2215E09`, 937 bytes: ```c QueryPerformanceCounter(&a); Sleep(1000); QueryPerformanceCounter(&b); elapsed = (b - a) * ticks_to_ms; if (elapsed > 2.0f) { /* sample discarded: this thread was descheduled */ } for (i = 0; i < 30; i++) for (slot = 0; slot < 0x40; slot++) { if (watched_index[slot] == 0) continue; /* slot not registered */ if (watched_ts[slot] == 0) continue; /* nothing posted yet */ if (now - watched_ts[slot] >= 300.0f && rand_gate(0x89aee1d6)) goto ABORT; } ABORT: FUN_0x144e4ba80(); if (report_hook) report_hook(); /* DAT_0x1471b6348 — NULL, so skipped */ *(int *)0 = 0; /* +0x2215c35 */ int3; ``` Constants in the image: `2.0f` (`0x40000000`) at RVA `0x6159BD4`, **`300.0f` (`0x43960000`) at RVA `0x6159E20`**. Timer table: **`0x146844A20`**, stride **72 bytes** per slot — `+0x00` u32 slot index (a healthy run shows 1..0x39 registered), `+0x08..+0x48` eight u64 QPC timestamps. **Live check.** I attached x64dbg to a non-crashing run (RX 5700, initial menu, 4,800 presents, ~27 fps) and read the table: **every timestamp is 0**. So a healthy run has the watchdog armed but unable to fire — the abort needs a registered slot whose non-zero timestamp is ≥300 ms old. That fits this thread's own data: the crash appears only in runs whose frames stalled (2, 2, 4 presents) and never in runs that kept presenting (6,557 / 3,599). Stalled frames ⇒ some watched subsystem stops posting ⇒ ≥300 ms ⇒ abort. The `rand_gate` is why it is not deterministic, and why #159 looked fixed. **Diagnostic recipe for whoever reproduces it:** break at `0x142215C35`, and at the hit dump 4 KiB at `0x146844A20` (57 slots × 72 B). The slot with a non-zero index and the oldest non-zero timestamp names the subsystem that stopped posting. That turns "it stalled somewhere" into a specific component.
Author
Owner

@⁠Digit4w on GitHub · 2026-11-24 00:44 UTC · original

Data point on current main (2997c9a, no local merges): an RTX 4070 SUPER (same driver as the original report) reaches world loading, shows a black screen for ~2 minutes and then ends with a null write whose stack list includes +0x2215c35.

Setup: RTX 4070 SUPER 12 GB, driver 32.0.16.2101, 32-lane waves; Ryzen 5 7600, 32 GB RAM; Windows 11 26200; release build; DXC 1.9.2602 (SDK 10.0.26100). Title 1.0.2.1, unpacked; first-run screens done by hand once before.

Run: scripts/smoke.ps1 -Seconds 420 with XCL_NETWORK=0, XCL_TRACE_FAULTS=1, XCL_PRESS_AT A at 14/17/21 s and every 6 s from 125 to 200 s.

xcl-smoke v1
commit: 2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21
gpu: NVIDIA GeForce RTX 4070 SUPER
title: GTA6
seconds: 420
exit: 0xc0000005
frames shown: none logged (the run did not reach its end)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 2
peak commit: 40205 MB
  • World loading starts ~150 s. From ~170 s presents are 0 for most 2 s windows (black window), while commit goes 20 → 40 GB and local video memory 8.3 → 13.6 GB (over the card's 12 GB; numbers in #333).
  • In that time only 26 compute pipelines are built (compute PSO with the translated console CS); the window title showed 2 running, 26 done.
  • At 290.6 s:
access violation (write at 0x0) in game_scarlett_master.exe+0x23cf683; rax=0x0 rcx=0x70024c348 rdx=0x1 r8=0x7074d8c40
on the stack: game_scarlett_master.exe+0x4e4ba89, game_scarlett_master.exe+0x2215c35, game_scarlett_master.exe+0x71b9a20, game_scarlett_master.exe+0x2215eca

The faulting instruction is +0x23cf683, not +0x2215c35; I have not checked whether that list is a real call chain or a stack scan, so the link to the watchdog decoded above is a guess. The fault comes after ~120 s with almost no frames, which fits a stall watchdog.

Not tested: #267 (next, on this main), #292 (conflicts with main).

AI use: Claude Code with Claude Opus 5.5 ran the build and the run on my machine, read the log and wrote this comment; posted at my request.

**@⁠Digit4w** on GitHub · 2026-11-24 00:44 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7118374421) Data point on current `main` (`2997c9a`, no local merges): an RTX 4070 SUPER (same driver as the original report) reaches world loading, shows a black screen for ~2 minutes and then ends with a null write whose stack list includes `+0x2215c35`. **Setup:** RTX 4070 SUPER 12 GB, driver 32.0.16.2101, 32-lane waves; Ryzen 5 7600, 32 GB RAM; Windows 11 26200; release build; DXC 1.9.2602 (SDK 10.0.26100). Title 1.0.2.1, unpacked; first-run screens done by hand once before. **Run:** `scripts/smoke.ps1 -Seconds 420` with `XCL_NETWORK=0`, `XCL_TRACE_FAULTS=1`, `XCL_PRESS_AT` A at 14/17/21 s and every 6 s from 125 to 200 s. ``` xcl-smoke v1 commit: 2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21 gpu: NVIDIA GeForce RTX 4070 SUPER title: GTA6 seconds: 420 exit: 0xc0000005 frames shown: none logged (the run did not reach its end) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 2 peak commit: 40205 MB ``` - World loading starts ~150 s. From ~170 s presents are 0 for most 2 s windows (black window), while commit goes 20 → 40 GB and local video memory 8.3 → 13.6 GB (over the card's 12 GB; numbers in #333). - In that time only 26 compute pipelines are built (`compute PSO with the translated console CS`); the window title showed `2 running, 26 done`. - At 290.6 s: ``` access violation (write at 0x0) in game_scarlett_master.exe+0x23cf683; rax=0x0 rcx=0x70024c348 rdx=0x1 r8=0x7074d8c40 on the stack: game_scarlett_master.exe+0x4e4ba89, game_scarlett_master.exe+0x2215c35, game_scarlett_master.exe+0x71b9a20, game_scarlett_master.exe+0x2215eca ``` The faulting instruction is `+0x23cf683`, not `+0x2215c35`; I have not checked whether that list is a real call chain or a stack scan, so the link to the watchdog decoded above is a guess. The fault comes after ~120 s with almost no frames, which fits a stall watchdog. **Not tested:** #267 (next, on this `main`), #292 (conflicts with `main`). AI use: Claude Code with Claude Opus 5.5 ran the build and the run on my machine, read the log and wrote this comment; posted at my request.
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-24 00:48 UTC · original · edited 2026-11-24 00:51 UTC

Same null write on an RTX 4090 (24 GB), reproducible, main 2997c9a

Setup: NVIDIA GeForce RTX 4090 (22,608 MiB VRAM reported), driver 621.24 (32.0.16.2124), 32-lane waves; Ryzen 9 9950X3D, Windows 11 build 26300; DXC 1.9.2602.17; retail 1.0.2.1 package. XCL release build of main 2997c9a, plus one local change to the window style only (a borderless fullscreen window; nothing in D3D12, memory or the recompiler).

What happens, twice in a row: menus and loading screens are fine, the world starts loading, a moment of ambient sound over a black screen, then:

unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0), with +0x2215c35 on the stack — the stall-watchdog path decoded above.

report.json, both runs:

run 1 (a6f5f7a) run 2 (2997c9a, warm DXIL cache)
background_pipelines (built, failed, still building) 116, 0, 58,648 153, 0, 58,610
failed_pipelines 0 0
dxil_cache hits / misses / compilation_failures 86 / 64 / 0 150 / 40 / 0
presents before the crash 1,831 2,906

Correction (edited): I first read the third number as a queue that does not drain. It isn't: with XCL_LAZY_PSO on (the default), pso_async.rs keeps a pipeline whose shaders are not compiled as a stand-in and only sends it to the workers on its first use, so ~58,600 "still building" are mostly pipelines the title made but has not bound yet. What the counts do show: nothing fails to compile (0 failed, 0 compilation failures), and the watchdog fires anyway. They don't say what the title waits on.

For #333 / #320: with 24 GB there is no E_OUTOFMEMORY at this point; this machine stops on the watchdog instead, so the 8 GB out-of-memory stop and this one look like two separate problems.

Also in report.json: dstorage.bcpack_refused has 2,169 BC1 requests (~152 MB, 0 bytes filled), plus BC5/BC6H/BC7 ones, in case the black screen is related. No game data here (counts, codes and the RVAs already in this thread).

AI use: I ran XCL and played up to the crash on this hardware; Claude Code (Claude Opus 5.5) read report.json and the log and wrote this comment.

**@⁠S1m0ne1997** on GitHub · 2026-11-24 00:48 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7118448284) · edited 2026-11-24 00:51 UTC **Same null write on an RTX 4090 (24 GB), reproducible, `main` 2997c9a** Setup: NVIDIA GeForce RTX 4090 (22,608 MiB VRAM reported), driver 621.24 (`32.0.16.2124`), 32-lane waves; Ryzen 9 9950X3D, Windows 11 build 26300; DXC 1.9.2602.17; retail 1.0.2.1 package. XCL release build of `main` 2997c9a, plus one local change to the window style only (a borderless fullscreen window; nothing in D3D12, memory or the recompiler). What happens, twice in a row: menus and loading screens are fine, the world starts loading, a moment of ambient sound over a black screen, then: `unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0)`, with `+0x2215c35` on the stack — the stall-watchdog path decoded above. `report.json`, both runs: | | run 1 (`a6f5f7a`) | run 2 (`2997c9a`, warm DXIL cache) | |---|---:|---:| | `background_pipelines` (built, failed, still building) | 116, 0, **58,648** | 153, 0, **58,610** | | `failed_pipelines` | 0 | 0 | | `dxil_cache` hits / misses / compilation_failures | 86 / 64 / 0 | 150 / 40 / 0 | | presents before the crash | 1,831 | 2,906 | **Correction (edited):** I first read the third number as a queue that does not drain. It isn't: with `XCL_LAZY_PSO` on (the default), `pso_async.rs` keeps a pipeline whose shaders are not compiled as a stand-in and only sends it to the workers on its first use, so ~58,600 "still building" are mostly pipelines the title made but has not bound yet. What the counts do show: nothing fails to compile (0 failed, 0 compilation failures), and the watchdog fires anyway. They don't say what the title waits on. For #333 / #320: with 24 GB there is no `E_OUTOFMEMORY` at this point; this machine stops on the watchdog instead, so the 8 GB out-of-memory stop and this one look like two separate problems. Also in `report.json`: `dstorage.bcpack_refused` has 2,169 BC1 requests (~152 MB, 0 bytes filled), plus BC5/BC6H/BC7 ones, in case the black screen is related. No game data here (counts, codes and the RVAs already in this thread). AI use: I ran XCL and played up to the crash on this hardware; Claude Code (Claude Opus 5.5) read `report.json` and the log and wrote this comment.
Author
Owner

@⁠JRamos1993 on GitHub · 2026-11-24 00:55 UTC · original

Measured on the retail title for #232 / #267: on NVIDIA the stall before the watchdog comes from compute pipelines built at their first bind on the title's own threads. #267 bounds the draw waits for graphics pipelines and leaves compute ones to resolve_wait (filter(|_| !p.compute)), so it would not change these runs.

Setup: RTX 5090 (driver 621.24), i9-14900KF, 64 GB, Windows 11 26200. main 2b4bb43, cargo +stable-x86_64-pc-windows-msvc build --release with CARGO_PROFILE_RELEASE_DEBUG=line-tables-only (for symbols in the dumps), DXC 1.9.2602.17. XCL_NETWORK=0, XCL_ACTIVITY=1, the learned coherent window (second run on), lazy pipelines (default), XCL_THREAD_DUMP_AT=180,220,260,290. Package 1.0.2.1, own copy. No input was sent to the title.

What happens (3 runs of 240–300 s):

  • Intro at 30 fps, then a loading screen. 512–2,048 BCPack DirectStorage requests are refused on the way (no decoder on main).
  • From 126–166 s on, presents keep dropping to 0–2 per 2 s for long stretches. The 300 s run ended at 281 s in the watchdog's null write (the stack #232 shows). The two 240 s runs ended before it fired.

XCL_THREAD_DUMP_AT during the stall (260 s), XCL frames named from the PDB:

  • 4 title threads: bind::set_pipeline_state → pso_async::resolve_for_bind → resolve_wait → Condvar::wait.
  • 1 more title thread inside nvgpucomp64.dll. In the dumps at 180 / 220 s the same thread was in the title's own code, waiting. With the 14-frame unwind its XCL frames are cut off, but the log line compute PSO with the translated console CS (… B DXIL) comes from that thread id.
  • All 31 xcl-pso-N and 31 xcl-dxc-N workers idle: one in recv, the others in Mutex::lock_contended on the shared receiver.
  • Of the four D3D Background Threads, one was in nvgpucomp64.dll.

Counts from the log: between 240 and 280 s, 5 title threads built 65 compute pipelines (3.2 MB of DXIL, the largest 390 KB), each at its first bind. Before 240 s there were 9. At the end, background_pipelines was [101, 0, 58662]: 101 built, 58,662 stand-ins never bound.

So the DXIL is cached and DXC is not involved. The time goes to the driver building compute pipelines synchronously on title threads, one after another, while the title loads.

Not tested: #267 itself (from the diff, the compute path still calls resolve_wait), AMD, and whether a filled driver cache (xcl shaders --precompile --only cs --pipelines) removes the stall. That run is in progress here; I'll edit this comment with the result.

AI use: Claude Code (Claude Opus 5.5) ran the builds and runs, symbolized the dumps and wrote this report. The numbers come from those runs.

**@⁠JRamos1993** on GitHub · 2026-11-24 00:55 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7118575517) Measured on the retail title for #232 / #267: on NVIDIA the stall before the watchdog comes from **compute** pipelines built at their first bind on the title's own threads. #267 bounds the draw waits for graphics pipelines and leaves compute ones to `resolve_wait` (`filter(|_| !p.compute)`), so it would not change these runs. **Setup:** RTX 5090 (driver 621.24), i9-14900KF, 64 GB, Windows 11 26200. `main` 2b4bb43, `cargo +stable-x86_64-pc-windows-msvc build --release` with `CARGO_PROFILE_RELEASE_DEBUG=line-tables-only` (for symbols in the dumps), DXC 1.9.2602.17. `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, the learned coherent window (second run on), lazy pipelines (default), `XCL_THREAD_DUMP_AT=180,220,260,290`. Package 1.0.2.1, own copy. No input was sent to the title. **What happens (3 runs of 240–300 s):** - Intro at 30 fps, then a loading screen. 512–2,048 BCPack DirectStorage requests are refused on the way (no decoder on `main`). - From 126–166 s on, presents keep dropping to 0–2 per 2 s for long stretches. The 300 s run ended at 281 s in the watchdog's null write (the stack #232 shows). The two 240 s runs ended before it fired. **`XCL_THREAD_DUMP_AT` during the stall (260 s), XCL frames named from the PDB:** - 4 title threads: `bind::set_pipeline_state` → `pso_async::resolve_for_bind` → `resolve_wait` → `Condvar::wait`. - 1 more title thread inside `nvgpucomp64.dll`. In the dumps at 180 / 220 s the same thread was in the title's own code, waiting. With the 14-frame unwind its XCL frames are cut off, but the log line `compute PSO with the translated console CS (… B DXIL)` comes from that thread id. - All 31 `xcl-pso-N` and 31 `xcl-dxc-N` workers idle: one in `recv`, the others in `Mutex::lock_contended` on the shared receiver. - Of the four `D3D Background Thread`s, one was in `nvgpucomp64.dll`. **Counts from the log:** between 240 and 280 s, 5 title threads built 65 compute pipelines (3.2 MB of DXIL, the largest 390 KB), each at its first bind. Before 240 s there were 9. At the end, `background_pipelines` was `[101, 0, 58662]`: 101 built, 58,662 stand-ins never bound. So the DXIL is cached and DXC is not involved. The time goes to the driver building compute pipelines synchronously on title threads, one after another, while the title loads. **Not tested:** #267 itself (from the diff, the compute path still calls `resolve_wait`), AMD, and whether a filled driver cache (`xcl shaders --precompile --only cs --pipelines`) removes the stall. That run is in progress here; I'll edit this comment with the result. AI use: Claude Code (Claude Opus 5.5) ran the builds and runs, symbolized the dumps and wrote this report. The numbers come from those runs.
Author
Owner

@⁠MonkeyPython on GitHub · 2026-11-24 01:02 UTC · original

Reproduced on a second NVIDIA GPU — plain main, no local merges — with the same call
chain and the same pipeline-stall shape.

Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB, RTX 3080 Ti 12 GB (driver
621.24), Rust 1.100.0 stable MSVC, DXC 1.8.2502.11 (SDK 10.0.26100). Release build of
main at a6f5f7a (no local merges). XCL_NETWORK=0 plus an OS firewall outbound block
on xcl.exe. Series package 1.0.2.1, 3840×2160. A 600 s run with a gamepad: profile
confirmed, settings/legal/consent menus navigated, then the loading screen.

The crash (~390 s in, after PresentX #1200):

unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0)
rax=0x0 rbx=0x0 rcx=0x70024c348 rdx=0x1 ... r13=0x146845c28 r14=0x7ff810d9b220 ...
on the stack: game_scarlett_master.exe+0x4e4ba89, game_scarlett_master.exe+0x2215c35,
game_scarlett_master.exe+0x71b9a20, game_scarlett_master.exe+0x2215eca

The faulting IP is one frame deeper than this issue's (+0x23cf683), but +0x2215c35,
+0x71b9a20 and +0x2215eca are the same callers as the report above, and r13
(0x146845c28) matches exactly. Same null-write family.

The #156 shape is here too: the whole run sat at 3–7 fps, and the window's shader
counter never progressed — 0 running, 43 done, 58756 pipelines queued near the end
(also 57871 queued, 0 done in a shorter run). Almost nothing built before the crash,
as in this issue's background_pipelines: [4, 0, 57819]. Audio did work: 13551 Opus
packets decoded, 0 errors.

A second failure mode on the same commit: a 300 s run reached the consent screen,
and on confirming it hung the device during a title-texture upload —
title texture: upload failed: texture copy: D3D12 device removed (0x887a0006), with
fps degrading 30 → 20.6 → 19.2 first. Different code (DXGI_ERROR_DEVICE_HUNG, not the
null write), same loading phase on NVIDIA.

Stubs called match this issue's list (allocator #9, list #126/#142/#75, queue #31,
#131/#132). No game files attached.

Not tested: plain-main isolation of the pipeline stall vs the crash; other NVIDIA
GPUs; whether the stall and the null write share a cause.

AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the title and wrote this
report from the logs; a human reviewed it before posting. No code changes.

**@⁠MonkeyPython** on GitHub · 2026-11-24 01:02 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7118689654) Reproduced on a second NVIDIA GPU — plain `main`, no local merges — with the same call chain and the same pipeline-stall shape. **Setup:** Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB, **RTX 3080 Ti 12 GB** (driver 621.24), Rust 1.100.0 stable MSVC, DXC 1.8.2502.11 (SDK 10.0.26100). Release build of `main` at `a6f5f7a` (no local merges). `XCL_NETWORK=0` plus an OS firewall outbound block on `xcl.exe`. Series package 1.0.2.1, 3840×2160. A 600 s run with a gamepad: profile confirmed, settings/legal/consent menus navigated, then the loading screen. **The crash** (~390 s in, after PresentX #1200): ``` unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) rax=0x0 rbx=0x0 rcx=0x70024c348 rdx=0x1 ... r13=0x146845c28 r14=0x7ff810d9b220 ... on the stack: game_scarlett_master.exe+0x4e4ba89, game_scarlett_master.exe+0x2215c35, game_scarlett_master.exe+0x71b9a20, game_scarlett_master.exe+0x2215eca ``` The faulting IP is one frame deeper than this issue's (`+0x23cf683`), but `+0x2215c35`, `+0x71b9a20` and `+0x2215eca` are the same callers as the report above, and `r13` (`0x146845c28`) matches exactly. Same null-write family. **The #156 shape is here too:** the whole run sat at 3–7 fps, and the window's shader counter never progressed — `0 running, 43 done, 58756 pipelines queued` near the end (also `57871 queued, 0 done` in a shorter run). Almost nothing built before the crash, as in this issue's `background_pipelines: [4, 0, 57819]`. Audio did work: 13551 Opus packets decoded, 0 errors. **A second failure mode on the same commit:** a 300 s run reached the consent screen, and on confirming it hung the device during a title-texture upload — `title texture: upload failed: texture copy: D3D12 device removed (0x887a0006)`, with fps degrading 30 → 20.6 → 19.2 first. Different code (`DXGI_ERROR_DEVICE_HUNG`, not the null write), same loading phase on NVIDIA. Stubs called match this issue's list (allocator #9, list #126/#142/#75, queue #31, #131/#132). No game files attached. **Not tested:** plain-main isolation of the pipeline stall vs the crash; other NVIDIA GPUs; whether the stall and the null write share a cause. **AI use:** Gentle Shell (Pi coding agent), model qwen4-max: ran the title and wrote this report from the logs; a human reviewed it before posting. No code changes.
Author
Owner

@⁠qinrxx on GitHub · 2026-11-24 01:05 UTC · original

For #232, how a compute change would sit beside #267 (asking before any code, so we don't duplicate it):

  • #267 limits how long a draw waits for a graphics pipeline, and keeps compute on resolve_wait (limit.filter(|_| !p.compute)). That's right: a skipped dispatch corrupts what it computes.
  • JRamos1993's RTX 5090 dumps show the stall that remains is compute. Title threads sit in resolve_for_bind → resolve_wait, each building the pipeline itself at its first bind (driver time in nvgpucomp64), while the xcl-pso workers are idle.
  • Proposal: the same module (pso_async.rs), a different lever. A lazy compute pipeline goes to the workers when the title creates it (submit_as), so it is usually built before its first bind. resolve_wait stays as the fallback. Graphics stays lazy, with #267's limit. No overlap with #267's lines, so the PR would go against main.
  • The cost is that every compute pipeline the title makes is built and kept in the driver (~400 KB each, per the lazy() doc). So before writing it I'm measuring how many compute pipelines the title makes, and how long passes between creation and first bind. If the count is too high, the plan changes: prefetch only pipelines whose DXIL is cached, or cap how many go out early.
  • @⁠heretic1321: if you would rather cover compute in #267, say so and I'll leave it to you.

One question on the watchdog decode: Sleep(1000) followed by elapsed > 2.0 reads as seconds, which would make 300.0 300 s, not 300 ms. Has anyone checked the unit of ticks_to_ms?

AI use: Claude Code (Claude Opus 5.5) read the code and #267's diff and wrote this comment. No new runs.

**@⁠qinrxx** on GitHub · 2026-11-24 01:05 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7118753193) For #232, how a compute change would sit beside #267 (asking before any code, so we don't duplicate it): - #267 limits how long a draw waits for a **graphics** pipeline, and keeps compute on `resolve_wait` (`limit.filter(|_| !p.compute)`). That's right: a skipped dispatch corrupts what it computes. - JRamos1993's RTX 5090 dumps show the stall that remains is **compute**. Title threads sit in `resolve_for_bind` → `resolve_wait`, each building the pipeline itself at its first bind (driver time in nvgpucomp64), while the `xcl-pso` workers are idle. - Proposal: the same module (`pso_async.rs`), a different lever. A lazy **compute** pipeline goes to the workers when the title creates it (`submit_as`), so it is usually built before its first bind. `resolve_wait` stays as the fallback. Graphics stays lazy, with #267's limit. No overlap with #267's lines, so the PR would go against `main`. - The cost is that every compute pipeline the title makes is built and kept in the driver (~400 KB each, per the `lazy()` doc). So before writing it I'm measuring how many compute pipelines the title makes, and how long passes between creation and first bind. If the count is too high, the plan changes: prefetch only pipelines whose DXIL is cached, or cap how many go out early. - @⁠heretic1321: if you would rather cover compute in #267, say so and I'll leave it to you. One question on the watchdog decode: `Sleep(1000)` followed by `elapsed > 2.0` reads as seconds, which would make `300.0` 300 s, not 300 ms. Has anyone checked the unit of `ticks_to_ms`? AI use: Claude Code (Claude Opus 5.5) read the code and #267's diff and wrote this comment. No new runs.
Author
Owner

@⁠qinrxx on GitHub · 2026-11-24 01:25 UTC · original

Follow-up to the comment above, for @⁠heretic1321: our change sends compute builds to the shared xcl-pso queue when the title creates them, and that queue runs jobs first come, first served. So a graphics build sent at its first draw could wait behind them, and under #267's limit that means more dropped draws than today. Our PR therefore splits the queue so the workers always take graphics builds before compute ones, with a test that a flood of compute builds doesn't delay a graphics build.

AI use: Claude Code (Claude Opus 5.5) wrote this comment.

**@⁠qinrxx** on GitHub · 2026-11-24 01:25 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7119078722) Follow-up to the comment above, for @⁠heretic1321: our change sends compute builds to the shared `xcl-pso` queue when the title creates them, and that queue runs jobs first come, first served. So a graphics build sent at its first draw could wait behind them, and under #267's limit that means more dropped draws than today. Our PR therefore splits the queue so the workers always take graphics builds before compute ones, with a test that a flood of compute builds doesn't delay a graphics build. AI use: Claude Code (Claude Opus 5.5) wrote this comment.
Author
Owner

@⁠Rednaxeh on GitHub · 2026-11-24 01:26 UTC · original

AMD RDNA3 reproduces it on plain main 2997c9a, twice in a row (288 s and 291 s): the same null write after ~2 minutes of world loading with almost no presents – and here the stall is not pipeline builds. First AMD data point in this thread (JRamos1993 lists AMD under Not tested).

Setup: AMD Radeon RX 7800 XT 16 GB (RDNA3), driver 32.0.32029.2010, 64-lane waves; Ryzen 7 7800X3D; 32 GB RAM, 12 GB page file (commit limit 44.6 GB); Windows 11 Pro 26300; release build of main 2997c9a, no local changes; DXC 1.9.2602.17. Package 1.0.2.1, own copy. Warm DXIL cache (second run of this stage). XCL_NETWORK=0 XCL_RUN_SECONDS=300 XCL_ACTIVITY=1 XCL_TRACE_FAULTS=1 XCL_FRAME_DUMP=120, one A press at ~15 s (the account picker), nothing else.

What happens: intro movie (4 fps on this card, #283's known cost) until ~140 s, menus at 60 presents / 2 s for a few seconds, then the loading art screens; from 162 s presents are 0–2 per 2 s for most windows, the loading art fades to black, and at 288.5 s:

access violation (write at 0x0) in game_scarlett_master.exe+0x23cf683; rax=0x0 rcx=0x70024c348 rdx=0x1 r8=0x7074d8c40; on the stack: game_scarlett_master.exe+0x4e4ba89, game_scarlett_master.exe+0x2215c35, game_scarlett_master.exe+0x71b9a20, game_scarlett_master.exe+0x2215eca
unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) … r13=0x146845c28 …

Same faulting IP, same callers and the same r13 as the RTX 4070 SUPER, RTX 4090 and RTX 3080 Ti runs above. No device removal, no earlier fault (XCL_TRACE_FAULTS logged nothing before it). The second run (same command, A at 16 s) is the same to the second: presents collapse from 162 s, commit 16.7 GB at 140 s → 40.5 GB at 280 s, 2,048 BCPack refusals by 239 s, the fault at 291.5 s with the same registers. A first run of this stage on a cold DXIL cache ended at the 300 s limit without the fault, with ~60 s of DXC compiles in the same window.

Presents per 2 s, 140–288 s (from the activity lines):
142:60 144:57 146:21 … 154:5 … 162:0 164:2 … 172–178: 0 180:2 182:1 184–198: 0 200:2 202–210: 0 212:15 214:4 … 226:10 … 232:12 234:11 236:9 238:0 … 246:9 248:11 … 258:11 260:2 262–288: 0

What the stall is not, on this card: between 162 and 212 s (the first ~50 s at 0 presents) the log has one compute PSO with the translated console CS line; the whole run builds 29 compute pipelines, 17 of them between 240 and 260 s on 4 title threads (7 + 7 + 2 + 1), none in the final 28 s before the watchdog (second run: 33 builds, 5 before 240 s, 23 between 260 and 290 s). AMD's driver compiler builds them in milliseconds here, so the ~110 s of near-zero presents cannot be the synchronous compute builds that the RTX 5090 dumps show. Whatever the title waits on here is something else.

What grows in that time: process commit and local video memory, exactly as in the RTX 4070 SUPER run:

s commit local VRAM
120 15.3 GB 6.4 GB
160 21.4 GB 8.7 GB
200 30.1 GB 11.5 GB
240 37.3 GB 13.0 GB
260 40.2 GB 13.6 GB
288 (crash) 40.5 GB (peak 41.3) 13.6 GB

41 GB of commit on a 32 GB machine with a 44.6 GB commit limit: the last 60 s run with the page file carrying 9+ GB, 3 GB from the limit. DirectStorage in the same window: 1,679 requests / 64 MB at 222 s, 1,892 / 131 MB at 242 s; BCPack refusals reach 2,048 at 234 s (BC1 1,762 = 108 MB, BC7 178, BC5 107, BC6H 1), none filled.

So on RDNA3 the shape is the same as on NVIDIA (loading → black → 40 GB → watchdog), but the thing that costs the time is not the pipeline builds. I have not measured what it is; the candidates visible in the log are paging at 40 GB of commit and the loading waiting on the refused BCPack assets. A run with XCL_THREAD_DUMP_AT during the stall is next if that helps; say which seconds.

Not tested: #267 (from JRamos1993's reading it would not change the compute path, and here compute is not the stall anyway); a larger page file; NVIDIA on this machine (none).

AI use: Claude Code (Claude Fable 5.1) read XCL's log and wrote this comment from it; the run and the input were mine, on the hardware above. Counts, times and RVAs only; no game data.

**@⁠Rednaxeh** on GitHub · 2026-11-24 01:26 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7119099137) **AMD RDNA3 reproduces it on plain `main` `2997c9a`, twice in a row (288 s and 291 s): the same null write after ~2 minutes of world loading with almost no presents – and here the stall is not pipeline builds.** First AMD data point in this thread (JRamos1993 lists AMD under Not tested). **Setup:** AMD Radeon RX 7800 XT 16 GB (RDNA3), driver 32.0.32029.2010, 64-lane waves; Ryzen 7 7800X3D; 32 GB RAM, 12 GB page file (commit limit 44.6 GB); Windows 11 Pro 26300; release build of `main` `2997c9a`, no local changes; DXC 1.9.2602.17. Package 1.0.2.1, own copy. Warm DXIL cache (second run of this stage). `XCL_NETWORK=0 XCL_RUN_SECONDS=300 XCL_ACTIVITY=1 XCL_TRACE_FAULTS=1 XCL_FRAME_DUMP=120`, one A press at ~15 s (the account picker), nothing else. **What happens:** intro movie (4 fps on this card, #283's known cost) until ~140 s, menus at 60 presents / 2 s for a few seconds, then the loading art screens; from 162 s presents are 0–2 per 2 s for most windows, the loading art fades to black, and at 288.5 s: ``` access violation (write at 0x0) in game_scarlett_master.exe+0x23cf683; rax=0x0 rcx=0x70024c348 rdx=0x1 r8=0x7074d8c40; on the stack: game_scarlett_master.exe+0x4e4ba89, game_scarlett_master.exe+0x2215c35, game_scarlett_master.exe+0x71b9a20, game_scarlett_master.exe+0x2215eca unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) … r13=0x146845c28 … ``` Same faulting IP, same callers and the same `r13` as the RTX 4070 SUPER, RTX 4090 and RTX 3080 Ti runs above. No device removal, no earlier fault (`XCL_TRACE_FAULTS` logged nothing before it). The second run (same command, A at 16 s) is the same to the second: presents collapse from 162 s, commit 16.7 GB at 140 s → 40.5 GB at 280 s, 2,048 BCPack refusals by 239 s, the fault at 291.5 s with the same registers. A first run of this stage on a cold DXIL cache ended at the 300 s limit without the fault, with ~60 s of DXC compiles in the same window. **Presents per 2 s, 140–288 s** (from the `activity` lines): `142:60 144:57 146:21 … 154:5 … 162:0 164:2 … 172–178: 0 180:2 182:1 184–198: 0 200:2 202–210: 0 212:15 214:4 … 226:10 … 232:12 234:11 236:9 238:0 … 246:9 248:11 … 258:11 260:2 262–288: 0` **What the stall is not, on this card:** between 162 and 212 s (the first ~50 s at 0 presents) the log has **one** `compute PSO with the translated console CS` line; the whole run builds 29 compute pipelines, 17 of them between 240 and 260 s on 4 title threads (7 + 7 + 2 + 1), none in the final 28 s before the watchdog (second run: 33 builds, 5 before 240 s, 23 between 260 and 290 s). AMD's driver compiler builds them in milliseconds here, so the ~110 s of near-zero presents cannot be the synchronous compute builds that the RTX 5090 dumps show. Whatever the title waits on here is something else. **What grows in that time:** process commit and local video memory, exactly as in the RTX 4070 SUPER run: | s | commit | local VRAM | |---:|---:|---:| | 120 | 15.3 GB | 6.4 GB | | 160 | 21.4 GB | 8.7 GB | | 200 | 30.1 GB | 11.5 GB | | 240 | 37.3 GB | 13.0 GB | | 260 | 40.2 GB | 13.6 GB | | 288 (crash) | 40.5 GB (peak 41.3) | 13.6 GB | 41 GB of commit on a 32 GB machine with a 44.6 GB commit limit: the last 60 s run with the page file carrying 9+ GB, 3 GB from the limit. DirectStorage in the same window: 1,679 requests / 64 MB at 222 s, 1,892 / 131 MB at 242 s; BCPack refusals reach 2,048 at 234 s (BC1 1,762 = 108 MB, BC7 178, BC5 107, BC6H 1), none filled. So on RDNA3 the shape is the same as on NVIDIA (loading → black → 40 GB → watchdog), but the thing that costs the time is not the pipeline builds. I have not measured what it is; the candidates visible in the log are paging at 40 GB of commit and the loading waiting on the refused BCPack assets. A run with `XCL_THREAD_DUMP_AT` during the stall is next if that helps; say which seconds. **Not tested:** #267 (from JRamos1993's reading it would not change the compute path, and here compute is not the stall anyway); a larger page file; NVIDIA on this machine (none). AI use: Claude Code (Claude Fable 5.1) read XCL's log and wrote this comment from it; the run and the input were mine, on the hardware above. Counts, times and RVAs only; no game data.
Author
Owner

@⁠qinrxx on GitHub · 2026-11-24 01:35 UTC · original

@⁠Rednaxeh thanks, that's the data point this thread was missing. It also means the compute-build stall from the RTX 5090 dumps can't be the whole story.

Yes, a thread dump during the stall would help most. Could you rerun the same command with XCL_THREAD_DUMP_AT=165,200,240,270? Those fall in your zero-present windows (162–210 s and 262–288 s), one at the start of each and two in between. What we want to see is what the title's threads wait on there: DirectStorage requests (the refused BCPack ones), paging, a fence or event, or something else.

If one of the dumps ends the run (#106, RtlVirtualUnwind2), the earlier ones are still in xcl.log. Then please say which second it stopped at.

Meanwhile, our change for the NVIDIA compute-bind stall stays scoped to that: it is "Part of #232" and lists your AMD stall and the commit growth as not covered.

AI use: Claude Code (Claude Opus 5.5) wrote this comment.

**@⁠qinrxx** on GitHub · 2026-11-24 01:35 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7119254455) @⁠Rednaxeh thanks, that's the data point this thread was missing. It also means the compute-build stall from the RTX 5090 dumps can't be the whole story. Yes, a thread dump during the stall would help most. Could you rerun the same command with `XCL_THREAD_DUMP_AT=165,200,240,270`? Those fall in your zero-present windows (162–210 s and 262–288 s), one at the start of each and two in between. What we want to see is what the title's threads wait on there: DirectStorage requests (the refused BCPack ones), paging, a fence or event, or something else. If one of the dumps ends the run (#106, `RtlVirtualUnwind2`), the earlier ones are still in `xcl.log`. Then please say which second it stopped at. Meanwhile, our change for the NVIDIA compute-bind stall stays scoped to that: it is "Part of #232" and lists your AMD stall and the commit growth as not covered. AI use: Claude Code (Claude Opus 5.5) wrote this comment.
Author
Owner

@⁠tiagonleal on GitHub · 2026-11-24 02:08 UTC · original

RTX 5070 Ti (16 GB): the same watchdog write at 168.9 s, with #451 to get past the intro

On this machine main 2997c9a plays the intro video at 4–6 fps (the detiling that #440 / #451 / #458 fix), so it does not get to the loading within a short run. With #451 (1f282c7, on a6f5f7a) it does, and ends in this issue's write.

Setup: NVIDIA GeForce RTX 5070 Ti 16 GB (driver 32.0.16.1742, 32-lane waves), Ryzen 7 9800X3D, 31 GB RAM (commit limit 39 GB, system-managed page file), Windows 11 Pro build 26300, rustc 1.100.0 MSVC, release, DXC 1.8.2502.11. Title 1.0.2.1, unpacked; learned coherent window, warm DXIL cache.

Run: xcl run for 300 s, XCL_NETWORK=0, XCL_ACTIVITY=1, XCL_TRACE_FAULTS=1, XCL_FRAME_DUMP=60, XCL_PRESS_AT A at 30 s and every 10 s from 150 to 290 s.

  • 0–56 s: account picker, then the intro video at 30 fps.
  • 66–138 s: presents fall to 0–26 per 2 s; the loading screen art shows (frame dumps at 103 and 123 s).
  • From 140 s: 0 presents in every 2 s window. Commit 39–40 GB, local video memory 13.9 GB (flat from 140 s).
  • 168.9 s:
    access violation (write at 0x0) in game_scarlett_master.exe+0x23cf683; rax=0x0 rcx=0x70024c348 rdx=0x1 r8=0x7074d8c40; on the stack: game_scarlett_master.exe+0x4e4ba89, game_scarlett_master.exe+0x2215c35, game_scarlett_master.exe+0x71b9a20, game_scarlett_master.exe+0x2215ec
    
    Same RVA, rcx and r8 as the RTX 4070 SUPER run above; same RVA as the 4090.
  • Compute pipelines built from the log line compute PSO with the translated console CS: 3 before 100 s, then 5 (100–120 s), 8 (120–140 s), 9 (140–160 s), 8 (160–180 s), from 6 thread ids; the largest after 100 s are 390 288, 316 420 and 153 064 B of DXIL. That matches the RTX 5090 measurement above (compute pipelines built at their first bind on title threads during the stall); I did not take thread dumps in this run.
  • report.json: background_pipelines [55, 0, 58707], failed_pipelines 0; dstorage.bcpack_refused BC1 2 087 requests.

Experiment for the NVIDIA compute-bind change (@⁠qinrxx): the same run with one local line changed in go_background (real.rs): compute pipelines go to the xcl-pso workers when they are made (submit), graphics ones stay lazy (submit_lazy). Everything else as above (#451 head + nothing but that line, and #570, which only touches bind).

lazy (as above) compute sent to the workers when made
compute PSO with the translated console CS lines 33 265 (133 in the first 20 s)
background_pipelines [55, 0, 58707] [289, 0, 58472]
0 presents in every window from 140 s 144 s
commit / local VRAM when the presents stop 39–40 GB / 13.9 GB 40 GB / 14.0 GB
watchdog write (+0x23cf683, same registers) 168.9 s 170.9 s

So building compute pipelines ahead on the workers does not move the stall or the write on this machine. It does not rule the compute builds out either: the title keeps making compute pipelines while it loads, and this build still built 37 of them between 140 and 160 s and 13 between 160 and 180 s, so a bind can still wait for one a worker has not finished. Side note on the experiment only: after the write, that process did not exit (no process ends line; it held ~40 GB until I killed it), which the lazy build did not do.

Commit on this machine: 31 GB of RAM, commit limit 39 GB growing to 42 GB (system-managed page file). Here both runs stop presenting altogether once the process is at ~40 GB of commit, close to that limit, so paging is a candidate here too (on @⁠Rednaxeh's RDNA3 runs the presents collapsed earlier, at ~21 GB, and the write came at 40.5 GB). A third run on current main (9ce2070, with #451) with XCL_THREAD_DUMP_AT=120,145,152,160,166 did not get to its dumps: it was stopped at 114 s (33.8 GB committed) because the machine ran low on memory.

Not tested: plain main for 300 s (its intro is too slow to get here before #451), thread dumps during the stall, #267, a filled driver cache, a larger page file.

AI use: Claude Code (Claude Opus 5.5) ran the build and the run on my machine, read the log, report and frame dumps, and wrote this comment.

**@⁠tiagonleal** on GitHub · 2026-11-24 02:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7119800304) **RTX 5070 Ti (16 GB): the same watchdog write at 168.9 s, with #451 to get past the intro** On this machine `main` 2997c9a plays the intro video at 4–6 fps (the detiling that #440 / #451 / #458 fix), so it does not get to the loading within a short run. With #451 (`1f282c7`, on `a6f5f7a`) it does, and ends in this issue's write. **Setup:** NVIDIA GeForce RTX 5070 Ti 16 GB (driver 32.0.16.1742, 32-lane waves), Ryzen 7 9800X3D, 31 GB RAM (commit limit 39 GB, system-managed page file), Windows 11 Pro build 26300, rustc 1.100.0 MSVC, release, DXC 1.8.2502.11. Title 1.0.2.1, unpacked; learned coherent window, warm DXIL cache. **Run:** `xcl run` for 300 s, `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, `XCL_TRACE_FAULTS=1`, `XCL_FRAME_DUMP=60`, `XCL_PRESS_AT` A at 30 s and every 10 s from 150 to 290 s. - 0–56 s: account picker, then the intro video at 30 fps. - 66–138 s: presents fall to 0–26 per 2 s; the loading screen art shows (frame dumps at 103 and 123 s). - From 140 s: 0 presents in every 2 s window. Commit 39–40 GB, local video memory 13.9 GB (flat from 140 s). - 168.9 s: ``` access violation (write at 0x0) in game_scarlett_master.exe+0x23cf683; rax=0x0 rcx=0x70024c348 rdx=0x1 r8=0x7074d8c40; on the stack: game_scarlett_master.exe+0x4e4ba89, game_scarlett_master.exe+0x2215c35, game_scarlett_master.exe+0x71b9a20, game_scarlett_master.exe+0x2215ec ``` Same RVA, `rcx` and `r8` as the RTX 4070 SUPER run above; same RVA as the 4090. - Compute pipelines built from the log line `compute PSO with the translated console CS`: 3 before 100 s, then 5 (100–120 s), 8 (120–140 s), 9 (140–160 s), 8 (160–180 s), from 6 thread ids; the largest after 100 s are 390 288, 316 420 and 153 064 B of DXIL. That matches the RTX 5090 measurement above (compute pipelines built at their first bind on title threads during the stall); I did not take thread dumps in this run. - `report.json`: `background_pipelines` `[55, 0, 58707]`, `failed_pipelines` 0; `dstorage.bcpack_refused` BC1 2 087 requests. **Experiment for the NVIDIA compute-bind change (@⁠qinrxx):** the same run with one local line changed in `go_background` (`real.rs`): compute pipelines go to the `xcl-pso` workers when they are made (`submit`), graphics ones stay lazy (`submit_lazy`). Everything else as above (#451 head + nothing but that line, and #570, which only touches `bind`). | | lazy (as above) | compute sent to the workers when made | |---|---|---| | `compute PSO with the translated console CS` lines | 33 | 265 (133 in the first 20 s) | | `background_pipelines` | `[55, 0, 58707]` | `[289, 0, 58472]` | | 0 presents in every window from | 140 s | 144 s | | commit / local VRAM when the presents stop | 39–40 GB / 13.9 GB | 40 GB / 14.0 GB | | watchdog write (`+0x23cf683`, same registers) | 168.9 s | 170.9 s | So building compute pipelines ahead on the workers does not move the stall or the write on this machine. It does not rule the compute builds out either: the title keeps making compute pipelines while it loads, and this build still built 37 of them between 140 and 160 s and 13 between 160 and 180 s, so a bind can still wait for one a worker has not finished. Side note on the experiment only: after the write, that process did not exit (no `process ends` line; it held ~40 GB until I killed it), which the lazy build did not do. **Commit on this machine:** 31 GB of RAM, commit limit 39 GB growing to 42 GB (system-managed page file). Here both runs stop presenting altogether once the process is at ~40 GB of commit, close to that limit, so paging is a candidate here too (on @⁠Rednaxeh's RDNA3 runs the presents collapsed earlier, at ~21 GB, and the write came at 40.5 GB). A third run on current `main` (`9ce2070`, with #451) with `XCL_THREAD_DUMP_AT=120,145,152,160,166` did not get to its dumps: it was stopped at 114 s (33.8 GB committed) because the machine ran low on memory. **Not tested:** plain `main` for 300 s (its intro is too slow to get here before #451), thread dumps during the stall, #267, a filled driver cache, a larger page file. AI use: Claude Code (Claude Opus 5.5) ran the build and the run on my machine, read the log, report and frame dumps, and wrote this comment.
Author
Owner

@⁠WillyboPeep on GitHub · 2026-11-24 02:10 UTC · original

Where the commit goes while the world loads, measured. The largest XCL-side share is per-texture tiling tables (~1.8 GB by 120 s, fixed by the tiling.rs part of #539), and video memory costs process commit 1:1 on NVIDIA.

Setup: RTX 4090 (24 GB), 31.6 GB RAM, commit limit ~46 GB, Windows 11 26300. main 508a0c7, release build, DXC 1.9.2602.17. Title 1.0.2.1. XCL_NETWORK=0 plus a firewall block, XCL_ACTIVITY=1, XCL_PRESS_AT A every 4 s from 15 to 150 s. An external guard stops each run when free system commit falls under 3 GB. That happens at ~125–135 s, ~25 s into the world loading; the climb starts at 95–105 s.

1. The memory map of the process during the climb

I snapshotted the game process's committed private regions (VirtualQueryEx) every 6 s and diffed them. Over 96 → 126 s (+6.6 GB):

growth what it is
+2.40 GB 156 new ~16 MB regions, each split into read-write runs with one 4 KB PAGE_NOACCESS page after each. Every one starts with 0xffeeffee at +0x10: these are NT heap segments.
+2.19 GB 35 new 64 MB PAGE_READWRITE | PAGE_WRITECOMBINE regions, one per vram::Pages pool heap made in that time (see 3)
+1.57 GB the title-memory reservations committing (lazy pages, expected)

In the earlier crash minidump (the watchdog write at +0x23cf683), the 40 GB of private commit was 16.6 GB write-combined (191 × 64 MB + 37 × 32 MB + one 2.2 GB block), 13.0 GB in 843 of those heap segments, and ~11 GB of large title / UMA / sparse windows.

2. The heap segments: mostly XCL's own, and mostly tiling tables

  • Whose heap: with a local build that puts XCL's Rust allocations on a private HeapCreate heap, 30 of 40 sampled segments name that heap at +0x28, and 10 name the process heap.
  • Which code: a tracking global allocator (live bytes per call stack for blocks of 16 KB and up, symbolized from xcl.pdb) shows XCL's heap at 2,380 MB live at 120 s, up from 414 MB at 10 s. About 1,780 MB of it is gpu::tiling::Layout::from_bits ← Layout::new / new_3d ← xg::Texture::alignment / with_pipes ← title_textures::register / device_x::create_placed_resource_x. The top site averages 250 KB a block, which is a 2D layout's hz table: 65,536 u32s, of which only hz[0] is read. Every kept texture builds its own copies of the same few dozen tables.
  • Fix measured: sharing the tables (Arc<[u32]>, memoized on the from_bits inputs) took XCL's heap to 594 MB live at 125 s. At the same point of the climb (~20 s into it) the process was ~1.8 GB lower in commit: 17.1 against 18.9 GB. All 640 xcl lib tests pass with it. The same change is part of #539 (tiling.rs: Arc tables, a layout cache, trimmed high tables). This argues for splitting it out and landing it first. It also removes the CPU time #449 measured (~0.3 ms per xg::Texture); thread dumps during the stall caught title threads in from_bits under CreatePlacedResourceX.

3. Video memory is process commit on this driver

A standalone probe on the same machine (D3D12 heaps and resources created, no GPU work):

8 × 64 MiB of… private commit write-combined regions
DEFAULT heap, FLAG_NONE +513 MB +512 MB
DEFAULT heap, CREATE_NOT_ZEROED / CREATE_NOT_RESIDENT / both +513 MB +512 MB
DEFAULT heap, DENY_BUFFERS | DENY_RT_DS_TEXTURES +513 MB +512 MB
committed 4096² RGBA8 textures +513 MB +512 MB
reserved textures, no tiles mapped 0 0

The GPU reports GPUUploadHeapSupported (ReBAR). I have not checked AMD or a machine without ReBAR. So every pool heap, arena and sparse pool XCL makes in video memory also takes its size from the system commit limit. That is why local video memory and commit rise together in the XCL_ACTIVITY lines (here local 6.3 → 10.0 GB and target pages 3.6 → 6.0 GB in ~30 s), and why a larger page file postpones the stop. #248 / #288 bound the kept textures' video memory, and each GB they save counts twice: once in VRAM, once in commit.

Not covered

  • What makes the title's threads stall in the first place (the watchdog's trigger). Compute PSO builds at first bind (JRamos1993) and BCPack refusals (1,024+ per run here) are both present.
  • AMD, other NVIDIA drivers, ReBAR off.
  • The remaining ~440 MB of XCL heap in blocks under 16 KB.

AI use: Claude Code (Claude Opus 5.5) ran the builds, runs and probes on this machine, analysed them and wrote this comment. No game files or personal paths are included.

**@⁠WillyboPeep** on GitHub · 2026-11-24 02:10 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7119837410) **Where the commit goes while the world loads, measured. The largest XCL-side share is per-texture tiling tables (~1.8 GB by 120 s, fixed by the `tiling.rs` part of #539), and video memory costs process commit 1:1 on NVIDIA.** **Setup:** RTX 4090 (24 GB), 31.6 GB RAM, commit limit ~46 GB, Windows 11 26300. `main` 508a0c7, release build, DXC 1.9.2602.17. Title 1.0.2.1. `XCL_NETWORK=0` plus a firewall block, `XCL_ACTIVITY=1`, `XCL_PRESS_AT` A every 4 s from 15 to 150 s. An external guard stops each run when free system commit falls under 3 GB. That happens at ~125–135 s, ~25 s into the world loading; the climb starts at 95–105 s. ## 1. The memory map of the process during the climb I snapshotted the game process's committed private regions (VirtualQueryEx) every 6 s and diffed them. Over 96 → 126 s (+6.6 GB): | growth | what it is | |---:|---| | +2.40 GB | 156 new ~16 MB regions, each split into read-write runs with one 4 KB PAGE_NOACCESS page after each. Every one starts with `0xffeeffee` at +0x10: these are **NT heap segments**. | | +2.19 GB | 35 new 64 MB `PAGE_READWRITE \| PAGE_WRITECOMBINE` regions, one per `vram::Pages` pool heap made in that time (see 3) | | +1.57 GB | the title-memory reservations committing (lazy pages, expected) | In the earlier crash minidump (the watchdog write at +0x23cf683), the 40 GB of private commit was 16.6 GB write-combined (191 × 64 MB + 37 × 32 MB + one 2.2 GB block), 13.0 GB in 843 of those heap segments, and ~11 GB of large title / UMA / sparse windows. ## 2. The heap segments: mostly XCL's own, and mostly tiling tables - **Whose heap:** with a local build that puts XCL's Rust allocations on a private `HeapCreate` heap, 30 of 40 sampled segments name that heap at +0x28, and 10 name the process heap. - **Which code:** a tracking global allocator (live bytes per call stack for blocks of 16 KB and up, symbolized from `xcl.pdb`) shows XCL's heap at **2,380 MB live at 120 s**, up from 414 MB at 10 s. About **1,780 MB** of it is `gpu::tiling::Layout::from_bits` ← `Layout::new` / `new_3d` ← `xg::Texture::alignment` / `with_pipes` ← `title_textures::register` / `device_x::create_placed_resource_x`. The top site averages 250 KB a block, which is a 2D layout's `hz` table: 65,536 `u32`s, of which only `hz[0]` is read. Every kept texture builds its own copies of the same few dozen tables. - **Fix measured:** sharing the tables (`Arc<[u32]>`, memoized on the `from_bits` inputs) took XCL's heap to **594 MB live at 125 s**. At the same point of the climb (~20 s into it) the process was ~1.8 GB lower in commit: 17.1 against 18.9 GB. All 640 `xcl` lib tests pass with it. The same change is part of #539 (`tiling.rs`: `Arc` tables, a layout cache, trimmed high tables). This argues for splitting it out and landing it first. It also removes the CPU time #449 measured (~0.3 ms per `xg::Texture`); thread dumps during the stall caught title threads in `from_bits` under `CreatePlacedResourceX`. ## 3. Video memory is process commit on this driver A standalone probe on the same machine (D3D12 heaps and resources created, no GPU work): | 8 × 64 MiB of… | private commit | write-combined regions | |---|---:|---:| | `DEFAULT` heap, `FLAG_NONE` | +513 MB | +512 MB | | `DEFAULT` heap, `CREATE_NOT_ZEROED` / `CREATE_NOT_RESIDENT` / both | +513 MB | +512 MB | | `DEFAULT` heap, `DENY_BUFFERS \| DENY_RT_DS_TEXTURES` | +513 MB | +512 MB | | committed 4096² RGBA8 textures | +513 MB | +512 MB | | reserved textures, no tiles mapped | 0 | 0 | The GPU reports `GPUUploadHeapSupported` (ReBAR). I have not checked AMD or a machine without ReBAR. So every pool heap, arena and sparse pool XCL makes in video memory also takes its size from the system commit limit. That is why `local` video memory and commit rise together in the `XCL_ACTIVITY` lines (here local 6.3 → 10.0 GB and target pages 3.6 → 6.0 GB in ~30 s), and why a larger page file postpones the stop. #248 / #288 bound the kept textures' video memory, and each GB they save counts twice: once in VRAM, once in commit. ## Not covered - What makes the title's threads stall in the first place (the watchdog's trigger). Compute PSO builds at first bind (JRamos1993) and BCPack refusals (1,024+ per run here) are both present. - AMD, other NVIDIA drivers, ReBAR off. - The remaining ~440 MB of XCL heap in blocks under 16 KB. AI use: Claude Code (Claude Opus 5.5) ran the builds, runs and probes on this machine, analysed them and wrote this comment. No game files or personal paths are included.
Author
Owner

@⁠MonkeyPython on GitHub · 2026-11-24 02:24 UTC · original · edited 2026-11-24 02:36 UTC

@⁠odd/tasks/draft-issue-232-driver.md

**@⁠MonkeyPython** on GitHub · 2026-11-24 02:24 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7120117450) · edited 2026-11-24 02:36 UTC @⁠odd/tasks/draft-issue-232-driver.md
Author
Owner

@⁠grahamster2 on GitHub · 2026-11-24 02:37 UTC · original

With a warm shader cache, the stop at world start also comes from a cross-queue Wait64BitValueX: the submit thread waits on the CPU for a counter whose writer list it has not submitted yet, so it submits the writer 6 s later and the work in between runs on unready data. Trace and a #539 test: https://github.com/ivall/xcl/pull/539#issuecomment-7120332758 (Claude Code, Claude Opus 5.5)

**@⁠grahamster2** on GitHub · 2026-11-24 02:37 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7120333946) With a warm shader cache, the stop at world start also comes from a cross-queue `Wait64BitValueX`: the submit thread waits on the CPU for a counter whose writer list it has not submitted yet, so it submits the writer 6 s later and the work in between runs on unready data. Trace and a #539 test: https://github.com/ivall/xcl/pull/539#issuecomment-7120332758 (_Claude Code, Claude Opus 5.5_)
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 03:14 UTC · original · edited 2026-11-24 03:18 UTC

Static read of the same exe (byte-verified, offline): the faulting instruction at +0x2215c35 is a deliberate self-kill (a store to address 0), not a bug in the surrounding logic. It runs right after the watchdog path collects stall info and checks a global callback pointer at exe+0x71b6348: if the pointer is set, the installed handler is called; if it is NULL, execution falls through to the kill.

Two consequences:

  1. The title ends its own process when the watchdog path runs and the callback at global exe+0x71b6348 is NULL (or after the handler returns). The AV is the intended exit; the interesting event is why the watchdog fired — same family as the +0x23cf683 site (see #534), which is the tagged variant of this kill.
  2. That global is a cheap hook: a data breakpoint on writes to exe+0x71b6348 shows who installs the handler (and whether XCL ever lets that installer run). If the installer is gated behind something XCL stubs, both #159-era "null write" reports and the tagged watchdog deaths collapse to one root cause: stall handler never installed → any stall becomes suicide instead of recovery.

Edited by grahamster2: removed the disassembly listing to keep the title's code off the repo. Findings unchanged.

**@⁠pickles976** on GitHub · 2026-11-24 03:14 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7120910035) · edited 2026-11-24 03:18 UTC Static read of the same exe (byte-verified, offline): the faulting instruction at `+0x2215c35` is **a deliberate self-kill** (a store to address 0), not a bug in the surrounding logic. It runs right after the watchdog path collects stall info and checks a global callback pointer at `exe+0x71b6348`: if the pointer is set, the installed handler is called; if it is NULL, execution falls through to the kill. Two consequences: 1. The title ends its own process when the watchdog path runs **and the callback at global `exe+0x71b6348` is NULL** (or after the handler returns). The AV is the intended exit; the interesting event is *why the watchdog fired* — same family as the `+0x23cf683` site (see #534), which is the tagged variant of this kill. 2. That global is a cheap hook: a data breakpoint on writes to `exe+0x71b6348` shows who installs the handler (and whether XCL ever lets that installer run). If the installer is gated behind something XCL stubs, both #159-era "null write" reports and the tagged watchdog deaths collapse to one root cause: **stall handler never installed → any stall becomes suicide instead of recovery**. _Edited by grahamster2: removed the disassembly listing to keep the title's code off the repo. Findings unchanged._
Author
Owner

@⁠qinrxx on GitHub · 2026-11-24 03:33 UTC · original

@⁠tiagonleal thanks for the A/B. It settles the "build compute pipelines when made" half on your machine: 33 → 265 compute builds, and the stall and the write moved by 2 s (168.9 → 170.9 s). We have dropped that change.

The scale of it on an RTX 5080: a 300 s run of main 2997c9a with local counting in pso_async.rs (nothing else changed) logged 2,742 compute and 55,081 graphics pipelines made by the title, all 2,742 compute ones in the first 11.6 s. Only 1 compute pipeline was built in that run. Title threads waited for a pipeline 66 times, all in the first 23 s (32 compute, 34 graphics). The longest wait was 1.2 s: a compute pipeline built in the binding thread itself. In a regression run of the build-when-made branch, building 211 of those 2,742 cost +974 MB of peak commit against main (15,985 against 15,011 MB).

That run never reached the stall: 6,944 frames (~23 fps), exit 0x0 at the timer, commit flat at ~15.5 GB, nowhere near the ~40 GB where the write comes on other machines, and no stall window or Wait64BitValueX timeout in the log. It stopped before world loading (no BCPack refusals at all, and 126 in the regression runs of the same procedure, against ~2,000 in the stall reports). That fits your reading that the commit limit and paging are part of it.

One question about the hang in your build-when-made run: after the write at 170.9 s, was the process still presenting, with workers still building compute pipelines, or was it fully stuck (no presents, no log lines)? That would show whether the write leaves the title's submit path blocked, or whether only the exit waits on the driver.

Not tested: world loading on this card, so nothing here confirms or rules out the cross-queue Wait64BitValueX wait from #539 (https://github.com/ivall/xcl/pull/539#issuecomment-7120332758). Also not tested: the shutdown after a crash (no run here crashed), and AMD.

AI use: Claude Code (Claude Opus 5.5) wrote the counting, built XCL, read the logs and wrote this comment. The runs on the hardware above were executed by OpenCode with GLM (Z.ai), model GLM-5.3.

**@⁠qinrxx** on GitHub · 2026-11-24 03:33 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7121212197) @⁠tiagonleal thanks for the A/B. It settles the "build compute pipelines when made" half on your machine: 33 → 265 compute builds, and the stall and the write moved by 2 s (168.9 → 170.9 s). We have dropped that change. The scale of it on an RTX 5080: a 300 s run of `main` `2997c9a` with local counting in `pso_async.rs` (nothing else changed) logged 2,742 compute and 55,081 graphics pipelines made by the title, all 2,742 compute ones in the first 11.6 s. Only 1 compute pipeline was built in that run. Title threads waited for a pipeline 66 times, all in the first 23 s (32 compute, 34 graphics). The longest wait was 1.2 s: a compute pipeline built in the binding thread itself. In a regression run of the build-when-made branch, building 211 of those 2,742 cost +974 MB of peak commit against `main` (15,985 against 15,011 MB). That run never reached the stall: 6,944 frames (~23 fps), exit `0x0` at the timer, commit flat at ~15.5 GB, nowhere near the ~40 GB where the write comes on other machines, and no stall window or `Wait64BitValueX` timeout in the log. It stopped before world loading (no BCPack refusals at all, and 126 in the regression runs of the same procedure, against ~2,000 in the stall reports). That fits your reading that the commit limit and paging are part of it. One question about the hang in your build-when-made run: after the write at 170.9 s, was the process still presenting, with workers still building compute pipelines, or was it fully stuck (no presents, no log lines)? That would show whether the write leaves the title's submit path blocked, or whether only the exit waits on the driver. **Not tested:** world loading on this card, so nothing here confirms or rules out the cross-queue `Wait64BitValueX` wait from #539 (https://github.com/ivall/xcl/pull/539#issuecomment-7120332758). Also not tested: the shutdown after a crash (no run here crashed), and AMD. AI use: Claude Code (Claude Opus 5.5) wrote the counting, built XCL, read the logs and wrote this comment. The runs on the hardware above were executed by OpenCode with GLM (Z.ai), model GLM-5.3.
Author
Owner

@⁠qinrxx on GitHub · 2026-11-24 03:36 UTC · original

The measurement for the compute change discussed above: how many compute pipelines the retail title makes, and what building them when made costs. It ends that idea: building them when they are made is not worth doing, and our branch won't be opened.

Setup: NVIDIA GeForce RTX 5080 16 GB, driver 32.0.16.2124; AMD Ryzen 7 9800X3D; 31.6 GB RAM; Windows 11 Pro 26200; release builds; title 1.0.2.1. Each run 300 s, XCL_NETWORK=0, XCL_ACTIVITY=1, A at 14 / 17 / 21 s (XCL_PRESS_A_AT).

How many the title makes (main 2997c9a plus local logging only: counts by kind, and every wait of a title thread for a pipeline):

  • 2,742 compute and 55,081 graphics pipelines. All 2,742 compute ones were made by 11.6 s, at start-up.
  • 66 waits of a title thread for a pipeline, all in the first 23 s. The longest was 1.2 s: a compute pipeline built in the title's thread at its first bind, 7.1 s after it was made.

What building them when made costs (main 2997c9a against our branch 1390ff9, same procedure, the smoke blocks below):

  • Driver memory: 2,742 × ~400 KB (the per-pipeline figure in pso_async::lazy()'s doc) ≈ 1.1 GB, if all were built.
  • Peak commit: our branch 15,985 MB against 15,011 MB on main (+974 MB), after building only 211 of them. main built 3.
  • Time: those 211 builds ran from 2.5 s to 172 s. Building all 2,742 at that rate would keep the workers busy for over half an hour, mostly on pipelines the title doesn't bind for minutes.
  • Frames: 4,923 against 5,099 (−3.5 %).

What this run does not show: the stall itself. These runs did not get to world loading: 3 compute builds on main, 126 BCPack refusals in each regression run (none in the MEASURE run), commit flat at ~15 GB, presents at 60 per 2 s to the end. The stall reports above all show it at world loading: ~2,000 refusals, commit climbing to ~40 GB. So this log has neither the compute-bind waits (JRamos1993, imnicho) nor grahamster2's cross-queue Wait64BitValueX wait: 0 timeouts. Which of the two holds the title on this card is still open.

So, alongside tiagonleal's result (the stall unmoved with compute built when made):

  • Building every compute pipeline when made costs ~1 GB of commit and half an hour of compiling, for builds whose order has nothing to do with what the title binds next. We won't open it.
  • What's left for compute binds is #533's bounded wait. Once #533 lands, the small follow-up agreed there puts a build that a bind waits for ahead of builds started early, in #533's compute pool.

AI use: Runs: OpenCode with GLM (Z.ai) GLM-5.3, which executed the runs on the hardware above and extracted the numbers. Drafts: Claude Code (Claude Opus 5.5), which built XCL, wrote the local counting, checked the figures against the logs and report.json, and wrote this comment. A human (Qinrxx) reviewed it before posting.

**@⁠qinrxx** on GitHub · 2026-11-24 03:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7121248065) The measurement for the compute change discussed above: how many compute pipelines the retail title makes, and what building them when made costs. It ends that idea: building them when they are made is not worth doing, and our branch won't be opened. **Setup:** NVIDIA GeForce RTX 5080 16 GB, driver 32.0.16.2124; AMD Ryzen 7 9800X3D; 31.6 GB RAM; Windows 11 Pro 26200; release builds; title 1.0.2.1. Each run 300 s, `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, A at 14 / 17 / 21 s (`XCL_PRESS_A_AT`). **How many the title makes** (`main` `2997c9a` plus local logging only: counts by kind, and every wait of a title thread for a pipeline): - **2,742 compute and 55,081 graphics pipelines.** All 2,742 compute ones were made by 11.6 s, at start-up. - 66 waits of a title thread for a pipeline, all in the first 23 s. The longest was 1.2 s: a compute pipeline built in the title's thread at its first bind, 7.1 s after it was made. **What building them when made costs** (`main` `2997c9a` against our branch `1390ff9`, same procedure, the smoke blocks below): - **Driver memory:** 2,742 × ~400 KB (the per-pipeline figure in `pso_async::lazy()`'s doc) ≈ 1.1 GB, if all were built. - **Peak commit:** our branch 15,985 MB against 15,011 MB on `main` (+974 MB), after building only 211 of them. `main` built 3. - **Time:** those 211 builds ran from 2.5 s to 172 s. Building all 2,742 at that rate would keep the workers busy for over half an hour, mostly on pipelines the title doesn't bind for minutes. - **Frames:** 4,923 against 5,099 (−3.5 %). **What this run does not show:** the stall itself. These runs did not get to world loading: 3 compute builds on `main`, 126 BCPack refusals in each regression run (none in the MEASURE run), commit flat at ~15 GB, presents at 60 per 2 s to the end. The stall reports above all show it at world loading: ~2,000 refusals, commit climbing to ~40 GB. So this log has neither the compute-bind waits (JRamos1993, imnicho) nor grahamster2's cross-queue `Wait64BitValueX` wait: 0 timeouts. Which of the two holds the title on this card is still open. So, alongside tiagonleal's result (the stall unmoved with compute built when made): - Building every compute pipeline when made costs ~1 GB of commit and half an hour of compiling, for builds whose order has nothing to do with what the title binds next. We won't open it. - What's left for compute binds is #533's bounded wait. Once #533 lands, the small follow-up agreed there puts a build that a bind waits for ahead of builds started early, in #533's compute pool. AI use: Runs: OpenCode with GLM (Z.ai) GLM-5.3, which executed the runs on the hardware above and extracted the numbers. Drafts: Claude Code (Claude Opus 5.5), which built XCL, wrote the local counting, checked the figures against the logs and `report.json`, and wrote this comment. A human (Qinrxx) reviewed it before posting.
Author
Owner

@⁠LocranKing on GitHub · 2026-11-24 03:50 UTC · original

Observed the +0x23cf683 watchdog variant during an interactive run on an 8 GB NVIDIA GeForce RTX 3060 Ti.

Setup

  • XCL: main @ dd2ae9a (release build), XCL_NETWORK=0, navigated interactively past the menus into world loading
  • Hardware / software: NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, driver 32.0.16.2101, wave32), AMD Ryzen 5 5500, 31.8 GB RAM, Windows 11 Home Build 26200, DXC 1.9.2602.17 (SDK 10.0.26100.0)
  • Note: free commit at launch was 16534 MB (< 17408 MB), so XCL used a 512 MB coherent window (plus 3 sparse VRAM windows).

What happened

  • Reached Game State: Game Running (Frame: 1284, TileHeap: 3651/6236 MB), with 1718 total presents (600 frames at 53.8 s / 16.7 fps, 900 at 103.9 s / 6.0 fps, 1200 at 144.3 s / 7.4 fps, 1500 at 164.5 s / 14.8 fps).
  • At 236.4 s: 17154 draws with translated pipelines (0 skipped) and 2048 dispatches (0 skipped).
  • Also logged before the crash: 2048 BCPack refusals (BC1 1760, BC5 108, BC6H 1, BC7 179), 8 vertex/index buffer mirrors outside unified memory, and 4 CreateShaderResourceView(RAYTRACING_ACCELERATION_STRUCTURE) warnings outside unified memory (empty BVH descriptor).
  • At 268.0 s:
    unhandled exception 0xc0000005 in <title>+0x23cf683 (write at address 0x0) rax=0x0 rbx=0x0 ... rbp=0x0 ...; on the stack: +0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca
  • report.json at exit: translated_pipelines: 55, background_pipelines: [55, 0, 58709], with xcl-pso-0..10 and D3D Background Thread 0..3 waiting (ntdll+0x16a054).
  • Stubs called: ID3D12CommandAllocator::#9 (1810×), ID3D12GraphicsCommandList10::#126 (1729×), #142 (1729×), #75 (1729×), #131 (15×), #132 (5×), #101 (10×), ID3D12CommandQueue::#31 (349×).

AI use: Antigravity (Gemini 4 Hydrogen) extracted the numbers from xcl.log / report.json and drafted this comment. No game files attached.

**@⁠LocranKing** on GitHub · 2026-11-24 03:50 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7121467911) Observed the `+0x23cf683` watchdog variant during an interactive run on an **8 GB NVIDIA GeForce RTX 3060 Ti**. **Setup** - XCL: `main` @ `dd2ae9a` (release build), `XCL_NETWORK=0`, navigated interactively past the menus into world loading - Hardware / software: NVIDIA GeForce RTX 3060 Ti (`8024 MiB VRAM`, driver `32.0.16.2101`, wave32), AMD Ryzen 5 5500, 31.8 GB RAM, Windows 11 Home Build 26200, DXC `1.9.2602.17` (SDK `10.0.26100.0`) - Note: free commit at launch was `16534 MB` (< `17408 MB`), so XCL used a `512 MB` coherent window (plus 3 sparse VRAM windows). **What happened** - Reached `Game State: Game Running` (`Frame: 1284`, `TileHeap: 3651/6236 MB`), with `1718` total presents (`600` frames at 53.8 s / `16.7 fps`, `900` at 103.9 s / `6.0 fps`, `1200` at 144.3 s / `7.4 fps`, `1500` at 164.5 s / `14.8 fps`). - At `236.4 s`: `17154` draws with translated pipelines (`0` skipped) and `2048` dispatches (`0` skipped). - Also logged before the crash: `2048` `BCPack refusals` (`BC1 1760`, `BC5 108`, `BC6H 1`, `BC7 179`), `8` vertex/index buffer mirrors outside unified memory, and `4` `CreateShaderResourceView(RAYTRACING_ACCELERATION_STRUCTURE)` warnings outside unified memory (empty BVH descriptor). - At `268.0 s`: `unhandled exception 0xc0000005 in <title>+0x23cf683 (write at address 0x0) rax=0x0 rbx=0x0 ... rbp=0x0 ...; on the stack: +0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca` - `report.json` at exit: `translated_pipelines: 55`, `background_pipelines: [55, 0, 58709]`, with `xcl-pso-0..10` and `D3D Background Thread 0..3` waiting (`ntdll+0x16a054`). - Stubs called: `ID3D12CommandAllocator::#9` (1810×), `ID3D12GraphicsCommandList10::#126` (1729×), `#142` (1729×), `#75` (1729×), `#131` (15×), `#132` (5×), `#101` (10×), `ID3D12CommandQueue::#31` (349×). **AI use:** Antigravity (`Gemini 4 Hydrogen`) extracted the numbers from `xcl.log` / `report.json` and drafted this comment. No game files attached.
Author
Owner

@⁠qinrxx on GitHub · 2026-11-24 04:07 UTC · original

The +0x23cf683 write reproduced on an RTX 5080, with the stall before it measured and a thread dump at the crash: title threads building compute pipelines at their first bind, part of that time spent waiting on DXC's free-commit throttle. No cross-queue wait in it.

Setup: NVIDIA GeForce RTX 5080 16 GB, driver 32.0.16.2124; AMD Ryzen 7 9800X3D; 31.6 GB RAM, system-managed page file (commit limit 45.1 GB after the run); Windows 11 Pro 26200; release build of main f4ce27c plus local logging only: in pso_async.rs, pipelines counted by kind and every wait of a title thread for one logged, with no behaviour changed. Title 1.0.2.1. XCL_NETWORK=0, XCL_ACTIVITY=1, XCL_RUN_SECONDS=420, XCL_FRAME_DUMP=300, A every 4 s from 15 to 147 s (XCL_PRESS_A_AT). #690's preload and #634's driver blob cache were off (XCL_PSO_PRELOAD=0, XCL_PSO_DISK_CACHE=0), to compare with our earlier runs. So this is not main with its defaults.

Timeline (XCL_ACTIVITY lines):

  • 10–43 s: menus, 60 presents per 2 s.
  • From 44 s: world loading. DirectStorage at 6,000–10,800 requests per 2 s. Commit 16.3 GB → 27.4 GB by 60 s; local video memory 7.5 → 14.3 GB.
  • 48–62 s: presents fall to 2–29 per 2 s. From 64 s, 0 presents, and 0–8 draws per 2 s.
  • 91.3 s, 27 s after the last frame:
    unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) rax=0x0 rbx=0x0 rcx=0x70024c348 rdx=0x1 … r8=0x7074d8c40
    
    The same RVA and the same rcx / r8 as the RTX 4070 SUPER, RTX 5070 Ti and RX 7800 XT runs above, and the same RVA as the RTX 4090's. Commit at the crash was 28.2 GB, local video memory 14.4 GB.
  • BCPack refusals 2,385 (BC1 2,076). The process ended by itself at 92.2 s.

This is the second time we've seen this stall. A first run at the same settings, without thread dumps and limited to 300 s, got there later (265–300 s, after the first-run screens were done by hand): commit climbing to 28 GB, 0 presents from 292 s, compute-bind waits held up to 8.9 s. The 300 s timer ended it before the write.

The stall (62–92 s), from the waits logged:

  • Compute binds: 61 title-thread waits for compute pipelines, 140.9 s of title-thread time held in 30 s. All 61 were made at start-up, between 3.8 and 4.9 s, a minute before their first bind, and each was built at that bind by a title thread, the first one to bind it, while the others waited.
  • The longest hold, 13.8 s (61.1–74.9 s): four title threads waiting on one 390 KB compute program, built by one of them.
    • The log has its driver build at 6,019 ms. That leaves ~7.8 s before it, in translation and DXC.
    • Other driver builds in the stall: 236 KB in 3,811 ms, 224 KB in 2,517 ms, 164 KB in 2,020 ms.
  • Wait64BitValueX: 0 timeouts, which also means no wait reached 2 s.

Thread dump at the crash (139 threads, written by XCL 0.9 s after the write; XCL frames named from the build's PDB):

  • A title thread in pso_async::resolve_wait, called from bind::execute_indirect. That is a compute bind through ExecuteIndirect, which on main still waits without a limit.
  • Two title threads building compute pipelines in their own threads: real::translated_compute_pso → pso::console_to_dxil_in → dxc::compile_cached_in → dxc::compile. Both were parked waiting for the DXC pool's answer.
  • The DXC pool: 3 of 15 xcl-dxc workers asleep in dxc::wait_for_memory. That is the loop that holds a compile until free system commit is at least 6 GB plus 1 GB per compile already running, for up to 60 s. The other 12 were idle on the pool's queue, and none was inside the compiler.
  • The xcl-pso workers: all 15 idle (Mutex::lock_contended / park on the shared receiver).
  • The driver: D3D Background Threads 1–3 inside nvgpucomp64.dll, plus one more thread inside it.
  • No thread in list_x::wait_all. No submit thread was holding on a title counter at that moment.

What it says, on this card:

  • The stall is compute binds. Title threads build a compute pipeline at its first bind and others queue behind it, as JRamos1993 (RTX 5090) and imnicho (RTX 5080) saw.
  • Two new pieces:
    • The pipelines were made a minute before they were needed. That is the case #690's preload is for.
    • Part of the build time sits ahead of the driver, in DXC. At the crash, DXC's compiles were held by the free-commit throttle while the process was at 28 GB.
  • That would link the commit growth to the compute waits: the more commit world loading takes, the slower the compiles a bind waits for. It's one snapshot, though. XCL doesn't log the system's free commit (#194's line would), so I can't say how long the throttle held or how much free commit there was.

Not tested:

  • main's defaults, #690's preload and #634's driver blob cache. A run with the preload on is next.
  • How long DXC waited in wait_for_memory during the stall. The only evidence that the throttle was active is the dump XCL wrote at the crash, 0.9 s after the write. The thread dumps scheduled from 120 s never ran, because the stall came earlier than in our previous run.
  • AMD; #533 and #267; the submit thread before 91 s (one snapshot).

AI use: Runs: OpenCode with GLM (Z.ai), model GLM-5.3. Drafts: Claude Code (Claude Opus 5.5); a human (Qinrxx) reviewed before posting.

**@⁠qinrxx** on GitHub · 2026-11-24 04:07 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7121731632) **The `+0x23cf683` write reproduced on an RTX 5080, with the stall before it measured and a thread dump at the crash: title threads building compute pipelines at their first bind, part of that time spent waiting on DXC's free-commit throttle. No cross-queue wait in it.** **Setup:** NVIDIA GeForce RTX 5080 16 GB, driver 32.0.16.2124; AMD Ryzen 7 9800X3D; 31.6 GB RAM, system-managed page file (commit limit 45.1 GB after the run); Windows 11 Pro 26200; release build of `main` `f4ce27c` plus local logging only: in `pso_async.rs`, pipelines counted by kind and every wait of a title thread for one logged, with no behaviour changed. Title 1.0.2.1. `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, `XCL_RUN_SECONDS=420`, `XCL_FRAME_DUMP=300`, A every 4 s from 15 to 147 s (`XCL_PRESS_A_AT`). **#690's preload and #634's driver blob cache were off** (`XCL_PSO_PRELOAD=0`, `XCL_PSO_DISK_CACHE=0`), to compare with our earlier runs. So this is not `main` with its defaults. **Timeline** (`XCL_ACTIVITY` lines): - 10–43 s: menus, 60 presents per 2 s. - From 44 s: world loading. DirectStorage at 6,000–10,800 requests per 2 s. Commit 16.3 GB → 27.4 GB by 60 s; local video memory 7.5 → 14.3 GB. - 48–62 s: presents fall to 2–29 per 2 s. From 64 s, 0 presents, and 0–8 draws per 2 s. - 91.3 s, 27 s after the last frame: ``` unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) rax=0x0 rbx=0x0 rcx=0x70024c348 rdx=0x1 … r8=0x7074d8c40 ``` The same RVA and the same `rcx` / `r8` as the RTX 4070 SUPER, RTX 5070 Ti and RX 7800 XT runs above, and the same RVA as the RTX 4090's. Commit at the crash was 28.2 GB, local video memory 14.4 GB. - BCPack refusals 2,385 (BC1 2,076). The process ended by itself at 92.2 s. This is the second time we've seen this stall. A first run at the same settings, without thread dumps and limited to 300 s, got there later (265–300 s, after the first-run screens were done by hand): commit climbing to 28 GB, 0 presents from 292 s, compute-bind waits held up to 8.9 s. The 300 s timer ended it before the write. **The stall (62–92 s), from the waits logged:** - **Compute binds:** 61 title-thread waits for compute pipelines, 140.9 s of title-thread time held in 30 s. All 61 were made at start-up, between 3.8 and 4.9 s, a minute before their first bind, and each was built at that bind by a title thread, the first one to bind it, while the others waited. - **The longest hold, 13.8 s (61.1–74.9 s):** four title threads waiting on one 390 KB compute program, built by one of them. - The log has its driver build at 6,019 ms. That leaves ~7.8 s before it, in translation and DXC. - Other driver builds in the stall: 236 KB in 3,811 ms, 224 KB in 2,517 ms, 164 KB in 2,020 ms. - **`Wait64BitValueX`:** 0 timeouts, which also means no wait reached 2 s. **Thread dump at the crash** (139 threads, written by XCL 0.9 s after the write; XCL frames named from the build's PDB): - **A title thread in `pso_async::resolve_wait`, called from `bind::execute_indirect`.** That is a compute bind through `ExecuteIndirect`, which on `main` still waits without a limit. - **Two title threads building compute pipelines in their own threads:** `real::translated_compute_pso` → `pso::console_to_dxil_in` → `dxc::compile_cached_in` → `dxc::compile`. Both were parked waiting for the DXC pool's answer. - **The DXC pool:** 3 of 15 `xcl-dxc` workers asleep in `dxc::wait_for_memory`. That is the loop that holds a compile until free system commit is at least 6 GB plus 1 GB per compile already running, for up to 60 s. The other 12 were idle on the pool's queue, and none was inside the compiler. - **The `xcl-pso` workers:** all 15 idle (`Mutex::lock_contended` / `park` on the shared receiver). - **The driver:** D3D Background Threads 1–3 inside `nvgpucomp64.dll`, plus one more thread inside it. - **No thread in `list_x::wait_all`.** No submit thread was holding on a title counter at that moment. **What it says, on this card:** - **The stall is compute binds.** Title threads build a compute pipeline at its first bind and others queue behind it, as JRamos1993 (RTX 5090) and imnicho (RTX 5080) saw. - **Two new pieces:** - The pipelines were made a minute before they were needed. That is the case #690's preload is for. - Part of the build time sits ahead of the driver, in DXC. At the crash, DXC's compiles were held by the free-commit throttle while the process was at 28 GB. - **That would link the commit growth to the compute waits:** the more commit world loading takes, the slower the compiles a bind waits for. It's one snapshot, though. XCL doesn't log the system's free commit (#194's line would), so I can't say how long the throttle held or how much free commit there was. **Not tested:** - `main`'s defaults, #690's preload and #634's driver blob cache. A run with the preload on is next. - How long DXC waited in `wait_for_memory` during the stall. The only evidence that the throttle was active is the dump XCL wrote at the crash, 0.9 s after the write. The thread dumps scheduled from 120 s never ran, because the stall came earlier than in our previous run. - AMD; #533 and #267; the submit thread before 91 s (one snapshot). AI use: Runs: OpenCode with GLM (Z.ai), model GLM-5.3. Drafts: Claude Code (Claude Opus 5.5); a human (Qinrxx) reviewed before posting.
Author
Owner

@⁠qinrxx on GitHub · 2026-11-24 04:13 UTC · original

Follow-up to the RTX 5080 reproduction above: the same run with #690's preload on (XCL_PSO_PRELOAD=1, everything else unchanged). The preload did not remove the stall, and the write came at the same point. This run also shows a cross-queue Wait64BitValueX wait on the submit thread, which the run without the preload did not. Open questions below, not conclusions.

Setup: as above (main f4ce27c plus local logging in pso_async.rs, RTX 5080, XCL_PSO_DISK_CACHE=0, A every 4 s from 15 to 147 s), with XCL_PSO_PRELOAD=1. The preload started from the list the two earlier runs wrote: "the pipelines of 106 shader sets an earlier run used are built ahead of their first use". It built over 1,024 pipelines in the first 3.4 s.

Side by side (each from its own xcl.log / report.json):

preload off (the run above) preload on
presents fall from 48 s from 44–48 s
0 presents from 64 s from 64 s
the write at +0x23cf683 (same registers) 91.3 s 90.3 s
compute waits ending 62–93 s 61: 46 built in the waiting thread, 15 waiting for another thread's build 31, all built in the waiting thread
when those pipelines were made 3.8–4.9 s 1.8–5.0 s
title-thread time held in the stall window 140.9 s (62–92 s) 103.0 s (62–90 s)
longest single hold 13.8 s 15.2 s
longest driver build in the stall 6,019 ms (390 KB DXIL) 9,223 ms (349 KB DXIL); 8,836 ms (492 KB)
commit / local video memory at the crash 28.2 GB / 14.4 GB 29.2 GB / 14.4 GB
Wait64BitValueX timeouts 0 15, from 62.6 to 91.1 s
pipelines built in the background (report.json) 96 1,288
keys in used-pipelines.txt 51 → 106 106 → 156

The new wait:

  • One thread timed out 15 times in a row, 2 s each, from 62.6 s to 91.1 s:
    D3D12.X: Wait64BitValueX timed out after 2000 ms at 0x70417fee8 (op 7, want 0x52c, mask 0xffffffffffffffff; memory holds Some(0))
    
  • The counters were 0x70417fee8, 0x70417fef8, … 0x70417ffc8: 15 counters 16 bytes apart. Every one was waited for >= 0x52c (op 7, GREATER_EQUAL), and every one held 0, so nothing had written them yet.
  • That thread was in the crash dump. With XCL frames named from the build's PDB, it was in the Wait64BitValueX wait loop ← list_x::execute_with_waits ← the queue's ExecuteCommandLists: the title's submit thread, held on the CPU for ~30 s, submitting nothing.

The crash dumps compared (each written by XCL ~0.9 s after the write):

preload off preload on
title thread in resolve_wait (from bind::execute_indirect) 1 0
title threads building a compute pipeline in their own thread, parked on the DXC pool 2 4
submit thread in execute_with_waits none 1 (the wait above)
xcl-dxc: compiling / asleep in wait_for_memory / idle 0 / 3 / 12 1 / 3 / 11
xcl-pso workers 15 idle 15 idle
xcl-pso-pre (preload) workers — 3, idle on their empty queue
D3D Background Threads inside nvgpucomp64.dll 3 2

With the preload on, one DXC compile was running and three were asleep in the free-commit throttle while four title threads waited for them. DXC was working one compile at a time.

Open questions:

  1. Did the preload list cover the pipelines the stall waits on? The log can't say directly, because our logging doesn't print a pipeline's key. What it does show:

    • all 31 compute waits in the stall were builds in the waiting thread, with none found already built;
    • the preload's own workers had an empty queue at the crash;
    • this run added 50 shader sets that weren't in the list.

    That points to the stall binding pipelines the earlier runs never reached: each run crashed at the stall, so it could only record what came before it. If so, each run would get a little further, which this run did not do. A key in the wait line would settle it, and that is our next local change.

  2. Whose are the 15 counters, and why does the submit thread wait on them only with the preload on? They're in the title's memory, 16 bytes apart, all at 0, all wanted >= 0x52c. That looks like grahamster2's trace (counters first used at world start, waited on the CPU by the thread that would submit their writers). Without the preload, the crash dump had no thread in execute_with_waits, and the waiting title thread was in a compute bind called from ExecuteIndirect. One reading: with more pipelines ready, the recording got past a bind and the submit thread now waits on counters whose writers are queued behind the compute binds that are still waiting. That isn't shown. A thread dump a few seconds into the stall would show whether the two waits overlap.

  3. Did the preload make anything worse?

    • Commit was 1.0 GB higher at the crash.
    • The longest driver builds in the stall were longer: 9.2 s and 8.8 s, against 6.0 s.
    • 1,288 pipelines were built in the background, against 96.

    Whether the longer builds come from the background builds competing for the CPU or just from different programs (the largest DXIL here is 492 KB, against 390 KB), one run each can't tell.

Not tested: a key per wait (next); thread dumps inside the stall (both runs' scheduled dumps came after the crash); #634's driver blob cache (off in both runs); AMD; #533 / #267.

AI use: Runs: OpenCode with GLM (Z.ai), model GLM-5.3. Drafts: Claude Code (Claude Opus 5.5); a human (Qinrxx) reviewed before posting.

**@⁠qinrxx** on GitHub · 2026-11-24 04:13 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7121826807) Follow-up to the RTX 5080 reproduction above: the same run with #690's preload on (`XCL_PSO_PRELOAD=1`, everything else unchanged). **The preload did not remove the stall, and the write came at the same point. This run also shows a cross-queue `Wait64BitValueX` wait on the submit thread, which the run without the preload did not.** Open questions below, not conclusions. **Setup:** as above (`main` `f4ce27c` plus local logging in `pso_async.rs`, RTX 5080, `XCL_PSO_DISK_CACHE=0`, A every 4 s from 15 to 147 s), with `XCL_PSO_PRELOAD=1`. The preload started from the list the two earlier runs wrote: "the pipelines of 106 shader sets an earlier run used are built ahead of their first use". It built over 1,024 pipelines in the first 3.4 s. **Side by side** (each from its own `xcl.log` / `report.json`): | | preload off (the run above) | preload on | |---|---|---| | presents fall | from 48 s | from 44–48 s | | 0 presents | from 64 s | from 64 s | | the write at `+0x23cf683` (same registers) | 91.3 s | 90.3 s | | compute waits ending 62–93 s | 61: 46 built in the waiting thread, 15 waiting for another thread's build | 31, all built in the waiting thread | | when those pipelines were made | 3.8–4.9 s | 1.8–5.0 s | | title-thread time held in the stall window | 140.9 s (62–92 s) | 103.0 s (62–90 s) | | longest single hold | 13.8 s | 15.2 s | | longest driver build in the stall | 6,019 ms (390 KB DXIL) | 9,223 ms (349 KB DXIL); 8,836 ms (492 KB) | | commit / local video memory at the crash | 28.2 GB / 14.4 GB | 29.2 GB / 14.4 GB | | `Wait64BitValueX` timeouts | 0 | 15, from 62.6 to 91.1 s | | pipelines built in the background (`report.json`) | 96 | 1,288 | | keys in `used-pipelines.txt` | 51 → 106 | 106 → 156 | **The new wait:** - One thread timed out 15 times in a row, 2 s each, from 62.6 s to 91.1 s: ``` D3D12.X: Wait64BitValueX timed out after 2000 ms at 0x70417fee8 (op 7, want 0x52c, mask 0xffffffffffffffff; memory holds Some(0)) ``` - The counters were 0x70417fee8, 0x70417fef8, … 0x70417ffc8: 15 counters 16 bytes apart. Every one was waited for `>= 0x52c` (op 7, `GREATER_EQUAL`), and every one held 0, so nothing had written them yet. - That thread was in the crash dump. With XCL frames named from the build's PDB, it was in the `Wait64BitValueX` wait loop ← `list_x::execute_with_waits` ← the queue's `ExecuteCommandLists`: the title's submit thread, held on the CPU for ~30 s, submitting nothing. **The crash dumps compared** (each written by XCL ~0.9 s after the write): | | preload off | preload on | |---|---|---| | title thread in `resolve_wait` (from `bind::execute_indirect`) | 1 | 0 | | title threads building a compute pipeline in their own thread, parked on the DXC pool | 2 | 4 | | submit thread in `execute_with_waits` | none | 1 (the wait above) | | `xcl-dxc`: compiling / asleep in `wait_for_memory` / idle | 0 / 3 / 12 | 1 / 3 / 11 | | `xcl-pso` workers | 15 idle | 15 idle | | `xcl-pso-pre` (preload) workers | — | 3, idle on their empty queue | | D3D Background Threads inside `nvgpucomp64.dll` | 3 | 2 | With the preload on, one DXC compile was running and three were asleep in the free-commit throttle while four title threads waited for them. DXC was working one compile at a time. **Open questions:** 1. **Did the preload list cover the pipelines the stall waits on?** The log can't say directly, because our logging doesn't print a pipeline's key. What it does show: - all 31 compute waits in the stall were builds in the waiting thread, with none found already built; - the preload's own workers had an empty queue at the crash; - this run added 50 shader sets that weren't in the list. That points to the stall binding pipelines the earlier runs never reached: each run crashed at the stall, so it could only record what came before it. If so, each run would get a little further, which this run did not do. A key in the wait line would settle it, and that is our next local change. 2. **Whose are the 15 counters, and why does the submit thread wait on them only with the preload on?** They're in the title's memory, 16 bytes apart, all at 0, all wanted `>= 0x52c`. That looks like grahamster2's trace (counters first used at world start, waited on the CPU by the thread that would submit their writers). Without the preload, the crash dump had no thread in `execute_with_waits`, and the waiting title thread was in a compute bind called from `ExecuteIndirect`. One reading: with more pipelines ready, the recording got past a bind and the submit thread now waits on counters whose writers are queued behind the compute binds that are still waiting. That isn't shown. A thread dump a few seconds into the stall would show whether the two waits overlap. 3. **Did the preload make anything worse?** - Commit was 1.0 GB higher at the crash. - The longest driver builds in the stall were longer: 9.2 s and 8.8 s, against 6.0 s. - 1,288 pipelines were built in the background, against 96. Whether the longer builds come from the background builds competing for the CPU or just from different programs (the largest DXIL here is 492 KB, against 390 KB), one run each can't tell. **Not tested:** a key per wait (next); thread dumps inside the stall (both runs' scheduled dumps came after the crash); #634's driver blob cache (off in both runs); AMD; #533 / #267. AI use: Runs: OpenCode with GLM (Z.ai), model GLM-5.3. Drafts: Claude Code (Claude Opus 5.5); a human (Qinrxx) reviewed before posting.
Author
Owner

@⁠qinrxx on GitHub · 2026-11-24 04:23 UTC · original

Third run on the RTX 5080 (same as the preload run above, with thread dumps every 3 s from 60 to 90 s and each wait line carrying the pipeline's key). It answers both open questions from the last comment.

Setup: main f4ce27c plus local logging in pso_async.rs. Each wait of a title thread for a pipeline is logged with the pipeline's key (the one used-pipelines.txt stores) and whether that key was in the list the run started from (used::known, the check the preload uses). XCL_PSO_PRELOAD=1, XCL_PSO_DISK_CACHE=0, A every 4 s from 15 to 147 s, XCL_THREAD_DUMP_AT=60,63,…,90. The list had 156 keys at the start, from our three earlier runs.

Same end: presents at 0 from 64 s, and the write at 90.4 s (+0x23cf683, rcx=0x70024c348, r8=0x7074d8c40). Commit 28.4 GB, local video memory 14.4 GB.

1. The preload list did not cover the stall's pipelines.

  • 100 compute waits ended between 62 and 93 s, on 99 distinct pipelines. Every one was earlier-list no, and 99 were built in the waiting thread.
  • None of the run's 105 builds in a title thread was on a known key.
  • Waits on known keys: the ones logged were all already built (32 compute, 30 graphics) or graphics built on a worker (2). All their keys came from the first run's list. Our logging records every wait that held a thread, but only the first 32 of each kind that were already built.
  • The 99 stall keys are now in the list: all 99 are among the 135 this run added (156 → 291), and none was among the first 156.

So the preload did its part, with no pipeline it knew holding a thread. The stall was made entirely of pipelines no earlier run had used: each run ends at the stall, so it can only record what came before.

2. The counter wait and the compute binds overlap. The 11 scheduled dumps landed at 60.1, 63.1, … 90.0 s, all inside the stall (2 presents in the window to 62 s, 0 from 64 s), plus XCL's dump at the crash. XCL frames are named from the build's PDB.

  • 60.1 s: the submit thread was in the present path, waiting on a GPU fence for a title-texture upload (present::watched_rt → title_textures::refresh → texture::upload_batch → fence::wait).
  • Every dump from 63.1 to 84.0 s (8 dumps):
    • the submit thread was in the Wait64BitValueX wait loop (list_x::wait64_x ← execute_with_waits ← q_execute_command_lists);
    • at the same moment, 1–3 title threads were building compute pipelines in their own threads (real::translated_compute_pso → dxc::compile) and 1–2 were in pso_async::resolve_wait, mostly from bind::execute_indirect.
  • The log over the same seconds: 13 timeouts from 62.5 to 86.7 s on counters 16 bytes apart (0x70417ff68 … 0x70417fff8, then 0x70417fe58, 0x70417fe10, 0x70417fee8), all >= 0x51b, all holding 0.
  • 87.1 s to the crash: the submit thread was back in the game's own code (game+0x56a0d ← +0x4e7f358 …), and the compute binds went on.
  • DXC in every dump from 63 to 91 s: exactly one xcl-dxc worker inside dxcompiler.dll, and 1–4 asleep in dxc::wait_for_memory, the free-commit throttle. So through the whole stall, not only at the crash, DXC compiled one program at a time while title threads waited on it.

Side by side:

preload off preload on (106 keys) preload on (156 keys), this run
0 presents from / the write 64 s / 91.3 s 64 s / 90.3 s 64 s / 90.4 s
compute waits ending 62–93 s (built in the waiting thread) 61 (46) 31 (31) 100 (99)
title-thread time held in the stall window 140.9 s 103.0 s 82.1 s
longest hold / longest driver build 13.8 s / 6.0 s 15.2 s / 9.2 s 4.6 s / 4.6 s
commit at the crash 28.2 GB 29.2 GB 28.4 GB
Wait64BitValueX timeouts 0 15 (>= 0x52c) 13 (>= 0x51b)
pipelines built in the background 96 1,288 1,428
keys in used-pipelines.txt 51 → 106 106 → 156 156 → 291

What this suggests (observations, not a fix):

  • The preload removes the pipelines it knows from the stall. But the title keeps binding compute pipelines made at start-up (1.8–5.2 s here) that no run has reached yet, and each run still dies at ~90 s. So the list grows by what one run reaches before the stall (55, 50, 135 keys), and the stall doesn't get shorter.
  • The shape changed this run: more pipelines, built one after another with shorter holds (longest 4.6 s against 13.8–15.2 s). The title-thread time held went down (82 s against 103–141 s), but there was no frame either way.
  • The counter wait only shows up with the preload on. In both such runs it overlaps the compute binds for most of the stall. Whether its writers are queued behind those binds can't be told from here.
  • DXC working one compile at a time under the commit throttle is now seen in 10 dumps across the stall, not only at the crash.

Open questions:

  1. Would a run that starts with these 291 keys get past ~90 s, or does the title bind another set nobody has reached? That's the next run.
  2. Whose are the counters (16-byte slots, 0 → >= 0x51b / 0x52c), and are their writers behind the compute binds?
  3. How much shorter would the compiles a bind waits for be without the throttle? Free system commit isn't logged here (#194 would log it).

Not tested: #634's driver blob cache (off); AMD; #533 / #267; free system commit during the stall.

AI use: Runs: OpenCode with GLM (Z.ai), model GLM-5.3. Drafts: Claude Code (Claude Opus 5.5); a human (Qinrxx) reviewed before posting.

**@⁠qinrxx** on GitHub · 2026-11-24 04:23 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7121972379) Third run on the RTX 5080 (same as the preload run above, with thread dumps every 3 s from 60 to 90 s and each wait line carrying the pipeline's key). It answers both open questions from the last comment. **Setup:** `main` `f4ce27c` plus local logging in `pso_async.rs`. Each wait of a title thread for a pipeline is logged with the pipeline's key (the one `used-pipelines.txt` stores) and whether that key was in the list the run started from (`used::known`, the check the preload uses). `XCL_PSO_PRELOAD=1`, `XCL_PSO_DISK_CACHE=0`, A every 4 s from 15 to 147 s, `XCL_THREAD_DUMP_AT=60,63,…,90`. The list had 156 keys at the start, from our three earlier runs. **Same end:** presents at 0 from 64 s, and the write at 90.4 s (`+0x23cf683`, `rcx=0x70024c348`, `r8=0x7074d8c40`). Commit 28.4 GB, local video memory 14.4 GB. **1. The preload list did not cover the stall's pipelines.** - **100 compute waits ended between 62 and 93 s,** on 99 distinct pipelines. Every one was `earlier-list no`, and 99 were built in the waiting thread. - **None of the run's 105 builds in a title thread was on a known key.** - **Waits on known keys:** the ones logged were all `already built` (32 compute, 30 graphics) or graphics built on a worker (2). All their keys came from the first run's list. Our logging records every wait that held a thread, but only the first 32 of each kind that were already built. - **The 99 stall keys are now in the list:** all 99 are among the 135 this run added (156 → 291), and none was among the first 156. So the preload did its part, with no pipeline it knew holding a thread. The stall was made entirely of pipelines no earlier run had used: each run ends at the stall, so it can only record what came before. **2. The counter wait and the compute binds overlap.** The 11 scheduled dumps landed at 60.1, 63.1, … 90.0 s, all inside the stall (2 presents in the window to 62 s, 0 from 64 s), plus XCL's dump at the crash. XCL frames are named from the build's PDB. - **60.1 s:** the submit thread was in the present path, waiting on a GPU fence for a title-texture upload (`present::watched_rt` → `title_textures::refresh` → `texture::upload_batch` → `fence::wait`). - **Every dump from 63.1 to 84.0 s (8 dumps):** - the submit thread was in the `Wait64BitValueX` wait loop (`list_x::wait64_x` ← `execute_with_waits` ← `q_execute_command_lists`); - at the same moment, 1–3 title threads were building compute pipelines in their own threads (`real::translated_compute_pso` → `dxc::compile`) and 1–2 were in `pso_async::resolve_wait`, mostly from `bind::execute_indirect`. - **The log over the same seconds:** 13 timeouts from 62.5 to 86.7 s on counters 16 bytes apart (0x70417ff68 … 0x70417fff8, then 0x70417fe58, 0x70417fe10, 0x70417fee8), all `>= 0x51b`, all holding 0. - **87.1 s to the crash:** the submit thread was back in the game's own code (`game+0x56a0d` ← `+0x4e7f358` …), and the compute binds went on. - **DXC in every dump from 63 to 91 s:** exactly one `xcl-dxc` worker inside `dxcompiler.dll`, and 1–4 asleep in `dxc::wait_for_memory`, the free-commit throttle. So through the whole stall, not only at the crash, DXC compiled one program at a time while title threads waited on it. **Side by side:** | | preload off | preload on (106 keys) | preload on (156 keys), this run | |---|---|---|---| | 0 presents from / the write | 64 s / 91.3 s | 64 s / 90.3 s | 64 s / 90.4 s | | compute waits ending 62–93 s (built in the waiting thread) | 61 (46) | 31 (31) | 100 (99) | | title-thread time held in the stall window | 140.9 s | 103.0 s | 82.1 s | | longest hold / longest driver build | 13.8 s / 6.0 s | 15.2 s / 9.2 s | 4.6 s / 4.6 s | | commit at the crash | 28.2 GB | 29.2 GB | 28.4 GB | | `Wait64BitValueX` timeouts | 0 | 15 (`>= 0x52c`) | 13 (`>= 0x51b`) | | pipelines built in the background | 96 | 1,288 | 1,428 | | keys in `used-pipelines.txt` | 51 → 106 | 106 → 156 | 156 → 291 | **What this suggests (observations, not a fix):** - **The preload removes the pipelines it knows from the stall.** But the title keeps binding compute pipelines made at start-up (1.8–5.2 s here) that no run has reached yet, and each run still dies at ~90 s. So the list grows by what one run reaches before the stall (55, 50, 135 keys), and the stall doesn't get shorter. - **The shape changed this run:** more pipelines, built one after another with shorter holds (longest 4.6 s against 13.8–15.2 s). The title-thread time held went down (82 s against 103–141 s), but there was no frame either way. - **The counter wait only shows up with the preload on.** In both such runs it overlaps the compute binds for most of the stall. Whether its writers are queued behind those binds can't be told from here. - **DXC working one compile at a time under the commit throttle** is now seen in 10 dumps across the stall, not only at the crash. **Open questions:** 1. Would a run that starts with these 291 keys get past ~90 s, or does the title bind another set nobody has reached? That's the next run. 2. Whose are the counters (16-byte slots, 0 → `>= 0x51b` / `0x52c`), and are their writers behind the compute binds? 3. How much shorter would the compiles a bind waits for be without the throttle? Free system commit isn't logged here (#194 would log it). **Not tested:** #634's driver blob cache (off); AMD; #533 / #267; free system commit during the stall. AI use: Runs: OpenCode with GLM (Z.ai), model GLM-5.3. Drafts: Claude Code (Claude Opus 5.5); a human (Qinrxx) reviewed before posting.
Author
Owner

@⁠qinrxx on GitHub · 2026-11-24 04:33 UTC · original

Fourth run on the RTX 5080, starting from the 291 keys the earlier runs recorded, the 99 stall keys of the run above among them. Same settings as above. The 99 no longer held anything, the stall was smaller, and the run still stopped at the same point, now on 40 pipelines no run had used before.

Same end: presents at 0 from 62 s, and the write at 90.4 s (+0x23cf683, rcx=0x70024c348, r8=0x7074d8c40). Commit 28.3 GB, local video memory 14.4 GB.

The keys:

  • The last run's 99 stall keys: none of them is in this run's logged waits. Every wait that holds a thread is logged, so none of the 99 held a thread. The preload had them.
  • This run's stall: 40 compute waits ended between 62 and 93 s, on 40 distinct pipelines made at 3.9–5.0 s. All 40 were earlier-list no and built in the waiting thread, and all 40 are among the 78 keys this run added (291 → 369).
  • Across the whole run: 41 compute waits held a thread, and none was on a key in the starting list.

So it's the same loop as before, but smaller. The list grew 51 → 106 → 156 → 291 → 369, and each run's stall was made only of pipelines no earlier run had reached.

The dumps (11 scheduled, 60.1–90.0 s, plus XCL's at the crash; XCL frames named from the build's PDB):

  • Compute binds through the whole stall: every dump has 1–3 title threads in pso_async::resolve_wait (mostly from bind::execute_indirect) or building a compute pipeline in their own thread (translated_compute_pso → dxc::compile).
  • DXC one compile at a time: in 10 of the 12 dumps, exactly one xcl-dxc worker was inside dxcompiler.dll. In 9 of those, 1–2 others were asleep in dxc::wait_for_memory, the free-commit throttle.
  • The counter wait was short this time: 3 timeouts, at 62.0, 64.0 and 66.0 s, on 0x70417fe58, 0x70417fe10 and 0x70417fee8, all >= 0x51f and all at 0. The submit thread was in that wait at 60.1 and 63.1 s and in title_textures::refresh at 66.1 s.
  • From 69.1 s to the crash, the submit thread was in the game's own code (+0x56a0d ← +0x4e7f358 ← +0x6259 ← +0x2481f73), the same place as at the end of the last run. No XCL frame held it, and there was still no frame.
  • At the crash: D3D Background Thread 0 was inside nvgpucomp64.dll; one title thread was in set_pipeline_state → resolve_for_bind → resolve_wait → translated_compute_pso → console_to_dxil_in, writing its DXIL to the disk cache; all 15 xcl-pso workers were idle.

Four runs side by side:

preload off preload on, 106 keys 156 keys 291 keys (this run)
0 presents from / the write 64 s / 91.3 s 64 s / 90.3 s 64 s / 90.4 s 62 s / 90.4 s
compute waits ending 62–93 s (built in the waiting thread) 61 (46) 31 (31) 100 (99) 40 (40)
stall waits on keys in the starting list — (not logged) 0 of 100 0 of 40
title-thread time held in the stall window 140.9 s 103.0 s 82.1 s 41.4 s
longest hold / longest driver build 13.8 s / 6.0 s 15.2 s / 9.2 s 4.6 s / 4.6 s 5.2 s / 2.9 s
commit at the crash 28.2 GB 29.2 GB 28.4 GB 28.3 GB
Wait64BitValueX timeouts 0 15 13 3
pipelines built in the background 96 1,288 1,428 1,514
keys in used-pipelines.txt 51 → 106 106 → 156 156 → 291 291 → 369

Observations:

  • The list helps, and the stall shrinks with it: title-thread time held 141 → 103 → 82 → 41 s, counter timeouts 15 → 13 → 3.
  • But the write came at ~90 s in all four runs, at the same registers, however much smaller the stall got.
  • In this run the title's submit thread spent the last 21 s in its own code, not in XCL, with compute binds still pending on other threads and DXC still one compile at a time. That's now a pattern in two runs, not a one-off: in the run above it ended in the same place from 87 s, here from 69 s.
  • The title made all these pipelines at start-up (1.8–5.2 s in every run) and binds them for the first time a minute later. A list of what earlier runs used can only catch up one stall at a time.

Open questions:

  1. What does the submit thread wait on in the game's code from 69 s? The other threads' recording, held in compute binds? The GPU? Something else? The game's frames don't say.
  2. Would building every compute pipeline the title makes at start-up (2,742 here), rather than only the ones a run used, remove the stall's compute waits? Our earlier measurement put that at ~1.1 GB of commit and well over half an hour of compiling at the rate we saw. So it would need to come from a filled driver cache or a much faster path, not from building at start-up on each run.
  3. How long would those compiles take without the commit throttle? Free system commit isn't logged here (#194).

Not tested: #634's driver blob cache (off); a run with the list at 369 keys; AMD; #533 / #267.

AI use: Runs: OpenCode with GLM (Z.ai), model GLM-5.3. Drafts: Claude Code (Claude Opus 5.5); a human (Qinrxx) reviewed before posting.

**@⁠qinrxx** on GitHub · 2026-11-24 04:33 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7122121232) Fourth run on the RTX 5080, starting from the 291 keys the earlier runs recorded, the 99 stall keys of the run above among them. Same settings as above. **The 99 no longer held anything, the stall was smaller, and the run still stopped at the same point, now on 40 pipelines no run had used before.** **Same end:** presents at 0 from 62 s, and the write at 90.4 s (`+0x23cf683`, `rcx=0x70024c348`, `r8=0x7074d8c40`). Commit 28.3 GB, local video memory 14.4 GB. **The keys:** - **The last run's 99 stall keys:** none of them is in this run's logged waits. Every wait that holds a thread is logged, so none of the 99 held a thread. The preload had them. - **This run's stall:** 40 compute waits ended between 62 and 93 s, on 40 distinct pipelines made at 3.9–5.0 s. All 40 were `earlier-list no` and built in the waiting thread, and all 40 are among the 78 keys this run added (291 → 369). - **Across the whole run:** 41 compute waits held a thread, and none was on a key in the starting list. So it's the same loop as before, but smaller. The list grew 51 → 106 → 156 → 291 → 369, and each run's stall was made only of pipelines no earlier run had reached. **The dumps** (11 scheduled, 60.1–90.0 s, plus XCL's at the crash; XCL frames named from the build's PDB): - **Compute binds through the whole stall:** every dump has 1–3 title threads in `pso_async::resolve_wait` (mostly from `bind::execute_indirect`) or building a compute pipeline in their own thread (`translated_compute_pso` → `dxc::compile`). - **DXC one compile at a time:** in 10 of the 12 dumps, exactly one `xcl-dxc` worker was inside `dxcompiler.dll`. In 9 of those, 1–2 others were asleep in `dxc::wait_for_memory`, the free-commit throttle. - **The counter wait was short this time:** 3 timeouts, at 62.0, 64.0 and 66.0 s, on 0x70417fe58, 0x70417fe10 and 0x70417fee8, all `>= 0x51f` and all at 0. The submit thread was in that wait at 60.1 and 63.1 s and in `title_textures::refresh` at 66.1 s. - **From 69.1 s to the crash, the submit thread was in the game's own code** (`+0x56a0d` ← `+0x4e7f358` ← `+0x6259` ← `+0x2481f73`), the same place as at the end of the last run. No XCL frame held it, and there was still no frame. - **At the crash:** D3D Background Thread 0 was inside `nvgpucomp64.dll`; one title thread was in `set_pipeline_state` → `resolve_for_bind` → `resolve_wait` → `translated_compute_pso` → `console_to_dxil_in`, writing its DXIL to the disk cache; all 15 `xcl-pso` workers were idle. **Four runs side by side:** | | preload off | preload on, 106 keys | 156 keys | 291 keys (this run) | |---|---|---|---|---| | 0 presents from / the write | 64 s / 91.3 s | 64 s / 90.3 s | 64 s / 90.4 s | 62 s / 90.4 s | | compute waits ending 62–93 s (built in the waiting thread) | 61 (46) | 31 (31) | 100 (99) | 40 (40) | | stall waits on keys in the starting list | — | (not logged) | 0 of 100 | 0 of 40 | | title-thread time held in the stall window | 140.9 s | 103.0 s | 82.1 s | 41.4 s | | longest hold / longest driver build | 13.8 s / 6.0 s | 15.2 s / 9.2 s | 4.6 s / 4.6 s | 5.2 s / 2.9 s | | commit at the crash | 28.2 GB | 29.2 GB | 28.4 GB | 28.3 GB | | `Wait64BitValueX` timeouts | 0 | 15 | 13 | 3 | | pipelines built in the background | 96 | 1,288 | 1,428 | 1,514 | | keys in `used-pipelines.txt` | 51 → 106 | 106 → 156 | 156 → 291 | 291 → 369 | **Observations:** - **The list helps, and the stall shrinks with it:** title-thread time held 141 → 103 → 82 → 41 s, counter timeouts 15 → 13 → 3. - **But the write came at ~90 s in all four runs,** at the same registers, however much smaller the stall got. - **In this run the title's submit thread spent the last 21 s in its own code, not in XCL,** with compute binds still pending on other threads and DXC still one compile at a time. That's now a pattern in two runs, not a one-off: in the run above it ended in the same place from 87 s, here from 69 s. - **The title made all these pipelines at start-up** (1.8–5.2 s in every run) and binds them for the first time a minute later. A list of what earlier runs used can only catch up one stall at a time. **Open questions:** 1. What does the submit thread wait on in the game's code from 69 s? The other threads' recording, held in compute binds? The GPU? Something else? The game's frames don't say. 2. Would building every compute pipeline the title makes at start-up (2,742 here), rather than only the ones a run used, remove the stall's compute waits? Our earlier measurement put that at ~1.1 GB of commit and well over half an hour of compiling at the rate we saw. So it would need to come from a filled driver cache or a much faster path, not from building at start-up on each run. 3. How long would those compiles take without the commit throttle? Free system commit isn't logged here (#194). **Not tested:** #634's driver blob cache (off); a run with the list at 369 keys; AMD; #533 / #267. AI use: Runs: OpenCode with GLM (Z.ai), model GLM-5.3. Drafts: Claude Code (Claude Opus 5.5); a human (Qinrxx) reviewed before posting.
Author
Owner

@⁠qinrxx on GitHub · 2026-11-24 04:38 UTC · original

Fifth run on the RTX 5080, starting from 369 keys, the 40 stall keys of the run above among them. Same settings. The number of compute waits fell again, but the time they held didn't, and the counter wait came back for the whole stall. We read this as a floor: growing the list further won't get past the stall, so we're stopping that and instrumenting the counter and commit side instead.

Same end: presents at 0 from 64 s, and the write at 92.4 s (+0x23cf683, rcx=0x70024c348, r8=0x7074d8c40). Commit 28.9 GB, local video memory 14.3 GB.

The stall:

  • Fewer waits, longer holds: 6 compute waits ended between 62 and 93 s, on 6 pipelines made at 3.9–4.2 s. All 6 were earlier-list no and built in the waiting thread, and all 6 are among the 24 keys this run added (369 → 393).
  • The run above's 40 stall keys are not in this run's logged waits, so none of them held a thread.
  • Held time didn't fall: 45.5 s of title-thread time in the stall window, against 41.4 s in the run above.
    • The longest hold was 17.2 s: one compute program of 755,560 B of DXIL, the largest we've seen, with an 11,062 ms driver build and ~6 s of translation and DXC before it.
    • Another hold was 8.8 s, ending at 90.7 s.
  • The counter wait came back: 15 timeouts from 63.7 to 91.8 s, every 2 s, on 16-byte slots 0x70417ff68 → 0x704180048. All >= 0x538, all holding 0.

The dumps (60.0–90.0 s every 3 s, plus XCL's at the crash; XCL frames named from the build's PDB):

  • The submit thread: in the game's own code at 60.0 s (the same place as at the end of the two runs above), then in the counter wait (list_x::wait64_x ← execute_with_waits ← q_execute_command_lists) in every dump from 63.1 s to the crash at 93.2 s.
  • Compute binds at the same moments: in every one of those dumps, 1–3 title threads were in pso_async::resolve_wait (from bind::execute_indirect) or building a compute pipeline in their own thread, some of them inside nvgpucomp64.dll. So the counter wait and the compute binds overlap for the whole stall.
  • DXC: in 9 of the 12 dumps (63–87 s) exactly one xcl-dxc worker was inside dxcompiler.dll; in 6 of those, 1–2 others were asleep in dxc::wait_for_memory. DXC was down to one compile at a time again.
  • At the crash: xcl-pso-0 and D3D Background Thread 0 were inside nvgpucomp64.dll.

Five runs:

51 (preload off) 106 156 291 369 (this run)
keys at the start 51 106 156 291 369
0 presents from / the write 64 s / 91.3 s 64 s / 90.3 s 64 s / 90.4 s 62 s / 90.4 s 64 s / 92.4 s
compute waits ending 62–93 s (built in the waiting thread) 61 (46) 31 (31) 100 (99) 40 (40) 6 (6)
title-thread time held in the stall window 140.9 s 103.0 s 82.1 s 41.4 s 45.5 s
longest hold / longest driver build 13.8 / 6.0 s 15.2 / 9.2 s 4.6 / 4.6 s 5.2 / 2.9 s 17.2 / 11.1 s
commit at the crash 28.2 GB 29.2 GB 28.4 GB 28.3 GB 28.9 GB
Wait64BitValueX timeouts 0 15 13 3 15
keys added by the run 55 50 135 78 24

How we read it:

  • The list keeps removing pipelines, and the number of compute waits falls with it (100 → 40 → 6).
  • The time they hold has stopped falling (41 → 46 s). What's left is a few very large programs, which a list can only cover after a run has reached them.
  • The submit thread didn't move into the game's code, as we'd expected if compute were the whole story. It waited on the counters for the whole stall.
  • So we're stopping the list experiment and instrumenting the two other things that run through every stall:
    • the counters: what records writes to the 0x70417fe00–0x704180050 slots, on which queue and list, and when that list is submitted relative to the wait;
    • free system commit, as #194's line logs it, during the stall. DXC's throttle sleeping in almost every dump means free commit was under ~7 GB at those moments. This machine has 31.6 GB of RAM and a system-managed page file (45.1 GB commit limit after the run). That is the same kind of pressure as tiagonleal's 40 GB against a 39 GB limit, but we haven't measured it.
  • pickles976's static read (the kill happens because the game's stall callback at exe+0x71b6348 is NULL) gives a third, cheap probe: XCL_WATCH=71b6348 logs every write to that pointer. That shows whether the game ever installs its handler under XCL.

Not tested: the counters' writers; free system commit; XCL_WATCH on exe+0x71b6348; #634's driver blob cache (off); AMD; #533 / #267.

AI use: Runs: OpenCode with GLM (Z.ai), model GLM-5.3. Drafts: Claude Code (Claude Opus 5.5); a human (Qinrxx) reviewed before posting.

**@⁠qinrxx** on GitHub · 2026-11-24 04:38 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7122205580) Fifth run on the RTX 5080, starting from 369 keys, the 40 stall keys of the run above among them. Same settings. **The number of compute waits fell again, but the time they held didn't, and the counter wait came back for the whole stall. We read this as a floor: growing the list further won't get past the stall, so we're stopping that and instrumenting the counter and commit side instead.** **Same end:** presents at 0 from 64 s, and the write at 92.4 s (`+0x23cf683`, `rcx=0x70024c348`, `r8=0x7074d8c40`). Commit 28.9 GB, local video memory 14.3 GB. **The stall:** - **Fewer waits, longer holds:** 6 compute waits ended between 62 and 93 s, on 6 pipelines made at 3.9–4.2 s. All 6 were `earlier-list no` and built in the waiting thread, and all 6 are among the 24 keys this run added (369 → 393). - **The run above's 40 stall keys** are not in this run's logged waits, so none of them held a thread. - **Held time didn't fall:** 45.5 s of title-thread time in the stall window, against 41.4 s in the run above. - The longest hold was 17.2 s: one compute program of 755,560 B of DXIL, the largest we've seen, with an 11,062 ms driver build and ~6 s of translation and DXC before it. - Another hold was 8.8 s, ending at 90.7 s. - **The counter wait came back:** 15 timeouts from 63.7 to 91.8 s, every 2 s, on 16-byte slots 0x70417ff68 → 0x704180048. All `>= 0x538`, all holding 0. **The dumps** (60.0–90.0 s every 3 s, plus XCL's at the crash; XCL frames named from the build's PDB): - **The submit thread:** in the game's own code at 60.0 s (the same place as at the end of the two runs above), then in the counter wait (`list_x::wait64_x` ← `execute_with_waits` ← `q_execute_command_lists`) in every dump from 63.1 s to the crash at 93.2 s. - **Compute binds at the same moments:** in every one of those dumps, 1–3 title threads were in `pso_async::resolve_wait` (from `bind::execute_indirect`) or building a compute pipeline in their own thread, some of them inside `nvgpucomp64.dll`. So the counter wait and the compute binds overlap for the whole stall. - **DXC:** in 9 of the 12 dumps (63–87 s) exactly one `xcl-dxc` worker was inside `dxcompiler.dll`; in 6 of those, 1–2 others were asleep in `dxc::wait_for_memory`. DXC was down to one compile at a time again. - **At the crash:** `xcl-pso-0` and D3D Background Thread 0 were inside `nvgpucomp64.dll`. **Five runs:** | | 51 (preload off) | 106 | 156 | 291 | 369 (this run) | |---|---|---|---|---|---| | keys at the start | 51 | 106 | 156 | 291 | 369 | | 0 presents from / the write | 64 s / 91.3 s | 64 s / 90.3 s | 64 s / 90.4 s | 62 s / 90.4 s | 64 s / 92.4 s | | compute waits ending 62–93 s (built in the waiting thread) | 61 (46) | 31 (31) | 100 (99) | 40 (40) | 6 (6) | | title-thread time held in the stall window | 140.9 s | 103.0 s | 82.1 s | 41.4 s | 45.5 s | | longest hold / longest driver build | 13.8 / 6.0 s | 15.2 / 9.2 s | 4.6 / 4.6 s | 5.2 / 2.9 s | 17.2 / 11.1 s | | commit at the crash | 28.2 GB | 29.2 GB | 28.4 GB | 28.3 GB | 28.9 GB | | `Wait64BitValueX` timeouts | 0 | 15 | 13 | 3 | 15 | | keys added by the run | 55 | 50 | 135 | 78 | 24 | **How we read it:** - **The list keeps removing pipelines,** and the number of compute waits falls with it (100 → 40 → 6). - **The time they hold has stopped falling** (41 → 46 s). What's left is a few very large programs, which a list can only cover after a run has reached them. - **The submit thread didn't move into the game's code, as we'd expected if compute were the whole story.** It waited on the counters for the whole stall. - **So we're stopping the list experiment** and instrumenting the two other things that run through every stall: - **the counters:** what records writes to the 0x70417fe00–0x704180050 slots, on which queue and list, and when that list is submitted relative to the wait; - **free system commit**, as #194's line logs it, during the stall. DXC's throttle sleeping in almost every dump means free commit was under ~7 GB at those moments. This machine has 31.6 GB of RAM and a system-managed page file (45.1 GB commit limit after the run). That is the same kind of pressure as tiagonleal's 40 GB against a 39 GB limit, but we haven't measured it. - **pickles976's static read** (the kill happens because the game's stall callback at `exe+0x71b6348` is NULL) gives a third, cheap probe: `XCL_WATCH=71b6348` logs every write to that pointer. That shows whether the game ever installs its handler under XCL. **Not tested:** the counters' writers; free system commit; `XCL_WATCH` on `exe+0x71b6348`; #634's driver blob cache (off); AMD; #533 / #267. AI use: Runs: OpenCode with GLM (Z.ai), model GLM-5.3. Drafts: Claude Code (Claude Opus 5.5); a human (Qinrxx) reviewed before posting.
Author
Owner

@⁠grahamster2 on GitHub · 2026-11-24 04:51 UTC · original

Two runs on the retail title with the Wait64 fence bridge from #539 plus a list split, and an A/B offer for @⁠qinrxx's 5080. These measurements cover only the submit-thread part of the stall (the CPU wait in execute_with_waits that qinrxx's thread dumps show from 63 to 84 s). They do not cover the compute PSO builds.

Branch: grahamster2/xcl split-waits-main, head ab8c9df. That is main 64b3f35 with three commits on top:

  • #539's two Wait64 commits by @⁠JGonzalezRodriguez: the per-address fence bridge, cycle detection and GPU-wait watchdog;
  • one commit that splits a title list at a Wait*BitValueX recorded after other commands, so each part waits where the title recorded the wait and its writes are signalled before the next part's waits. XCL_SPLIT_WAITS=0 turns the split off; the bridge stays on.

The runs below were made on the same three commits on main f4ce27c, before I rebased them onto 64b3f35.

Setup: RTX 3080 10 GB (driver 610.88), Ryzen 5 7600X, 32 GB RAM, commit limit 59 GB, Windows 11 26200. Release builds, XCL_NETWORK=0, A pressed at 14, 17, 21, 25 and 31 s, warm DXIL cache and #634's driver blob cache. Each run also had local logging, not in the branch, of every write, copy, fill, fence signal and submit touching an address a GPU wait was armed on, and of dxc::wait_for_memory holds.

1. World start with the split on (one run, XCL_COHERENT_MB=512 to fit in RAM)

  • At 142.7 s, four compute queues each submitted [part 0][part 1 waiting on a counter], for 18 counters 16 bytes apart, each wanted >= 0x45f. All of them were recorded by a direct list that had not been submitted yet, and memory held 0.
  • Every wait became a GPU queue.Wait. The submit thread did not wait on the CPU.
  • The direct list was submitted 0.8 s later, and its 18 fence signals were queued right behind it.
  • 0 Wait64BitValueX timed out, 0 watchdog releases, 0 waits skipped as a cycle.
  • The counters' only writer was that list's Write64BitValueBottomOfPipeX. No copy, fill or CPU write touched them.
  • On main the same pattern is the CPU wait in execute_with_waits before the producer is submitted.
  • Caveat: one run. It crashed 0.3 s later in xboxbvhbuilder.dll, which only happens with the 512 MB window (reported on #284). So there is no frame after the waits.

2. The stall with the full 4095 MB window (one run, same build)

  • Streaming started at about 58 s. 0 presents from 88 s, then the write at +0x23cf683 at 116.4 s.
  • No GPU wait was armed before the crash, so the world-start counters had not come up yet.
  • dxc::wait_for_memory never held a compile for 100 ms or more. With a 59 GB commit limit, free commit stayed above 6 GB plus 1 GB per compile.
  • What filled the stall were two driver builds of compute pipelines: 4,575 ms (311 KB DXIL, done at 106.1 s) and 4,998 ms (357 KB, done at 115.0 s).
  • In an earlier full-window run on the same commits, the world-start waits were armed, but they did not complete within the bridge's 1 s watchdog with their producers submitted (completed=0x0). Then came a read at -1 at 86 s, with 14 GB of video memory in use on the 10 GB card. Whether that queue was blocked or only slow could not be told on this card.

A/B on the 5080, if you have time (@⁠qinrxx): your card has 16 GB, so the direct queue should not be oversubscribed the way it is here.

  • Build: git fetch https://github.com/grahamster2/xcl split-waits-main && git checkout ab8c9df, then cargo build --release -p xcl.
  • Runs: your usual env, once with XCL_SPLIT_WAITS=1 (the default) and once with XCL_SPLIT_WAITS=0. Plain main 64b3f35 would be a third data point, since XCL_SPLIT_WAITS=0 still has the bridge.
  • What to look for in xcl.log:
    • Wait64BitValueX timed out: the submit thread waiting on the CPU. Expected 0 with the bridge.
    • bridged to GPU queue.Wait: waits moved to the GPU.
    • did not complete within 1000 ms ... released on CPU: the watchdog let a wait go, which means the producer never reached the GPU in time.
    • skipped to break cross-queue cycle: a wait dropped. Expected 0 with the split on.
    • whether the title presents after world start, and when (if at all) the write at +0x23cf683 comes.
  • In your 3 s thread dumps: whether the submit thread still sits in execute_with_waits / wait64_x.

Not tested: AMD, a card with more than 10 GB, plain main and XCL_SPLIT_WAITS=0 on the same runs (the menu path made those runs end in different places), and the full window reaching world start with the split on and no watchdog release.

Test report written with Claude Code (Claude Opus 5.5) from my own runs; the logging patch is local only.

**@⁠grahamster2** on GitHub · 2026-11-24 04:51 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7122408664) Two runs on the retail title with the Wait64 fence bridge from #539 plus a list split, and an A/B offer for @⁠qinrxx's 5080. These measurements cover only the submit-thread part of the stall (the CPU wait in `execute_with_waits` that qinrxx's thread dumps show from 63 to 84 s). They do not cover the compute PSO builds. **Branch:** `grahamster2/xcl` `split-waits-main`, head `ab8c9df`. That is `main` `64b3f35` with three commits on top: - #539's two Wait64 commits by @⁠JGonzalezRodriguez: the per-address fence bridge, cycle detection and GPU-wait watchdog; - one commit that splits a title list at a `Wait*BitValueX` recorded after other commands, so each part waits where the title recorded the wait and its writes are signalled before the next part's waits. `XCL_SPLIT_WAITS=0` turns the split off; the bridge stays on. The runs below were made on the same three commits on `main` `f4ce27c`, before I rebased them onto `64b3f35`. **Setup:** RTX 3080 10 GB (driver 610.88), Ryzen 5 7600X, 32 GB RAM, commit limit 59 GB, Windows 11 26200. Release builds, `XCL_NETWORK=0`, A pressed at 14, 17, 21, 25 and 31 s, warm DXIL cache and #634's driver blob cache. Each run also had local logging, not in the branch, of every write, copy, fill, fence signal and submit touching an address a GPU wait was armed on, and of `dxc::wait_for_memory` holds. **1. World start with the split on (one run, `XCL_COHERENT_MB=512` to fit in RAM)** - At 142.7 s, four compute queues each submitted [part 0][part 1 waiting on a counter], for 18 counters 16 bytes apart, each wanted `>= 0x45f`. All of them were recorded by a direct list that had not been submitted yet, and memory held 0. - Every wait became a GPU `queue.Wait`. The submit thread did not wait on the CPU. - The direct list was submitted 0.8 s later, and its 18 fence signals were queued right behind it. - 0 `Wait64BitValueX timed out`, 0 watchdog releases, 0 waits skipped as a cycle. - The counters' only writer was that list's `Write64BitValueBottomOfPipeX`. No copy, fill or CPU write touched them. - On `main` the same pattern is the CPU wait in `execute_with_waits` before the producer is submitted. - **Caveat:** one run. It crashed 0.3 s later in `xboxbvhbuilder.dll`, which only happens with the 512 MB window (reported on #284). So there is no frame after the waits. **2. The stall with the full 4095 MB window (one run, same build)** - Streaming started at about 58 s. 0 presents from 88 s, then the write at `+0x23cf683` at 116.4 s. - No GPU wait was armed before the crash, so the world-start counters had not come up yet. - `dxc::wait_for_memory` never held a compile for 100 ms or more. With a 59 GB commit limit, free commit stayed above 6 GB plus 1 GB per compile. - What filled the stall were two driver builds of compute pipelines: 4,575 ms (311 KB DXIL, done at 106.1 s) and 4,998 ms (357 KB, done at 115.0 s). - In an earlier full-window run on the same commits, the world-start waits were armed, but they did not complete within the bridge's 1 s watchdog with their producers submitted (`completed=0x0`). Then came a read at -1 at 86 s, with 14 GB of video memory in use on the 10 GB card. Whether that queue was blocked or only slow could not be told on this card. **A/B on the 5080, if you have time (@⁠qinrxx):** your card has 16 GB, so the direct queue should not be oversubscribed the way it is here. - **Build:** `git fetch https://github.com/grahamster2/xcl split-waits-main && git checkout ab8c9df`, then `cargo build --release -p xcl`. - **Runs:** your usual env, once with `XCL_SPLIT_WAITS=1` (the default) and once with `XCL_SPLIT_WAITS=0`. Plain `main` `64b3f35` would be a third data point, since `XCL_SPLIT_WAITS=0` still has the bridge. - **What to look for in `xcl.log`:** - `Wait64BitValueX timed out`: the submit thread waiting on the CPU. Expected 0 with the bridge. - `bridged to GPU queue.Wait`: waits moved to the GPU. - `did not complete within 1000 ms ... released on CPU`: the watchdog let a wait go, which means the producer never reached the GPU in time. - `skipped to break cross-queue cycle`: a wait dropped. Expected 0 with the split on. - whether the title presents after world start, and when (if at all) the write at `+0x23cf683` comes. - **In your 3 s thread dumps:** whether the submit thread still sits in `execute_with_waits` / `wait64_x`. **Not tested:** AMD, a card with more than 10 GB, plain `main` and `XCL_SPLIT_WAITS=0` on the same runs (the menu path made those runs end in different places), and the full window reaching world start with the split on and no watchdog release. _Test report written with Claude Code (Claude Opus 5.5) from my own runs; the logging patch is local only._
Author
Owner

@⁠jasonc123456 on GitHub · 2026-11-24 04:55 UTC · original

I reproduced the same loading crash four times on an RTX 5070. I captured memory measurements on runs 3 and 4.

Setup

  • CPU: Intel Core i7-14700K
  • RAM: 32 GB (31.75 GiB usable)
  • GPU: NVIDIA GeForce RTX 5070 (12 GB), driver 610.88
  • OS: Windows 11 build 26300.9974
  • XCL: 0.1.0 release build from main at 64b3f35, DXC 1.9.2602.17
  • Game: A Newer Retail Game, unpacked Xbox version 1.0.2.1

All four runs hit 0xC0000005 (write at address 0x0) at .exe+0x23cf683. The same stack offsets appeared each time: +0x4e4ba89, +0x2215c35, +0x71b9a20, and +0x2215eca.

Run Time to crash Presents BCPack requests refused
1 286.2 s 1,268 2,392
2 136.0 s 2,368 2,412
3 138.2 s 2,418 2,310
4 149.1 s 2,760 2,587

Memory observations

  • Run 3: Sampling started about 106 s into the run. Peak sampled XCL private commit was 29.0 GiB, peak system commit was 59.1 of 69.7 GiB, and available physical RAM dropped to 228 MiB. Peak sampled XCL dedicated VRAM was 7.6 GiB.
  • Run 4: A snapshot around the crash showed 28.5 GiB of XCL private commit, 56.0 of 69.7 GiB of system commit, 404 MiB of available physical RAM, and 7.8 GiB of XCL dedicated VRAM. The log also recorded a Wait64BitValueX timeout at 127.1 s, about 22 s before the crash.

Both monitored runs showed heavy physical RAM pressure. I haven't isolated what stalled loading.

**@⁠jasonc123456** on GitHub · 2026-11-24 04:55 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7122462258) I reproduced the same loading crash four times on an RTX 5070. I captured memory measurements on runs 3 and 4. **Setup** - CPU: Intel Core i7-14700K - RAM: 32 GB (31.75 GiB usable) - GPU: NVIDIA GeForce RTX 5070 (12 GB), driver 610.88 - OS: Windows 11 build 26300.9974 - XCL: 0.1.0 release build from main at `64b3f35`, DXC 1.9.2602.17 - Game: A Newer Retail Game, unpacked Xbox version 1.0.2.1 All four runs hit `0xC0000005` (write at address `0x0`) at `.exe+0x23cf683`. The same stack offsets appeared each time: `+0x4e4ba89`, `+0x2215c35`, `+0x71b9a20`, and `+0x2215eca`. | Run | Time to crash | Presents | BCPack requests refused | | --- | ---: | ---: | ---: | | 1 | 286.2 s | 1,268 | 2,392 | | 2 | 136.0 s | 2,368 | 2,412 | | 3 | 138.2 s | 2,418 | 2,310 | | 4 | 149.1 s | 2,760 | 2,587 | **Memory observations** - Run 3: Sampling started about 106 s into the run. Peak sampled XCL private commit was 29.0 GiB, peak system commit was 59.1 of 69.7 GiB, and available physical RAM dropped to 228 MiB. Peak sampled XCL dedicated VRAM was 7.6 GiB. - Run 4: A snapshot around the crash showed 28.5 GiB of XCL private commit, 56.0 of 69.7 GiB of system commit, 404 MiB of available physical RAM, and 7.8 GiB of XCL dedicated VRAM. The log also recorded a `Wait64BitValueX` timeout at 127.1 s, about 22 s before the crash. Both monitored runs showed heavy physical RAM pressure. I haven't isolated what stalled loading.
Author
Owner

@⁠Celegans12 on GitHub · 2026-11-24 05:32 UTC · original

I've been A/B-testing the open fixes for the world-loading watchdog (+0x23cf683) on an NVIDIA
laptop GPU, all on the retail title with the same save and the same scripted input, in case a
side-by-side helps decide between them.

Setup. RTX 3080 Laptop 16 GB (driver 32.0.16.2114, 32-lane waves), i9-11900H, 32 GB,
Windows 11 26300, DXC 1.9.2609, XCL_NETWORK=0, 10-minute scripts/smoke.ps1 runs,
XCL_PRESS_AT A every 5–10 s. Each PR was put on top of main 64b3f35 locally so the only
difference is the PR. "Cold" = first run of a freshly built binary, "warm" = the run after it.

Build Frames stop End of run Compute dispatches skipped
main 64b3f35 ~60 s +0x23cf683 write to 0 at 105.9 s 0
#754 on main, warm ~60 s +0x23cf683 at 108.9 s –
#533 on main, warm ~62 s +0x23cf683 at 107.9 s 128
theaustinayers modified-build (Build 11), warm presents drop to 0–4 per 2 s from ~60 s, recover to 17–24 at 88–94 s +0x5417661 read at 0x20, 104.5 s 976
same, cold similar +0x4eeaa29 read at 0x10, 105.8 s 925

Cold runs of #754 and #533 ended in a different crash (a read of 0xffffffffffffffff, at
+0x53664a8 and +0x4e32bc5), and both were followed by the title's crash reporter hanging in
MiniDumpWriteDump with every other thread suspended (one held the heap lock) – the hang #742
is about. Free physical RAM stayed above 7 GB in every run.

What the thread dumps showed.

  • main: two title threads parked in bind::set_pipeline_state → resolve_for_bind → resolve_wait
    (compute pipelines still building).
  • #754: the second copy is built on the render thread and skips BIG_COMPILES, but the blocking
    pipelines are the big ones (seconds each in the NVIDIA driver), so the thread compiles instead
    of waiting and still doesn't present. Separately, if let Some(job) = p.job.lock().unwrap().take()
    keeps the guard over the else branch in edition 2021; three render threads were waiting on it.
  • #533: no thread in resolve_wait any more, dispatches are skipped – but a title thread was held
    in list_x::PendingWait::wait_until_satisfied from q_execute_command_lists, i.e. a Wait64
    ahead of a submit. So skipping compute alone didn't keep frames going here.
  • Build 11 keeps a trickle of presents going through loading, which is enough to keep the
    watchdog quiet, and gets further: with a capture every 10th frame, the last frame before the
    crash is the illustrated story loading screen (~101 s). The crash then lands somewhere else
    each run – three runs, three null/garbage reads (+0x4eeaa29 at 0x10, +0x5417661 at 0x20,
    +0x4e720e0 at 0x800000003) – which looks like data the title expects is missing, plausibly
    from the ~900 skipped dispatches (not verified).

Happy to run any of these again with instrumentation, or other candidates, on this machine.

Notes
  • Rebasing #533 onto current main conflicts with #690's preload in pso_async.rs (mechanical);
    #533's own tests then need the new submit_lazy(.., key) argument.
  • With #754 on main: cargo test --workspace -- --test-threads=4 702 passed, 0 failed, 41 ignored,
    2 SKIPPED (no wave64).

Not tested: AMD, other NVIDIA drivers, #267 and #567, runs past 10 minutes.

AI use: Claude Code with Claude Opus 5.5 built and ran everything, read the dumps and drafted this;
I reviewed it before posting.

**@⁠Celegans12** on GitHub · 2026-11-24 05:32 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7123045389) I've been A/B-testing the open fixes for the world-loading watchdog (`+0x23cf683`) on an NVIDIA laptop GPU, all on the retail title with the same save and the same scripted input, in case a side-by-side helps decide between them. **Setup.** RTX 3080 Laptop 16 GB (driver 32.0.16.2114, 32-lane waves), i9-11900H, 32 GB, Windows 11 26300, DXC 1.9.2609, `XCL_NETWORK=0`, 10-minute `scripts/smoke.ps1` runs, `XCL_PRESS_AT` A every 5–10 s. Each PR was put on top of `main` `64b3f35` locally so the only difference is the PR. "Cold" = first run of a freshly built binary, "warm" = the run after it. | Build | Frames stop | End of run | Compute dispatches skipped | |---|---|---|---| | main `64b3f35` | ~60 s | `+0x23cf683` write to 0 at 105.9 s | 0 | | #754 on main, warm | ~60 s | `+0x23cf683` at 108.9 s | – | | #533 on main, warm | ~62 s | `+0x23cf683` at 107.9 s | 128 | | theaustinayers `modified-build` (Build 11), warm | presents drop to 0–4 per 2 s from ~60 s, recover to 17–24 at 88–94 s | `+0x5417661` read at `0x20`, 104.5 s | 976 | | same, cold | similar | `+0x4eeaa29` read at `0x10`, 105.8 s | 925 | Cold runs of #754 and #533 ended in a different crash (a read of `0xffffffffffffffff`, at `+0x53664a8` and `+0x4e32bc5`), and both were followed by the title's crash reporter hanging in `MiniDumpWriteDump` with every other thread suspended (one held the heap lock) – the hang #742 is about. Free physical RAM stayed above 7 GB in every run. **What the thread dumps showed.** - main: two title threads parked in `bind::set_pipeline_state → resolve_for_bind → resolve_wait` (compute pipelines still building). - #754: the second copy is built on the render thread and skips `BIG_COMPILES`, but the blocking pipelines are the big ones (seconds each in the NVIDIA driver), so the thread compiles instead of waiting and still doesn't present. Separately, `if let Some(job) = p.job.lock().unwrap().take()` keeps the guard over the `else` branch in edition 2021; three render threads were waiting on it. - #533: no thread in `resolve_wait` any more, dispatches are skipped – but a title thread was held in `list_x::PendingWait::wait_until_satisfied` from `q_execute_command_lists`, i.e. a Wait64 ahead of a submit. So skipping compute alone didn't keep frames going here. - Build 11 keeps a trickle of presents going through loading, which is enough to keep the watchdog quiet, and gets further: with a capture every 10th frame, the last frame before the crash is the illustrated story loading screen (~101 s). The crash then lands somewhere else each run – three runs, three null/garbage reads (`+0x4eeaa29` at `0x10`, `+0x5417661` at `0x20`, `+0x4e720e0` at `0x800000003`) – which looks like data the title expects is missing, plausibly from the ~900 skipped dispatches (not verified). Happy to run any of these again with instrumentation, or other candidates, on this machine. <details><summary>Notes</summary> - Rebasing #533 onto current main conflicts with #690's preload in `pso_async.rs` (mechanical); #533's own tests then need the new `submit_lazy(.., key)` argument. - With #754 on main: `cargo test --workspace -- --test-threads=4` 702 passed, 0 failed, 41 ignored, 2 SKIPPED (no wave64). </details> **Not tested:** AMD, other NVIDIA drivers, #267 and #567, runs past 10 minutes. AI use: Claude Code with Claude Opus 5.5 built and ran everything, read the dumps and drafted this; I reviewed it before posting.
Author
Owner

@⁠qinrxx on GitHub · 2026-11-24 05:37 UTC · original

@⁠grahamster2 thanks, here's the A/B on the 5080. In short: on this card the bridge takes the waits exactly as on your 3080. The submit thread never waits on the CPU, but the producers still aren't done within the watchdog's 1 s, and the title ends at the same write as plain main.

Setup: NVIDIA GeForce RTX 5080 16 GB, driver 32.0.16.2124; AMD Ryzen 7 9800X3D; 31.6 GB RAM, fixed 64 GB page file (commit limit 97.8 GB); Windows 11 Pro 26200. Your split-waits-main at ab8c9df, fetched and built clean, release, no local changes. XCL_NETWORK=0, XCL_ACTIVITY=1, #690's preload on, #634's driver blob cache off, A pressed by script, thread dumps every 3 s from 60 to 90 s, the full 4095 MB coherent window.

Run 1, XCL_SPLIT_WAITS=1 (split and bridge):

  • Splits: 1,024 by 40.6 s.
  • The waits: at 76.890–76.905 s, three Wait64BitValueX >= 0x535 on 0x704180158, 0x704180110 and 0x7041801e8 were bridged to GPU queue.Wait (queue type 2, producer type Some(0); wait-before-signal …).
  • The release: at 77.907 s, three did not complete within 1000 ms … released on CPU, for 0x7041801e8 and 0x704180110 (prod_ty=Some(0)) and 0x704180168 (prod_ty=Some(2)), each with recorded=0x535, submitted=0x535, completed=0x0.
  • Counts: 0 Wait64BitValueX timed out, 0 skipped to break cross-queue cycle.
  • Presents: 38 per 2 s at 60 s, falling from there, 0 from 70 s.
  • The end: the write at +0x23cf683 at 97.338 s (rcx=0x70024c348, r8=0x7074d8c40), the same signature as plain main, about 20 s after the release.
  • Compute driver builds in the same run: 26,953 ms (349,512 B DXIL, done at 33.2 s), 23,617 ms (390,288 B, 64.5 s) and 17,006 ms (368,856 B, 89.1 s).

Run 2, XCL_SPLIT_WAITS=0 (bridge only): it crashed at 7.8 s, inside nvwgf2umx.dll+0x85b227 (read at 0x3c), while CreatePlacedResourceX was aliasing render targets, at 55 presents per 2 s. It never got to the counters: 0 bridged, 0 timeouts. The rerun made it to 93.318 s with 0 bridged, 0 releases, 0 timeouts and the same +0x23cf683 write (GPU Loc Sig 7333478d), so run 2 above stays the driver-crash outlier; the comparison stands on run 1 vs that rerun. The rerun armed no counter waits at all, and it still stalled: presents at 0 from 66 s, while two compute driver builds ran, 35,709 ms (903,000 B DXIL, done at 62.0 s) and 26,738 ms (498,724 B, done at 90.2 s).

What we think is going on:

  • The producers were submitted: submitted=0x535, completed=0x0 means the producer's signal was queued, but its list hadn't executed within 1 s.
  • We've seen why that can happen, in a local test build of our own on f4ce27c. That build is logging plus a GPU wait for producers recorded but not yet submitted; it's not proposed as a PR.
    • A consumer was correctly put on a GPU wait for its producer, and submitted.
    • The next consumer waited on a counter written by that first consumer, which was now submitted but still held on the GPU. Neither "not yet submitted" nor anything else covered that case, so the submit thread held that list on the CPU.
    • The producers were in a 29-list batch that thread only submitted 7.8 s later. In the meantime the first gate's fallback released its consumer unready.
  • So the inversion goes one level deeper: a producer submitted but not executed, because something it depends on is itself waiting. The split doesn't change that, and on this card neither does the extra video memory.
  • On your run 1: the 512 MB coherent window explains why it had no frame after the waits, since that crash in xboxbvhbuilder.dll is the 512 MB-window one from #284. So neither run so far shows what happens after the producers land.

Three questions:

  1. On the 3080, after a watchdog release, do you see armed waits on those counters being satisfied only seconds later, or the producers' lists executing seconds after their signals were submitted? Your local logging of submits and fence signals would show it. That's what we'd expect if the producer is submitted but blocked behind another wait.
  2. Is an in-flight fence the right next step, rather than a longer watchdog? The idea: when a list that recorded counter writes is submitted, Signal(F, 1) on its own queue right after it, and keep its writes as "in flight" with F. Then any later wait on those counters, by a list that was itself already submitted, becomes a GPU wait for 1 on F. Entries are pruned once F reaches 1. A longer watchdog only moves the point where the consumer runs unready.
  3. A small thing in run 1: the waits were bridged on 0x704180158, 0x704180110 and 0x7041801e8, but the watchdog releases name 0x704180110, 0x704180168 (prod_ty=Some(2)) and 0x7041801e8. So the release list has 0x704180168 where the bridge list has 0x704180158. Is that a mapping you recognise from your split code, or should we look at it as a bug?

Not tested: plain main 64b3f35 on the same runs, AMD, and any build where the producers land before a release.

AI use: Runs: OpenCode with GLM (Z.ai), model GLM-5.3. Drafts: Claude Code (Claude Opus 5.5), which checked the figures against the runs' xcl.log; a human (Qinrxx) reviewed before posting.

**@⁠qinrxx** on GitHub · 2026-11-24 05:37 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7123124221) @⁠grahamster2 thanks, here's the A/B on the 5080. In short: on this card the bridge takes the waits exactly as on your 3080. The submit thread never waits on the CPU, but the producers still aren't done within the watchdog's 1 s, and the title ends at the same write as plain `main`. **Setup:** NVIDIA GeForce RTX 5080 16 GB, driver 32.0.16.2124; AMD Ryzen 7 9800X3D; 31.6 GB RAM, fixed 64 GB page file (commit limit 97.8 GB); Windows 11 Pro 26200. Your `split-waits-main` at `ab8c9df`, fetched and built clean, release, no local changes. `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, #690's preload on, #634's driver blob cache off, A pressed by script, thread dumps every 3 s from 60 to 90 s, the full 4095 MB coherent window. **Run 1, `XCL_SPLIT_WAITS=1` (split and bridge):** - **Splits:** 1,024 by 40.6 s. - **The waits:** at 76.890–76.905 s, three `Wait64BitValueX >= 0x535` on `0x704180158`, `0x704180110` and `0x7041801e8` were `bridged to GPU queue.Wait (queue type 2, producer type Some(0); wait-before-signal …)`. - **The release:** at 77.907 s, three `did not complete within 1000 ms … released on CPU`, for `0x7041801e8` and `0x704180110` (`prod_ty=Some(0)`) and `0x704180168` (`prod_ty=Some(2)`), each with `recorded=0x535, submitted=0x535, completed=0x0`. - **Counts:** 0 `Wait64BitValueX timed out`, 0 `skipped to break cross-queue cycle`. - **Presents:** 38 per 2 s at 60 s, falling from there, 0 from 70 s. - **The end:** the write at `+0x23cf683` at 97.338 s (`rcx=0x70024c348`, `r8=0x7074d8c40`), the same signature as plain `main`, about 20 s after the release. - **Compute driver builds in the same run:** 26,953 ms (349,512 B DXIL, done at 33.2 s), 23,617 ms (390,288 B, 64.5 s) and 17,006 ms (368,856 B, 89.1 s). **Run 2, `XCL_SPLIT_WAITS=0` (bridge only):** it crashed at 7.8 s, inside `nvwgf2umx.dll+0x85b227` (read at `0x3c`), while `CreatePlacedResourceX` was aliasing render targets, at 55 presents per 2 s. It never got to the counters: 0 bridged, 0 timeouts. The rerun made it to 93.318 s with 0 bridged, 0 releases, 0 timeouts and the same `+0x23cf683` write (GPU Loc Sig `7333478d`), so run 2 above stays the driver-crash outlier; the comparison stands on run 1 vs that rerun. The rerun armed no counter waits at all, and it still stalled: presents at 0 from 66 s, while two compute driver builds ran, 35,709 ms (903,000 B DXIL, done at 62.0 s) and 26,738 ms (498,724 B, done at 90.2 s). **What we think is going on:** - **The producers were submitted:** `submitted=0x535, completed=0x0` means the producer's signal was queued, but its list hadn't executed within 1 s. - **We've seen why that can happen**, in a local test build of our own on `f4ce27c`. That build is logging plus a GPU wait for producers recorded but not yet submitted; it's not proposed as a PR. - A consumer was correctly put on a GPU wait for its producer, and submitted. - The next consumer waited on a counter written by that first consumer, which was now submitted but still held on the GPU. Neither "not yet submitted" nor anything else covered that case, so the submit thread held that list on the CPU. - The producers were in a 29-list batch that thread only submitted 7.8 s later. In the meantime the first gate's fallback released its consumer unready. - **So the inversion goes one level deeper:** a producer submitted but not executed, because something it depends on is itself waiting. The split doesn't change that, and on this card neither does the extra video memory. - **On your run 1:** the 512 MB coherent window explains why it had no frame after the waits, since that crash in `xboxbvhbuilder.dll` is the 512 MB-window one from #284. So neither run so far shows what happens after the producers land. **Three questions:** 1. **On the 3080,** after a watchdog release, do you see armed waits on those counters being satisfied only seconds later, or the producers' lists executing seconds after their signals were submitted? Your local logging of submits and fence signals would show it. That's what we'd expect if the producer is submitted but blocked behind another wait. 2. **Is an in-flight fence the right next step, rather than a longer watchdog?** The idea: when a list that recorded counter writes is submitted, `Signal(F, 1)` on its own queue right after it, and keep its writes as "in flight" with F. Then any later wait on those counters, by a list that was itself already submitted, becomes a GPU wait for 1 on F. Entries are pruned once F reaches 1. A longer watchdog only moves the point where the consumer runs unready. 3. **A small thing in run 1:** the waits were bridged on `0x704180158`, `0x704180110` and `0x7041801e8`, but the watchdog releases name `0x704180110`, `0x704180168` (`prod_ty=Some(2)`) and `0x7041801e8`. So the release list has `0x704180168` where the bridge list has `0x704180158`. Is that a mapping you recognise from your split code, or should we look at it as a bug? **Not tested:** plain `main` `64b3f35` on the same runs, AMD, and any build where the producers land before a release. AI use: Runs: OpenCode with GLM (Z.ai), model GLM-5.3. Drafts: Claude Code (Claude Opus 5.5), which checked the figures against the runs' `xcl.log`; a human (Qinrxx) reviewed before posting.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 05:38 UTC · original

Static decode of the new sites from the A/B table, since they're the wall that's now live (retail exe, SHA-256 e95020b2…08993, disassembly at the reported offsets):

  • +0x5417661 (Build 11 warm, "read at 0x20") — a binary-search comparator that doesn't filter unfilled index slots: r11 = [rdx + idx*4] (a u32 offset); cmovne keeps 0 when the stored offset is zero, and the very next instruction reads [r11 + 0x20] — so an index entry of literally 0 (a slot counted but never written) faults at 0x20. Meaning: whatever populates that table publishes its count before its entries (or keeps an unfilled tail). Not random — a count/write mismatch.
  • +0x4eeaa29 (Build 11 cold, "read at 0x10") — mov rax,[rcx]; mov rax,[rax+0x10]: first field of an object is zero, then +0x10 — a zero object, the same family as #595's null-vptr chain (factory returned success, object all-zero).
  • +0x53664a8 and +0x4e32bc5 (both cold runs, "read at 0xffffffffffffffff") — the same signature in two tables: a walk mov rax,[r8+rdx*8]; test rax,rax; je skip; cmp [rax],… filters null only, and a -1 sentinel in a next-pointer/table base sails straight through the filter; the second is [rdx + (id & 0xFFFFFF)*4 + 3] with base -1 — a 24-bit-indexed handle table whose base register is INVALID-style -1.

So both cold crashes and the warm one converge on: failure paths writing sentinels (-1 / 0) into tables the title later consumes as pointers — on creation paths only, which is exactly why warm runs (caches full, creation skipped) never hit them and cold runs do. For whoever hunts it next: the xcl-side suspects are the shims whose error paths return/write -1 or leave a memset -1 in a handle/object slot where the title's consumers only test for null; a debug assert on "value written into these tables ∈ {valid, 0}" will name the writer fast.

One caution for the comparison's conclusion: the trickling-presents build isn't a fix, it's the watchdog's own design point — frames are advancing, so the title rightly doesn't kill itself and instead proceeds to consume the half-built state (hence its crashes are the four above). It's the best instrument in this thread (it gets runs 40 s deeper into the failure), not the fix. And the cold-run MiniDumpWriteDump pile-up is #742's known shape — suspending-everyone while a thread holds the heap; worth cross-linking there.

**@⁠pickles976** on GitHub · 2026-11-24 05:38 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7123142830) Static decode of the *new* sites from the A/B table, since they're the wall that's now live (retail exe, SHA-256 `e95020b2…08993`, disassembly at the reported offsets): - **`+0x5417661` (Build 11 warm, "read at 0x20")** — a **binary-search comparator that doesn't filter unfilled index slots**: `r11 = [rdx + idx*4]` (a u32 offset); `cmovne` keeps `0` when the stored offset is zero, and the very next instruction reads `[r11 + 0x20]` — so an index entry of literally `0` (a slot counted but never written) faults at `0x20`. Meaning: whatever populates that table publishes its **count before its entries** (or keeps an unfilled tail). Not random — a count/write mismatch. - **`+0x4eeaa29` (Build 11 cold, "read at 0x10")** — `mov rax,[rcx]; mov rax,[rax+0x10]`: first field of an object is zero, then `+0x10` — a **zero object**, the same family as #595's null-vptr chain (factory returned success, object all-zero). - **`+0x53664a8` and `+0x4e32bc5` (both cold runs, "read at 0xffffffffffffffff")** — the same signature in two tables: a walk `mov rax,[r8+rdx*8]; test rax,rax; je skip; cmp [rax],…` filters **null only**, and a **`-1` sentinel** in a next-pointer/table base sails straight through the filter; the second is `[rdx + (id & 0xFFFFFF)*4 + 3]` with base `-1` — a 24-bit-indexed handle table whose base register is `INVALID`-style `-1`. So both cold crashes and the warm one converge on: **failure paths writing sentinels (`-1` / `0`) into tables the title later consumes as pointers — on creation paths only**, which is exactly why warm runs (caches full, creation skipped) never hit them and cold runs do. For whoever hunts it next: the xcl-side suspects are the shims whose error paths return/write `-1` or leave a memset `-1` in a handle/object slot where the title's consumers only test for null; a debug assert on "value written into these tables ∈ {valid, 0}" will name the writer fast. One caution for the comparison's conclusion: the trickling-presents build isn't a fix, it's the watchdog's own design point — frames *are* advancing, so the title rightly doesn't kill itself and instead proceeds to consume the half-built state (hence its crashes are the four above). It's the best **instrument** in this thread (it gets runs 40 s deeper into the failure), not the fix. And the cold-run `MiniDumpWriteDump` pile-up is #742's known shape — suspending-everyone while a thread holds the heap; worth cross-linking there.
Author
Owner

@⁠qinrxx on GitHub · 2026-11-24 05:47 UTC · original

Cross-link to #505: three of us have landed on the same mechanism independently.

  • @⁠vibryxcx (#505, RX 6800, RDNA2) traced the consumer's counter to a list on another queue, submitted after the waiting lists from the same thread, so XCL's CPU wait before submitting blocks the writer's own submission (2 s per wait). It's the same inversion our local bridge build showed on the RTX 5080 here.
  • @⁠grahamster2's split in this thread covers it from the submit side, and @⁠tadymila's wait_for_commit / page-file finding (#505) covers the memory side.
  • One caution from #505: vibryxcx's local GPU-side wait (XCL_GPU_WAITS=1) resolved those waits on RDNA2 (0 timeouts, fences signalled 20–40 ms after their writers were submitted), and the heartbeat abort still came at the same time. Our rerun on @⁠grahamster2's branch here stalled with no counter wait armed at all, while two 26–36 s compute driver builds ran. So fixing the wait inversion is a correctness fix; on its own it doesn't keep the title alive.

If anyone iterates on a fix: #505 has the AMD data, and this thread the NVIDIA dumps. The fault signature (+0x23cf683, rcx=0x70024c348) is the same in both.

AI use: Drafts: Claude Code (Claude Opus 5.5), checked against the linked comments; a human (Qinrxx) reviewed before posting.

**@⁠qinrxx** on GitHub · 2026-11-24 05:47 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7123279983) Cross-link to #505: three of us have landed on the same mechanism independently. - **@⁠vibryxcx** (#505, RX 6800, RDNA2) traced the consumer's counter to a list on another queue, submitted after the waiting lists from the same thread, so XCL's CPU wait before submitting blocks the writer's own submission (2 s per wait). It's the same inversion our local bridge build showed on the RTX 5080 here. - **@⁠grahamster2's split** in this thread covers it from the submit side, and **@⁠tadymila's** `wait_for_commit` / page-file finding (#505) covers the memory side. - **One caution from #505:** vibryxcx's local GPU-side wait (`XCL_GPU_WAITS=1`) resolved those waits on RDNA2 (0 timeouts, fences signalled 20–40 ms after their writers were submitted), and the heartbeat abort still came at the same time. Our rerun on @⁠grahamster2's branch here stalled with no counter wait armed at all, while two 26–36 s compute driver builds ran. So fixing the wait inversion is a correctness fix; on its own it doesn't keep the title alive. If anyone iterates on a fix: #505 has the AMD data, and this thread the NVIDIA dumps. The fault signature (`+0x23cf683`, `rcx=0x70024c348`) is the same in both. AI use: Drafts: Claude Code (Claude Opus 5.5), checked against the linked comments; a human (Qinrxx) reviewed before posting.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 05:58 UTC · original

Follow-up on the sentinel map — full disassembly sweep of .text (all 12 M instrs) for callers/references, and the owner of the +0x5417661 table is now narrowed:

  • Bin-search +0x5416d60: exactly one caller, +0x8ffe40, whose shape is: lookup id → store three per-feature booleans into the caller's device struct ([rsi+0x15b], [rsi+0x15c], [rsi+0x15d] += …) around capability helper calls. That's a device feature-support query — the title asks per feature ID, the bin-searched index answers. Reading 0x20 on a zero slot therefore means: the feature-count/length the title was given exceeds the entries actually filled — audit whatever xcl response supplies the feature list (count from one place, entries written later/elsewhere). (Function naming is shape-based inference, the single-caller + bool-store is disassembly fact.)
  • Sentinel-walk +0x5366470: 12+ callers spread across .text (0x7b506 … 0x1c11321) — a generic resolve-id-in-list helper, so its -1 failures will show up as crashes in many victim subsystems. That's consistent with the cold-run crash appearing at different call paths; fix it once at the writer, not per-victim.
  • Handle-lookup +0x4e32ac0: 2 callers, both inside one adjacent function (+0x4e32998, +0x4e329c4) — a localized subsystem; its table base being -1 points at a single init/alloc path that stores INVALID where the sibling expects a base.

Practical: the two easy wins are (1) the feature-query count-vs-entries mismatch (crash + wrong capability flags from the same table), (2) the localized base--1 writer behind +0x4e32ac0. The generic walk is a tripwire, not the bug.

**@⁠pickles976** on GitHub · 2026-11-24 05:58 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7123454538) Follow-up on the sentinel map — full disassembly sweep of `.text` (all 12 M instrs) for callers/references, and the owner of the `+0x5417661` table is now narrowed: - **Bin-search `+0x5416d60`: exactly one caller**, `+0x8ffe40`, whose shape is: lookup id → **store three per-feature booleans** into the caller's device struct (`[rsi+0x15b]`, `[rsi+0x15c]`, `[rsi+0x15d] += …`) around capability helper calls. That's a **device feature-support query** — the title asks per feature ID, the bin-searched index answers. Reading `0x20` on a zero slot therefore means: the feature-count/length the title was given **exceeds the entries actually filled** — audit whatever xcl response supplies the feature list (count from one place, entries written later/elsewhere). *(Function naming is shape-based inference, the single-caller + bool-store is disassembly fact.)* - **Sentinel-walk `+0x5366470`: 12+ callers** spread across `.text` (`0x7b506` … `0x1c11321`) — a generic resolve-id-in-list helper, so its `-1` failures will show up as crashes in many *victim* subsystems. That's consistent with the cold-run crash appearing at different call paths; fix it once at the writer, not per-victim. - **Handle-lookup `+0x4e32ac0`: 2 callers**, both inside one adjacent function (`+0x4e32998`, `+0x4e329c4`) — a localized subsystem; its table base being `-1` points at a single init/alloc path that stores `INVALID` where the sibling expects a base. Practical: the two easy wins are (1) the feature-query count-vs-entries mismatch (crash + wrong capability flags from the same table), (2) the localized base-`-1` writer behind `+0x4e32ac0`. The generic walk is a tripwire, not the bug.
Author
Owner

@⁠Celegans12 on GitHub · 2026-11-24 06:12 UTC · original

@⁠pickles976 – on the zero slots behind +0x5417661: on my runs that table wasn't fed by an XCL API
response, it was data that never arrived.

Logging every failed DirectStorage request (main only logs the first per queue), world loading had
about 2,000 zlib reads into physical pages (options 0x200001) failing with 0x89240009, all in one
burst, every one with an all-zero destination page array – the title hadn't filled them yet when a
half-full queue submitted itself. Their destinations stay zero. The table in that crash sat at a
page-aligned title address (0x727fbc000, base 0x700000000), which fits loaded data.

What I can show is the correlation, not the exact read: once those failures stop – a local
"submit only when full" switch, and then #549 – the garbage-read family (+0x5417661,
+0x4eeaa29, +0x4e720e0, +0x4e59848) is gone and the run ends at the watchdog instead.
With #549 + #208/#273 (BC1) on main beaa245 (which has #795/#797) plus #533, failed reads are
down to 314 BC5/BC6H/BC7 refusals and the title still hits +0x23cf683 at 119.9 s after a 30 s
present stall – the same floor @⁠qinrxx describes, so the data side and the compute-build side look
like separate walls.

I didn't manage to match 0x727fbc000 itself against a failed destination (that run ended in a device
hang instead), so treat the link as likely rather than proven.

AI use: Claude Code with Claude Opus 5.5 ran the builds and runs and drafted this; I reviewed it
before posting.

**@⁠Celegans12** on GitHub · 2026-11-24 06:12 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7123701111) @⁠pickles976 – on the zero slots behind `+0x5417661`: on my runs that table wasn't fed by an XCL API response, it was data that never arrived. Logging every failed DirectStorage request (main only logs the first per queue), world loading had about 2,000 zlib reads into physical pages (options `0x200001`) failing with `0x89240009`, all in one burst, every one with an all-zero destination page array – the title hadn't filled them yet when a half-full queue submitted itself. Their destinations stay zero. The table in that crash sat at a page-aligned title address (`0x727fbc000`, base `0x700000000`), which fits loaded data. What I can show is the correlation, not the exact read: once those failures stop – a local "submit only when full" switch, and then #549 – the garbage-read family (`+0x5417661`, `+0x4eeaa29`, `+0x4e720e0`, `+0x4e59848`) is gone and the run ends at the watchdog instead. With #549 + #208/#273 (BC1) on `main` `beaa245` (which has #795/#797) plus #533, failed reads are down to 314 BC5/BC6H/BC7 refusals and the title still hits `+0x23cf683` at 119.9 s after a 30 s present stall – the same floor @⁠qinrxx describes, so the data side and the compute-build side look like separate walls. I didn't manage to match `0x727fbc000` itself against a failed destination (that run ended in a device hang instead), so treat the link as likely rather than proven. AI use: Claude Code with Claude Opus 5.5 ran the builds and runs and drafted this; I reviewed it before posting.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 06:20 UTC · original

@⁠Celegans12 — accepted on the causality, and your failure code just gave it a mechanism. Two pieces that fit:

  1. 0x89240009 is xcl's own E_ACCESS_VIOLATION in the DSTORAGE namespace (crates/xcl/src/hle/dstorage.rs:58). The refusals aren't a host-OS error — the request executor rejects writes whose destination page array doesn't resolve.
  2. The snapshot timing is visible in the source: dstorage.rs:697 — snapshot_page_array runs "at enqueue time", with the comment justifying it as "callers often stack-allocate it." So the exact window you measured — request enqueued, page array filled later by the title's bring-up, then SubmitQueue — is where xcl and hardware diverge: a real DirectStorage stack consumes the request (and reads the page array) at submit, with the array required valid until completion; xcl reads it at enqueue and freezes it as all-zero → zero pages → E_ACCESS_VIOLATION → destination stays zero → the garbage-read family you killed with the full-queue switch.

The experiment that proves it (and would be the fix): move the snapshot_page_array call from the enqueue path to the queue-submit path — snapshot everything once at SubmitQueue, where a hardware stack would first touch it. Your "submit only when full" switch appearing to fix it doesn't discriminate between the two models (both see a filled array then), but submit-time snapshotting fixes it without requiring the title to batch differently — which matters because the title demonstrably does late-fill.

And your structural conclusion stands independently: data-side wall (this, #549) vs compute-build floor (qinrxx) are separate walls with the same watchdog at the end. That's also the cleanest argument for the fix: with the data wall down, every remaining stall is a pipeline-compile floor, measurable in one knob.

**@⁠pickles976** on GitHub · 2026-11-24 06:20 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7123840356) @⁠Celegans12 — accepted on the causality, and your failure code just gave it a mechanism. Two pieces that fit: 1. **`0x89240009` is xcl's own `E_ACCESS_VIOLATION`** in the DSTORAGE namespace (`crates/xcl/src/hle/dstorage.rs:58`). The refusals aren't a host-OS error — the request executor rejects writes whose destination page array doesn't resolve. 2. **The snapshot timing is visible in the source**: `dstorage.rs:697` — `snapshot_page_array` runs **"at enqueue time"**, with the comment justifying it as "callers often stack-allocate it." So the exact window you measured — request enqueued, page array filled later by the title's bring-up, then `SubmitQueue` — is where xcl and hardware diverge: a real DirectStorage stack consumes the request (and reads the page array) at **submit**, with the array required valid until completion; xcl reads it at enqueue and freezes it as all-zero → zero pages → `E_ACCESS_VIOLATION` → destination stays zero → the garbage-read family you killed with the full-queue switch. **The experiment that proves it** (and would be the fix): move the `snapshot_page_array` call from the enqueue path to the queue-submit path — snapshot everything once at `SubmitQueue`, where a hardware stack would first touch it. Your "submit only when full" switch *appearing* to fix it doesn't discriminate between the two models (both see a filled array then), but submit-time snapshotting fixes it **without requiring the title to batch differently** — which matters because the title demonstrably does late-fill. And your structural conclusion stands independently: data-side wall (this, #549) vs compute-build floor (qinrxx) are separate walls with the same watchdog at the end. That's also the cleanest argument for the fix: with the data wall down, every remaining stall is a pipeline-compile floor, measurable in one knob.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 06:22 UTC · original

Precision edit to my reply above, found while checking the lane: #549 is already the open PR for this ("a late page array holds a half-full queue until Submit") — my suggested direction is the PR as-filed, not a fresh idea. The useful residue of this exchange for whoever reviews #549: @⁠Celegans12 has the runtime evidence (2,000× 0x89240009 = xcl E_ACCESS_VIOLATION in one burst, destinations all-zero, garbage-read family dies when gated), and crates/xcl/src/hle/dstorage.rs:697 has the source evidence (enqueue-time snapshot, justified "callers often stack-allocate" — so the snapshot must stay a snapshot, just moved to submit time, keeping the stack-array safety the comment protects). Reviewers get both halves in one thread.

**@⁠pickles976** on GitHub · 2026-11-24 06:22 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7123864659) Precision edit to my reply above, found while checking the lane: **#549** is already the open PR for this ("a late page array holds a half-full queue until Submit") — my suggested direction is the PR as-filed, not a fresh idea. The useful residue of this exchange for whoever reviews #549: @⁠Celegans12 has the *runtime* evidence (2,000× `0x89240009` = xcl `E_ACCESS_VIOLATION` in one burst, destinations all-zero, garbage-read family dies when gated), and `crates/xcl/src/hle/dstorage.rs:697` has the *source* evidence (enqueue-time snapshot, justified "callers often stack-allocate" — so the snapshot must stay a snapshot, just moved to submit time, keeping the stack-array safety the comment protects). Reviewers get both halves in one thread.
Author
Owner

@⁠jasonc123456 on GitHub · 2026-11-24 06:22 UTC · original

Follow-up on the RTX 5070: I pulled and rebuilt XCL main at beaa245 (merge of #797) and reran the same title.

The same 0xC0000005 write to 0x0 at .exe+0x23cf683 reproduced after 172.4 s and 2,681 presents, with the same call stack.

The previous build logged three Wait64BitValueX timeout warnings before crashing. This run logged zero. It did record 2,609 BCPack request refusals and two compute pipeline builds that took 42.6 s and 54.0 s. No GPU device removal was logged.

**@⁠jasonc123456** on GitHub · 2026-11-24 06:22 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7123868267) Follow-up on the RTX 5070: I pulled and rebuilt XCL main at beaa245 (merge of #797) and reran the same title. The same 0xC0000005 write to 0x0 at .exe+0x23cf683 reproduced after 172.4 s and 2,681 presents, with the same call stack. The previous build logged three Wait64BitValueX timeout warnings before crashing. This run logged zero. It did record 2,609 BCPack request refusals and two compute pipeline builds that took 42.6 s and 54.0 s. No GPU device removal was logged.
Author
Owner

@⁠Celegans12 on GitHub · 2026-11-24 07:12 UTC · original

A follow-up to my A/B above, from overnight runs on the same RTX 3080 Laptop (16 GB), same title, save
and scripted input. Two things that may save someone a detour.

1. theaustinayers' Build 11 keeps frames going partly by dropping Wait64 waits, and that drop comes
right before its post-loading crashes.
Its acfe916 has a stopgap in list_x.rs: a Wait64 whose
write is in a list not submitted yet isn't waited for (continue), so the work after it runs before
the value exists. The fork logs those drops ("N waits so far for a value whose write is in a list not
submitted yet"). With #549 on top (so the page-array reads stop failing) and XCL_BIG_COMPILES 2–8,
every run reached the illustrated story loading screen, and in all five the first dropped wait came
0.5–2 s before the crash:

Fork + #549, big compiles First dropped wait Crash
2 109.2 s +0x4f88518 (read through -1), 111.0 s
4 111.1 s assert +0x2474606 + device hung, 112.8 s
4, warm driver blobs 108.2 s +0x4f3759c, 108.8 s
4, warm again 114.9 s +0x266dec (read of -1), 115.6 s
8 109.6 s (256 by the end) watchdog +0x23cf683, 206.0 s (min free RAM 0.6 GB)

Filling refused BC5/BC6H/BC7 destinations (XCL_DSTORAGE_BCPACK_FILL=1) didn't change it, and with
warm driver blobs only 64 dispatches were skipped – so skipped dispatches and missing textures don't
look like the cause; the dropped waits do. More parallel big compiles help (2 → 4: 303 → 85 skipped),
but 8 runs this 32 GB machine out of memory.

2. The same idea with upstream's proper Wait64 handling still stalls. main beaa245 (with
#795/#797) + #549 + #208/#273 + #533 (rebased) + #820 at XCL_BIG_COMPILES=4: no garbage reads (312
BCPack 5/6/7 refusals left), but a 30 s present stall and the watchdog at 107.9 s. During the stall,
five title threads waited in #533's resolve_compute (its default budget is 4,000 ms per frame). With
XCL_COMPUTE_PSO_WAIT_MS=100 it still stalled 28 s (watchdog at 115.9 s); only 3 Wait64 waits were
bridged and none released on the CPU, and from ~90 s the title submitted nothing at all. That fits
@⁠qinrxx's floor: the bind waits aren't the whole stall.

So, on this machine: the fork's frame flow seems to come from not honouring those waits, and honouring
them (upstream) brings the stall back. Whatever is holding the producers is the piece still missing.

Not tested: AMD; runs past 5 minutes; #533 with other budgets than 4,000/100 ms; the fork's short
pipeline waits ported onto beaa245 (they conflict in pso_async.rs/real.rs).

AI use: Claude Code with Claude Opus 5.5 built and ran everything, read the logs and thread dumps and
drafted this; I reviewed it before posting.

**@⁠Celegans12** on GitHub · 2026-11-24 07:12 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7124732081) A follow-up to my A/B above, from overnight runs on the same RTX 3080 Laptop (16 GB), same title, save and scripted input. Two things that may save someone a detour. **1. theaustinayers' Build 11 keeps frames going partly by dropping Wait64 waits, and that drop comes right before its post-loading crashes.** Its `acfe916` has a stopgap in `list_x.rs`: a Wait64 whose write is in a list not submitted yet isn't waited for (`continue`), so the work after it runs before the value exists. The fork logs those drops ("N waits so far for a value whose write is in a list not submitted yet"). With #549 on top (so the page-array reads stop failing) and `XCL_BIG_COMPILES` 2–8, every run reached the illustrated story loading screen, and in all five the first dropped wait came 0.5–2 s before the crash: | Fork + #549, big compiles | First dropped wait | Crash | |---|---|---| | 2 | 109.2 s | `+0x4f88518` (read through -1), 111.0 s | | 4 | 111.1 s | assert `+0x2474606` + device hung, 112.8 s | | 4, warm driver blobs | 108.2 s | `+0x4f3759c`, 108.8 s | | 4, warm again | 114.9 s | `+0x266dec` (read of -1), 115.6 s | | 8 | 109.6 s (256 by the end) | watchdog `+0x23cf683`, 206.0 s (min free RAM 0.6 GB) | Filling refused BC5/BC6H/BC7 destinations (`XCL_DSTORAGE_BCPACK_FILL=1`) didn't change it, and with warm driver blobs only 64 dispatches were skipped – so skipped dispatches and missing textures don't look like the cause; the dropped waits do. More parallel big compiles help (2 → 4: 303 → 85 skipped), but 8 runs this 32 GB machine out of memory. **2. The same idea with upstream's proper Wait64 handling still stalls.** `main` `beaa245` (with #795/#797) + #549 + #208/#273 + #533 (rebased) + #820 at `XCL_BIG_COMPILES=4`: no garbage reads (312 BCPack 5/6/7 refusals left), but a 30 s present stall and the watchdog at 107.9 s. During the stall, five title threads waited in #533's `resolve_compute` (its default budget is 4,000 ms per frame). With `XCL_COMPUTE_PSO_WAIT_MS=100` it still stalled 28 s (watchdog at 115.9 s); only 3 Wait64 waits were bridged and none released on the CPU, and from ~90 s the title submitted nothing at all. That fits @⁠qinrxx's floor: the bind waits aren't the whole stall. So, on this machine: the fork's frame flow seems to come from not honouring those waits, and honouring them (upstream) brings the stall back. Whatever is holding the producers is the piece still missing. **Not tested:** AMD; runs past 5 minutes; #533 with other budgets than 4,000/100 ms; the fork's short pipeline waits ported onto `beaa245` (they conflict in `pso_async.rs`/`real.rs`). AI use: Claude Code with Claude Opus 5.5 built and ran everything, read the logs and thread dumps and drafted this; I reviewed it before posting.
Author
Owner

@⁠Celegans12 on GitHub · 2026-11-24 07:30 UTC · original

@⁠pickles976 thanks, that matches what I saw. The submit-time read you describe is essentially what #549 already does: a queue holding a request whose page array still has a 0 entry no longer submits by itself at half capacity, and the title's own Submit reads the missing entries again (refill_late_pages) before the worker runs it. An entry that is still 0 then gets read again at the request's turn, as before.

On my laptop that took the 0x89240009 failures during world loading to zero (7 on main e50836b, 0 with #549; about 2,000 on the older 64b3f35), see my report on #549. So I'd treat the data wall as covered by #549 and keep this thread on the compute-build floor.

One caveat: snapshotting every request at SubmitQueue would also cover arrays the title fills even later, but it changes the copy for stack-allocated arrays that the comment at enqueue warns about, so #549's "read again only the 0 entries" looks like the safer step.

**@⁠Celegans12** on GitHub · 2026-11-24 07:30 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7125062746) @⁠pickles976 thanks, that matches what I saw. The submit-time read you describe is essentially what #549 already does: a queue holding a request whose page array still has a 0 entry no longer submits by itself at half capacity, and the title's own `Submit` reads the missing entries again (`refill_late_pages`) before the worker runs it. An entry that is still 0 then gets read again at the request's turn, as before. On my laptop that took the `0x89240009` failures during world loading to zero (7 on main `e50836b`, 0 with #549; about 2,000 on the older `64b3f35`), see my report on #549. So I'd treat the data wall as covered by #549 and keep this thread on the compute-build floor. One caveat: snapshotting *every* request at `SubmitQueue` would also cover arrays the title fills even later, but it changes the copy for stack-allocated arrays that the comment at enqueue warns about, so #549's "read again only the 0 entries" looks like the safer step.
Author
Owner

@⁠Rednaxeh on GitHub · 2026-11-24 07:43 UTC · original

@⁠qinrxx here are the dumps, same machine and command as above plus XCL_THREAD_DUMP_AT=165,200,240,270 (A at 16 s). None of the dumps ended the run; this time the watchdog did not fire and the run ended at the 300 s limit, with the same shape as before (presents at 0–2 per 2 s from 166 s, commit 16.8 GB at 140 s → 40.8 GB at 280 s, 2,048 BCPack refusals).

All four dumps show the same picture. 110 threads; of the title's ~50:

  • One title thread is running, inside XCL, in all four dumps – thread 33248, unnamed, called from the title's +0x4ecc821:
    xcl.exe gpu::tiling::Layout::from_bits ← Layout::new ← hle::xg::Texture::with_pipes ← hle::d3d12x::title_textures::register ← device_x::create_placed_resource_x (at 165 s the same Layout::from_bits, from device_x::get_resource_allocation_info_x). Resolved with the build's own PDB; the four top-of-stack offsets are four points inside the table-building loop of from_bits.
  • The other title threads wait on the title's own objects, not on XCL: 32 in WaitForSingleObjectEx called from title code (15 of them at +0x221c3c2 under +0x2215eca, the same parent frame the watchdog thread has – its worker pool, idle), 6 in SleepEx (one is the watchdog itself, +0x23cf729, next to its +0x23cf683 write), 1 in mswsock (offline). No title thread is in d3d12, the driver (amdxc64.dll) or DirectStorage.
  • XCL's threads are idle: 17 xcl-dstorage and 15 xcl-pso workers in WaitOnAddress, the four D3D Background Threads in a condition variable, xcl-fences / xcl-frame-clock / xcl-activity in their waits.

So on this card the loading waits for one title thread that is busy in XCL computing tiling layouts, one per placed texture. The log counts the textures it registers in that time: 512 by 20 s, 8,192 by 120 s, 16,384 by 140 s, 32,768 by 180 s (… lies in a GPU view of the title's CPU memory: kept in step with … (N so far)).

What a layout costs (cargo test --release, a probe calling Layout::new(mode, e, {pipes 5, pkrs 3}) 200 times each, this CPU): 0.35–0.57 ms per call for every mode and element size, building ~270 KB of offset tables each time (ox/oy/oz and hx/hy/hz; for a 2D mode hz alone is a 65,536-entry table of zeros). A placed texture goes through it at least three times (get_resource_allocation_info_x, create_placed_resource_x's size check and title_textures::register, each a fresh xg::Texture::new), so 32,768 textures are ≥ 50 s of one thread's CPU in from_bits alone, plus the allocator churn of ~20 GB allocated and freed in 270 KB pieces – on a thread the rest of the title waits for. On NVIDIA this sits under the compute-build stall; here it is the stall.

The layout depends only on (mode, elem_log2, pipe config) – 14 modes × 5 sizes × one config per title – so it can be built once and shared. Plan, one small PR: Layout::new / new_3d return the cached layout for the key (tables behind Arc<[u32]>, so the clone is a few pointers), with a unit test that the second call shares the first call's tables and that every mode / size / config still gives the same layout as today. No behaviour change, no HLSL or DXIL change. I'll post the before / after timeline of this run on this machine with the PR. A separate, smaller point for later: hz for a 2D layout need not be a 65,536-entry table.

AI use: Claude Code (Claude Fable 5.1) read the dumps and the log, resolved the frames with the PDB and wrote this; the runs were mine on the hardware above. Counts, times and RVAs only.

**@⁠Rednaxeh** on GitHub · 2026-11-24 07:43 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7125310816) @⁠qinrxx here are the dumps, same machine and command as above plus `XCL_THREAD_DUMP_AT=165,200,240,270` (A at 16 s). None of the dumps ended the run; this time the watchdog did not fire and the run ended at the 300 s limit, with the same shape as before (presents at 0–2 per 2 s from 166 s, commit 16.8 GB at 140 s → 40.8 GB at 280 s, 2,048 BCPack refusals). **All four dumps show the same picture.** 110 threads; of the title's ~50: - **One title thread is running, inside XCL, in all four dumps** – thread 33248, unnamed, called from the title's `+0x4ecc821`: `xcl.exe` `gpu::tiling::Layout::from_bits` ← `Layout::new` ← `hle::xg::Texture::with_pipes` ← `hle::d3d12x::title_textures::register` ← `device_x::create_placed_resource_x` (at 165 s the same `Layout::from_bits`, from `device_x::get_resource_allocation_info_x`). Resolved with the build's own PDB; the four top-of-stack offsets are four points inside the table-building loop of `from_bits`. - The other title threads wait on the title's own objects, not on XCL: 32 in `WaitForSingleObjectEx` called from title code (15 of them at `+0x221c3c2` under `+0x2215eca`, the same parent frame the watchdog thread has – its worker pool, idle), 6 in `SleepEx` (one is the watchdog itself, `+0x23cf729`, next to its `+0x23cf683` write), 1 in `mswsock` (offline). No title thread is in `d3d12`, the driver (`amdxc64.dll`) or DirectStorage. - XCL's threads are idle: 17 `xcl-dstorage` and 15 `xcl-pso` workers in `WaitOnAddress`, the four `D3D Background Thread`s in a condition variable, `xcl-fences` / `xcl-frame-clock` / `xcl-activity` in their waits. So on this card the loading waits for one title thread that is busy in XCL computing **tiling layouts**, one per placed texture. The log counts the textures it registers in that time: 512 by 20 s, 8,192 by 120 s, 16,384 by 140 s, **32,768 by 180 s** (`… lies in a GPU view of the title's CPU memory: kept in step with … (N so far)`). **What a layout costs** (`cargo test --release`, a probe calling `Layout::new(mode, e, {pipes 5, pkrs 3})` 200 times each, this CPU): **0.35–0.57 ms per call for every mode and element size**, building ~270 KB of offset tables each time (`ox/oy/oz` and `hx/hy/hz`; for a 2D mode `hz` alone is a 65,536-entry table of zeros). A placed texture goes through it at least three times (`get_resource_allocation_info_x`, `create_placed_resource_x`'s size check and `title_textures::register`, each a fresh `xg::Texture::new`), so 32,768 textures are ≥ 50 s of one thread's CPU in `from_bits` alone, plus the allocator churn of ~20 GB allocated and freed in 270 KB pieces – on a thread the rest of the title waits for. On NVIDIA this sits under the compute-build stall; here it is the stall. The layout depends only on `(mode, elem_log2, pipe config)` – 14 modes × 5 sizes × one config per title – so it can be built once and shared. **Plan, one small PR:** `Layout::new` / `new_3d` return the cached layout for the key (tables behind `Arc<[u32]>`, so the clone is a few pointers), with a unit test that the second call shares the first call's tables and that every mode / size / config still gives the same layout as today. No behaviour change, no HLSL or DXIL change. I'll post the before / after timeline of this run on this machine with the PR. A separate, smaller point for later: `hz` for a 2D layout need not be a 65,536-entry table. AI use: Claude Code (Claude Fable 5.1) read the dumps and the log, resolved the frames with the PDB and wrote this; the runs were mine on the hardware above. Counts, times and RVAs only.
Author
Owner

@⁠Rednaxeh on GitHub · 2026-11-24 07:49 UTC · original

Correction to my comment above, before anyone acts on the plan in it: #435 (merged at 02:34, after the 2997c9a my runs are on) already removes almost all of that cost. It sizes the high-coordinate tables to one period instead of 65,536 entries. The same probe on current main 1ec4c98, same CPU: Layout::new is 0.24–4.8 µs per call (0.35–0.57 ms before), with 48–2,100 bytes of tables instead of ~270 KB. A cache on top would save at most 32,768 × 3 × 5 µs ≈ 0.5 s over the whole loading, so I am not opening that PR.

What is still open is whether the loading stall on RDNA3 is gone with #435 or only this part of it. Next: the same 300 s run with XCL_THREAD_DUMP_AT on current main, posted here with the presents / commit timeline and the dumps' picture.

AI use: Claude Code (Claude Fable 5.1), the probe and this note; the measurement is from this machine.

**@⁠Rednaxeh** on GitHub · 2026-11-24 07:49 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7125410865) Correction to my comment above, before anyone acts on the plan in it: **#435 (merged at 02:34, after the `2997c9a` my runs are on) already removes almost all of that cost.** It sizes the high-coordinate tables to one period instead of 65,536 entries. The same probe on current `main` `1ec4c98`, same CPU: `Layout::new` is **0.24–4.8 µs** per call (0.35–0.57 ms before), with 48–2,100 bytes of tables instead of ~270 KB. A cache on top would save at most 32,768 × 3 × 5 µs ≈ 0.5 s over the whole loading, so I am not opening that PR. What is still open is whether the loading stall on RDNA3 is gone with #435 or only this part of it. Next: the same 300 s run with `XCL_THREAD_DUMP_AT` on current `main`, posted here with the presents / commit timeline and the dumps' picture. AI use: Claude Code (Claude Fable 5.1), the probe and this note; the measurement is from this machine.
Author
Owner

@⁠Celegans12 on GitHub · 2026-11-24 07:53 UTC · original

Three things ruled out for the world-loading stop on my laptop (RTX 3080 Laptop, same save and inputs as my earlier runs; main 1ec4c98 + #549 + #208/#273 + #533 + #820 + #742, release, XCL_NETWORK=0). Every run below still ends at +0x23cf683:

Run What changed Dispatches skipped Watchdog
warm1–4 driver blobs from earlier runs (driver_cache), 789 → 822 files; longest driver compile in warm3 0.5 s 256 112–123 s
wait0 XCL_COMPUTE_PSO_WAIT_MS=0 (unbounded), warm cache 0 126 s
bcpack-ok local switch: refused BCPack requests (BC7/BC5/BC6H…, ~300 per run) filled with solid blocks and reported as done 512 112 s

So for me it is not the driver's compile time, not the skipped dispatches, and not the BCPack refusals: in each case submits drop to zero about 86 s in, right after a burst of ~7,500 dispatches in two seconds, and nothing is submitted again.

Thread snapshots during the stop (cdb, non-invasive, at 88/98 s and 95/110 s) show XCL idle: no title thread is inside XCL. The DirectStorage, PSO and DXC workers are parked, and the title's own threads all wait on unnamed events (the main group in WaitForSingleObject called from +0x221c3c2). #873's "a wait for a queue gives up" line never appears. Next I want to find which of those events the title waits on, and what should have signalled them.

A side note in case it helps someone: the 2 s activity line reports DirectStorage … 0 failed even while BCPack refusals fail, so refusals only show in the BCPack refusals so far lines.

Tested with Claude Code (Claude Opus 5.5), which ran the builds, runs and snapshots; I reviewed it before posting.

**@⁠Celegans12** on GitHub · 2026-11-24 07:53 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7125479998) Three things ruled out for the world-loading stop on my laptop (RTX 3080 Laptop, same save and inputs as my earlier runs; main `1ec4c98` + #549 + #208/#273 + #533 + #820 + #742, release, `XCL_NETWORK=0`). Every run below still ends at `+0x23cf683`: | Run | What changed | Dispatches skipped | Watchdog | |---|---|---|---| | warm1–4 | driver blobs from earlier runs (`driver_cache`), 789 → 822 files; longest driver compile in warm3 0.5 s | 256 | 112–123 s | | wait0 | `XCL_COMPUTE_PSO_WAIT_MS=0` (unbounded), warm cache | **0** | 126 s | | bcpack-ok | local switch: refused BCPack requests (BC7/BC5/BC6H…, ~300 per run) filled with solid blocks and reported as done | 512 | 112 s | So for me it is not the driver's compile time, not the skipped dispatches, and not the BCPack refusals: in each case submits drop to zero about 86 s in, right after a burst of ~7,500 dispatches in two seconds, and nothing is submitted again. Thread snapshots during the stop (cdb, non-invasive, at 88/98 s and 95/110 s) show XCL idle: no title thread is inside XCL. The DirectStorage, PSO and DXC workers are parked, and the title's own threads all wait on unnamed events (the main group in `WaitForSingleObject` called from `+0x221c3c2`). #873's "a wait for a queue gives up" line never appears. Next I want to find which of those events the title waits on, and what should have signalled them. A side note in case it helps someone: the 2 s `activity` line reports `DirectStorage … 0 failed` even while BCPack refusals fail, so refusals only show in the `BCPack refusals so far` lines. Tested with Claude Code (Claude Opus 5.5), which ran the builds, runs and snapshots; I reviewed it before posting.
Author
Owner

@⁠throny on GitHub · 2026-11-24 06:47 UTC · original · edited 2026-11-24 08:00 UTC

Correction (2026-11-24, after #891 and #899 made me recheck): my reading of the thread stacks below was wrong. I classified a thread by the top of its stack only. Read to the bottom, the debugger captures show title threads inside a compute bind in every capture – see "Update 2, corrected". The statements that no title thread is inside XCL, and that this speaks against the path #267 limits, are withdrawn. The timings and the A/B table are unaffected.

Data point on NVIDIA Ada + Intel for main beaa245 (with #797): the same stop, twice, and what every thread was doing at the stop with XCL's frames resolved to function names.

Tested

  • Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 4080 16 GB (driver 610.88, 32-lane waves), Intel i9-12900K, 64 GB; Rust 1.100.0 stable-x86_64-pc-windows-msvc; cargo build --release -p xcl on beaa245, no local changes. xcl run <folder> with XCL_NETWORK=0, XCL_ACTIVITY=1; keyboard input sent by a script (profile selection and the first-run screens in run 1; run 2 needed one key press).
  • Both runs end with 0xc0000005, a write to address 0 in the title: the stop #534 reports, with this issue's location on its stack. No device removal in either.
run 1 (world shaders not cached) run 2 (cache from run 1)
last 2 s interval with a submit 238 s 104 s (18 submits; before it, 90 s)
last interval with a present 232 s 90 s
stop 262.0 s 118.1 s
peak commit 28 297 MB 29 020 MB
DirectStorage requests logged as failed 16 16

So the title stops presenting and submitting, and the watchdog fires 30 s (run 1) and 28 s (run 2) after the last present; a warm cache moves the whole sequence earlier but does not change it. Video memory at the stop in run 2: 14 354 MB local on a 16 GB card.

Threads at the stop (run 2), from the stack list XCL logs, with xcl.exe frames resolved through the build's PDB (157 threads):

  • 45 threads have title frames. All 45 wait in ntdll called from title code, with no XCL function between the title and the wait in XCL's logged list. So no title thread is inside a bind, a resolve_wait, a Wait64BitValueX or any other XCL call. (Withdrawn: the debugger captures below show otherwise; a thread that is inside XCL is listed here without its title frames, and I counted it as one of XCL's own.)
  • One XCL worker is in d3d12x::real::build_compute → recomp::pso::compile_console_shader → dxc::compile (a compute pipeline still being built), and 4 threads are in nvgpucomp64.dll.
  • 17 dstorage::QueueInner::run threads and the 4 pso_async::preload threads are idle (waiting for work); the frame clock, the fence event thread and the window thread are in their normal waits.

On this machine that speaks against a title thread blocked in XCL at the stop (the path #267 limits), and fits a title-side wait that nothing satisfies. (Withdrawn, see the correction at the top.)

Not tested

  • Any of the open PRs for this issue; AMD; what the 45 title threads wait for (the stacks show title frames only); whether the compute pipeline being built at the stop is one the title is waiting on.
  • Run 1's thread list was not classified.

AI use

  • Claude Code (Claude Fable 5.2) ran the title, sent the input, resolved the frames with cdb and wrote this report. No game data attached.

Update: open PRs against main on the same machine (world loading, unattended)

One run each unless noted, release builds, each PR's head merged onto main beaa245 (clean merges), DXIL cache warm, one key press sent by a script at the profile prompt. "Presents stop" is the last 2 s interval with a present.

build presents stop stop (the same write to 0)
main beaa245, 2 more runs 80 s, 84 s 110.1 s, 112.1 s
#549 1870880 78 s 106.9 s
#628 766b661 78 s 107.9 s
#754 3cca433 82 s 110.9 s
#820 0488ece on main 1ec4c98, XCL_BIG_COMPILES=4 76 s 105.9 s
  • None of them moves the stop on this machine: 26–30 s after the last present in every run.
  • #820: the XCL_BIG_COMPILES=4 log line never appeared, so no big uncached compute build ran in the background in that run, and the stop is the same. In the last main run the compute pipelines finished in the 32 s before the stop took 16.7 s of build time in total, against 55.6 s in run 2 above, with the same stall length. So on this machine the stall does not follow the pipeline build time.
  • #754, 1 of its 2 runs: after the exception line the process did not exit (no thread list in the log, window at 0.0 FPS, 29.4 GB committed) until my runner killed it 6 minutes later. The other run was cut short by my memory guard before the stop. main exited within a second of the exception in all nine of its runs without a debugger (the four above and five more on 1ec4c98, stops at 107.1–110.1 s). One main run that had cdb attached twice during the stall (update 2) hung the same way after the exception, so two captures earlier in the run may be enough to cause it; I cannot tie the hang to #754 from one run.
  • Run 1's threads classified as well: 44 of its 45 title threads wait in ntdll with no XCL function above the title's frames (the 45th is the faulting thread). (Same flaw as above; withdrawn.)

Not tested in this update: more than one run per PR (except #754), a cold DXIL cache, AMD.

Update 2, corrected: threads during the stall, not after it (main 1ec4c98, same machine)

Two world-loading runs with cdb attached non-invasively (-pv) once presents had been 0 for five 2 s intervals: all thread stacks at log time 88 s and again at 101 s in each run (presents stop at about 78 s; the stops came at 132.9 s and 133.1 s, later than without the captures because each one suspends the process for a few seconds). 159 threads; the title's image is mapped by XCL, so its frames show as bare addresses.

Stacks read to the bottom this time. In all four captures one or two title threads are inside a compute bind:

title → d3d12x::bind::set_pipeline_state → real::bind_pipeline → real::cl_set_pipeline_state → pso_async::resolve_for_bind → pso_async::resolve_wait → …

capture title threads in resolve_wait what they are doing there
run A, 88 s 2 one builds the pipeline in the call (real::build_compute → translated_compute_pso, top of stack in nvgpucomp64.dll); one is in recomp::pso::compile_console_shader → dxc::compile, waiting for the DXC pool
run A, 101 s 2 both in compile_console_shader → dxc::compile
run B, 88 s 2 one waits in resolve_wait itself (another thread is building its pipeline); one in compile_console_shader → dxc::compile
run B, 101 s 2 one still waits in resolve_wait; one builds in the call, in nvgpucomp64.dll
  • They are the same two threads at 88 s and at 101 s in each run, so two title threads spend the stall in compute binds, one pipeline after the other.
  • The other threads with title frames at the top of their stacks (55 in the first capture) are in OS waits called directly from title code: 44 in WaitForSingleObjectEx, 6 in SleepConditionVariableCS, 4 in SleepEx, 1 in select.
  • XCL's pools are idle: the 23 xcl-pso workers, 22 xcl-dxc workers (except the compiles the two binds wait for), 17 xcl-dstorage threads and 4 xcl-pso-pre threads wait for work.

So on this machine the stall does have title threads held in XCL: in resolve_wait for compute pipelines that are translated, DXC-compiled and driver-compiled inside the bind. That is the premise of #267, #754, #891 and #899, and my earlier statement to the contrary was an error in my reading. What the A/B table above still shows is that #754 and #628 as they stand do not shorten it here.

Not tested: #891 or #899 (next); which objects the directly waiting threads wait on (my attempt to read the handles with cdb gave nothing usable).

**@⁠throny** on GitHub · 2026-11-24 06:47 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7124295487) · edited 2026-11-24 08:00 UTC > **Correction (2026-11-24, after #891 and #899 made me recheck):** my reading of the thread stacks below was wrong. I classified a thread by the top of its stack only. Read to the bottom, **the debugger captures show title threads inside a compute bind in every capture** – see "Update 2, corrected". The statements that no title thread is inside XCL, and that this speaks against the path #267 limits, are withdrawn. The timings and the A/B table are unaffected. Data point on NVIDIA Ada + Intel for `main` `beaa245` (with #797): the same stop, twice, and what every thread was doing at the stop with XCL's frames resolved to function names. **Tested** - Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 4080 16 GB (driver 610.88, 32-lane waves), Intel i9-12900K, 64 GB; Rust 1.100.0 `stable-x86_64-pc-windows-msvc`; `cargo build --release -p xcl` on `beaa245`, no local changes. `xcl run <folder>` with `XCL_NETWORK=0`, `XCL_ACTIVITY=1`; keyboard input sent by a script (profile selection and the first-run screens in run 1; run 2 needed one key press). - Both runs end with `0xc0000005`, a write to address 0 in the title: the stop #534 reports, with this issue's location on its stack. No device removal in either. | | run 1 (world shaders not cached) | run 2 (cache from run 1) | |---|---|---| | last 2 s interval with a submit | 238 s | 104 s (18 submits; before it, 90 s) | | last interval with a present | 232 s | 90 s | | stop | 262.0 s | 118.1 s | | peak commit | 28 297 MB | 29 020 MB | | DirectStorage requests logged as failed | 16 | 16 | So the title stops presenting and submitting, and the watchdog fires 30 s (run 1) and 28 s (run 2) after the last present; a warm cache moves the whole sequence earlier but does not change it. Video memory at the stop in run 2: 14 354 MB local on a 16 GB card. **Threads at the stop (run 2)**, from the stack list XCL logs, with `xcl.exe` frames resolved through the build's PDB (157 threads): - 45 threads have title frames. All 45 wait in `ntdll` called from title code, with no XCL function between the title and the wait in XCL's logged list. ~~So no title thread is inside a bind, a `resolve_wait`, a `Wait64BitValueX` or any other XCL call.~~ (Withdrawn: the debugger captures below show otherwise; a thread that is inside XCL is listed here without its title frames, and I counted it as one of XCL's own.) - One XCL worker is in `d3d12x::real::build_compute` → `recomp::pso::compile_console_shader` → `dxc::compile` (a compute pipeline still being built), and 4 threads are in `nvgpucomp64.dll`. - 17 `dstorage::QueueInner::run` threads and the 4 `pso_async::preload` threads are idle (waiting for work); the frame clock, the fence event thread and the window thread are in their normal waits. ~~On this machine that speaks against a title thread blocked in XCL at the stop (the path #267 limits), and fits a title-side wait that nothing satisfies.~~ (Withdrawn, see the correction at the top.) **Not tested** - Any of the open PRs for this issue; AMD; what the 45 title threads wait for (the stacks show title frames only); whether the compute pipeline being built at the stop is one the title is waiting on. - Run 1's thread list was not classified. **AI use** - Claude Code (Claude Fable 5.2) ran the title, sent the input, resolved the frames with `cdb` and wrote this report. No game data attached. --- **Update: open PRs against `main` on the same machine (world loading, unattended)** One run each unless noted, release builds, each PR's head merged onto `main` `beaa245` (clean merges), DXIL cache warm, one key press sent by a script at the profile prompt. "Presents stop" is the last 2 s interval with a present. | build | presents stop | stop (the same write to 0) | |---|---|---| | `main` `beaa245`, 2 more runs | 80 s, 84 s | 110.1 s, 112.1 s | | #549 `1870880` | 78 s | 106.9 s | | #628 `766b661` | 78 s | 107.9 s | | #754 `3cca433` | 82 s | 110.9 s | | #820 `0488ece` on `main` `1ec4c98`, `XCL_BIG_COMPILES=4` | 76 s | 105.9 s | - None of them moves the stop on this machine: 26–30 s after the last present in every run. - #820: the `XCL_BIG_COMPILES=4` log line never appeared, so no big uncached compute build ran in the background in that run, and the stop is the same. In the last `main` run the compute pipelines finished in the 32 s before the stop took 16.7 s of build time in total, against 55.6 s in run 2 above, with the same stall length. So on this machine the stall does not follow the pipeline build time. - #754, 1 of its 2 runs: after the exception line the process did not exit (no thread list in the log, window at 0.0 FPS, 29.4 GB committed) until my runner killed it 6 minutes later. The other run was cut short by my memory guard before the stop. `main` exited within a second of the exception in all nine of its runs without a debugger (the four above and five more on `1ec4c98`, stops at 107.1–110.1 s). One `main` run that had `cdb` attached twice during the stall (update 2) hung the same way after the exception, so two captures earlier in the run may be enough to cause it; I cannot tie the hang to #754 from one run. - ~~Run 1's threads classified as well: 44 of its 45 title threads wait in `ntdll` with no XCL function above the title's frames (the 45th is the faulting thread).~~ (Same flaw as above; withdrawn.) Not tested in this update: more than one run per PR (except #754), a cold DXIL cache, AMD. **Update 2, corrected: threads during the stall, not after it** (`main` `1ec4c98`, same machine) Two world-loading runs with `cdb` attached non-invasively (`-pv`) once presents had been 0 for five 2 s intervals: all thread stacks at log time 88 s and again at 101 s in each run (presents stop at about 78 s; the stops came at 132.9 s and 133.1 s, later than without the captures because each one suspends the process for a few seconds). 159 threads; the title's image is mapped by XCL, so its frames show as bare addresses. Stacks read to the bottom this time. In **all four captures one or two title threads are inside a compute bind**: `title` → `d3d12x::bind::set_pipeline_state` → `real::bind_pipeline` → `real::cl_set_pipeline_state` → `pso_async::resolve_for_bind` → `pso_async::resolve_wait` → … | capture | title threads in `resolve_wait` | what they are doing there | |---|---|---| | run A, 88 s | 2 | one builds the pipeline in the call (`real::build_compute` → `translated_compute_pso`, top of stack in `nvgpucomp64.dll`); one is in `recomp::pso::compile_console_shader` → `dxc::compile`, waiting for the DXC pool | | run A, 101 s | 2 | both in `compile_console_shader` → `dxc::compile` | | run B, 88 s | 2 | one waits in `resolve_wait` itself (another thread is building its pipeline); one in `compile_console_shader` → `dxc::compile` | | run B, 101 s | 2 | one still waits in `resolve_wait`; one builds in the call, in `nvgpucomp64.dll` | - They are the same two threads at 88 s and at 101 s in each run, so two title threads spend the stall in compute binds, one pipeline after the other. - The other threads with title frames at the top of their stacks (55 in the first capture) are in OS waits called directly from title code: 44 in `WaitForSingleObjectEx`, 6 in `SleepConditionVariableCS`, 4 in `SleepEx`, 1 in `select`. - XCL's pools are idle: the 23 `xcl-pso` workers, 22 `xcl-dxc` workers (except the compiles the two binds wait for), 17 `xcl-dstorage` threads and 4 `xcl-pso-pre` threads wait for work. So on this machine the stall does have title threads held in XCL: in `resolve_wait` for compute pipelines that are translated, DXC-compiled and driver-compiled inside the bind. That is the premise of #267, #754, #891 and #899, and my earlier statement to the contrary was an error in my reading. What the A/B table above still shows is that #754 and #628 as they stand do not shorten it here. Not tested: #891 or #899 (next); which objects the directly waiting threads wait on (my attempt to read the handles with `cdb` gave nothing usable).
Author
Owner

@⁠Celegans12 on GitHub · 2026-11-24 08:26 UTC · original

Follow-up with sync tracing at the world-loading stop (RTX 3080 Laptop, same save and inputs; main 09940bb + #549 + #208/#273 + #533 + #820 + #742, plus theaustinayers' sync tracing from modified-build 957def8/ae89720 ported locally, release, XCL_NETWORK=0). It still ends at +0x23cf683.

At the stop the GPU is idle, not stuck. Per-queue GPU done/submitted from the trace:

time q0 q1 q2 q3 q4 q5 q6
82.1 s 4549/4552 1705 1512 5/6 5/7 4 4
84.1 s → crash 4552 1705 1512 6 7 4 4

q3–q6 are queues the title creates shortly before the stop. At 82 s q0's 29-list submit and q3/q4's single lists were briefly behind each other (q3 and q4 wait on Wait64 cells that q0 signals, and q0 waits mid-batch on a cell q3 writes), but that chain resolved: by 84 s every submit on every queue had finished, and nothing was submitted after that (activity: 0 submits, 0 presents, 0 frame-event waits from 84 s).

A local dump of the Wait64 cells at 88 s: all of them hold in memory the value XCL signalled, no CPU cycle-breaks, no title ID3D12Fence behind. The only two cells ahead of memory are the next round (0x5ec at …fe00, recorded in a graphics list, and …fe08, in a compute list) — recorded, never executed.

So for me the title finishes its GPU work, records the next round, and then does not submit it: its threads sit in WaitForSingleObject on its own semaphores (cdb, non-invasive; the handles are semaphores, count 0, INFINITE waits), with XCL's threads idle. That points away from GPU-side ordering (including the mid-list wait position, which I was going to try next) and towards something the title waits for on the CPU side after the GPU is done.

One more data point that may matter: with XCL_TRACE_IMPORTS on the api-ms-win-core-synch calls (which slows every wait/release), the run did not stop at 84 s — it kept presenting until 98 s and then crashed elsewhere (VCRUNTIME140+0x1cd03, a write). So the stop is timing-sensitive.

Tested with Claude Code (Claude Opus 5.5), which ran the builds, the runs and the trace analysis; I reviewed it before posting.

**@⁠Celegans12** on GitHub · 2026-11-24 08:26 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7126133215) Follow-up with sync tracing at the world-loading stop (RTX 3080 Laptop, same save and inputs; main `09940bb` + #549 + #208/#273 + #533 + #820 + #742, plus theaustinayers' sync tracing from `modified-build` 957def8/ae89720 ported locally, release, `XCL_NETWORK=0`). It still ends at `+0x23cf683`. **At the stop the GPU is idle, not stuck.** Per-queue GPU done/submitted from the trace: | time | q0 | q1 | q2 | q3 | q4 | q5 | q6 | |---|---|---|---|---|---|---|---| | 82.1 s | 4549/4552 | 1705 | 1512 | 5/6 | 5/7 | 4 | 4 | | 84.1 s → crash | 4552 | 1705 | 1512 | 6 | 7 | 4 | 4 | q3–q6 are queues the title creates shortly before the stop. At 82 s q0's 29-list submit and q3/q4's single lists were briefly behind each other (q3 and q4 wait on `Wait64` cells that q0 signals, and q0 waits mid-batch on a cell q3 writes), but that chain resolved: by 84 s every submit on every queue had finished, and nothing was submitted after that (`activity`: 0 submits, 0 presents, 0 frame-event waits from 84 s). A local dump of the `Wait64` cells at 88 s: all of them hold in memory the value XCL signalled, no CPU cycle-breaks, no title `ID3D12Fence` behind. The only two cells ahead of memory are the next round (`0x5ec` at `…fe00`, recorded in a graphics list, and `…fe08`, in a compute list) — recorded, never executed. So for me the title finishes its GPU work, records the next round, and then does not submit it: its threads sit in `WaitForSingleObject` on its own semaphores (cdb, non-invasive; the handles are semaphores, count 0, INFINITE waits), with XCL's threads idle. That points away from GPU-side ordering (including the mid-list wait position, which I was going to try next) and towards something the title waits for on the CPU side after the GPU is done. One more data point that may matter: with `XCL_TRACE_IMPORTS` on the `api-ms-win-core-synch` calls (which slows every wait/release), the run did **not** stop at 84 s — it kept presenting until 98 s and then crashed elsewhere (`VCRUNTIME140+0x1cd03`, a write). So the stop is timing-sensitive. Tested with Claude Code (Claude Opus 5.5), which ran the builds, the runs and the trace analysis; I reviewed it before posting.
Author
Owner

@⁠grahamster2 on GitHub · 2026-11-24 12:42 UTC · original

@⁠qinrxx thanks for the A/B. First a correction to what I wrote before, then the three questions.

Correction: I overstated the split's part in this. In my overnight A/B (ab8c9df plus local logging and a 10 s watchdog, the full window, 2 runs with XCL_SPLIT_WAITS=1 and 2 with =0), each counter list at world start was [wait][write], with the wait first. A list split at waits that follow other commands has nothing to do there. The #539 bridge alone turns those waits into GPU waits, split on or off:

  • Warm-up, split on: 4 waits armed at 71.1 s.
  • s0b, split off: 22 waits armed at 64.2 s, on the …ff68 block you saw on main.

In both, there were 0 CPU timeouts, 0 cycle skips and 0 watchdog releases at 10 s. Every run that got past 63 s then ended the same way with the split on and off: presents at 0 from 62–72 s, back-to-back 3–5 s compute driver builds, and the write at +0x23cf683 at 94–100 s. (One split-off run hit a device hang at 63.1 s before any wait was armed, too few runs to read anything into.) So the split's only evidence is still the unit test for the mid-list case. It is not what changes the outcome on this title.

1. After a release: late producers, or late execution?

  • The 1 s run (3080, f4ce27c plus the same 3 commits, no submit/signal logging in that build):
    • 84.103–84.338: five waits bridged (…fe38, fe20, fe58, fe10, fee8 >= 0x551, compute waiting on direct, wait-before-signal).
    • 84.805: a direct-queue wait on …fe40 skipped as a cycle.
    • 85.144 and 85.347: six releases, all recorded=0x551, submitted=0x551, completed=0x0.
    • 86.0: the read at -1.
    • So the producers' signals had been queued by 85.1 s, and their lists had not executed 0.8–1.2 s after the waits were armed. That build didn't log signal times, so I can't say how long after their signals.
  • The overnight runs log each signal and submit (10 s watchdog). In the warm-up:
    • 71.086: compute queue A arms fe58 >= 0x553 (producer: a direct list, not yet submitted).
    • 71.104 / 71.105: queue A's list then signals fe60 and fe68.
    • 71.116–71.117: compute queue B arms fe10, fee8 (direct producers, not submitted) and fe68. Its producer is queue A's list, already submitted, but held behind A's wait on fe58.
    • 71.338 / 71.345: the direct queue submits the producers and signals fe58, fe10, fee8.
    • This is exactly your one-level-deeper chain: B waits on fe68, whose producer on A waits on fe58, whose producer is the direct list. Here it is all GPU waits on fences that do get signalled, so it resolves without the CPU. Nothing reached 10 s.
    • s0b looks the same: 22 waits from 64.23 s, and the direct producers' signals at 64.36–64.48 s.
  • What I can't give you: when each wait completed. The build doesn't log completion, only that none took 10 s. So on this card the answer to your question is "the producers' lists executed late". In the 1 s run that was over 0.8 s after their waits, with the direct queue's own execution as the slow part (14 GB of video memory on a 10 GB card). The submit side was 0.01–0.25 s overnight.

2. An in-flight fence vs a longer watchdog

  • The bridge already has your in-flight fence, per counter instead of per list. signal_write64_pairs queues Signal(cell.fence, value) on the producer's queue right after the list that recorded the Write64BitValue*, and sets submitted_max. A later wait on that counter, by any list on any queue, goes through try_gpu_wait:

    • submitted_max >= value on another queue: a GPU queue.Wait(cell.fence, value);
    • on the same queue: nothing, FIFO covers it;
    • armed waits are pruned once the fence completes.
  • Chains (a producer waiting on another consumer) need no special handling: each hop is a GPU wait on a fence that will be signalled, and the GPU resolves them in order, as the warm-up above shows. Your local build put only not-yet-submitted producers on the GPU. The "producer submitted but still held on the GPU" case is the one the bridge covers through submitted_max.

  • What the bridge does not cover, and a per-list fence would: waits it isn't eligible for. These fall back to the CPU, and they are where your 7.8 s hold could come from:

    • Wait32BitValueX;
    • comparisons other than GREATER_EQUAL or a partial mask;
    • a counter seen going backwards (non_monotonic);
    • a counter written by something other than Write64BitValue*.

    The rule would be: wait for the GPU on the fence of the last submitted list that wrote the address, then compare. I'd guess about 100–150 lines on top of the bridge: an address → (fence, value) map filled at submit, used when the per-counter path isn't eligible, and pruned on completion. It has a limit: a GPU wait proves the list ran, not that the compare holds. For GREATER_EQUAL on a monotonic counter that is the same thing; for EQUAL or masked waits it is only right if the last writer was the one meant.

  • The watchdog is the part that does harm now. In the bridge it releases any armed wait after 1 s, including waits whose producer has been submitted, so a slow GPU turns into a consumer running unready (your 77.9 s release, my 85.1 s ones). With the split there is no reason left for a GPU wait whose producer is submitted to need breaking: the cycles came from hoisting waits ahead of their own list's writes. My suggestion, about 10 lines:

    • release only waits whose producer was never submitted (submitted_max < value at timeout);
    • for submitted producers, only log;
    • keep a much longer limit (say 30 s) as a last resort against device hangs.

    That is a smaller and more direct step than the per-list fence, and both could go in.

3. 0x704180158 in the bridge list vs 0x704180168 in the release list: not a mapping bug, it's the logging.

  • The bridge log (list_x.rs:1439) prints bridged to GPU queue.Wait … wait-before-signal only for waits whose producer was not yet submitted, and only for the first 8 per run.
  • The watchdog (list_x.rs:1110) prints every armed wait it releases.
  • So: 0x704180168 was armed on a producer already submitted (prod_ty=Some(2), a compute list), so it never got a "bridged" line. 0x704180158 was bridged and completed within 1 s, so it isn't in the release list.
  • My 1 s run has the same pattern: fe68 is released with prod_ty=Some(2) and was never in the bridged list. My overnight log shows its arm line: arm 0x70417fe68 >= 0x553 … recorded 0x553 ty Some(2), submitted 0x553 on q <compute queue A>.
  • The 16-byte steps: each list waits on one counter and writes the next one 8 bytes up (arm …fe58 / signal …fe60). Cells are keyed by the exact address in both paths (SYNC_CELLS). I found no base+index arithmetic in the bridge or the split, so I didn't write a test for a bug I couldn't find.

Not tested: the watchdog change and a per-list fence (neither is written), completion times of GPU waits (not logged), AMD, and a card that executes the direct list within 1 s at world start.

Written with Claude Code (Claude Opus 5.5) from my own runs' logs; the logging patch is local only.

**@⁠grahamster2** on GitHub · 2026-11-24 12:42 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7131811441) @⁠qinrxx thanks for the A/B. First a correction to what I wrote before, then the three questions. **Correction:** I overstated the split's part in this. In my overnight A/B (`ab8c9df` plus local logging and a 10 s watchdog, the full window, 2 runs with `XCL_SPLIT_WAITS=1` and 2 with `=0`), each counter list at world start was `[wait][write]`, with the wait first. A list split at waits that follow other commands has nothing to do there. The #539 bridge alone turns those waits into GPU waits, split on or off: - Warm-up, split on: 4 waits armed at 71.1 s. - s0b, split off: 22 waits armed at 64.2 s, on the `…ff68` block you saw on `main`. In both, there were 0 CPU timeouts, 0 cycle skips and 0 watchdog releases at 10 s. Every run that got past 63 s then ended the same way with the split on and off: presents at 0 from 62–72 s, back-to-back 3–5 s compute driver builds, and the write at `+0x23cf683` at 94–100 s. (One split-off run hit a device hang at 63.1 s before any wait was armed, too few runs to read anything into.) So the split's only evidence is still the unit test for the mid-list case. It is not what changes the outcome on this title. **1. After a release: late producers, or late execution?** - **The 1 s run** (3080, `f4ce27c` plus the same 3 commits, no submit/signal logging in that build): - 84.103–84.338: five waits bridged (`…fe38, fe20, fe58, fe10, fee8 >= 0x551`, compute waiting on direct, wait-before-signal). - 84.805: a direct-queue wait on `…fe40` skipped as a cycle. - 85.144 and 85.347: six releases, all `recorded=0x551, submitted=0x551, completed=0x0`. - 86.0: the read at -1. - So the producers' signals had been queued by 85.1 s, and their lists had not executed 0.8–1.2 s after the waits were armed. That build didn't log signal times, so I can't say how long after their signals. - **The overnight runs** log each signal and submit (10 s watchdog). In the warm-up: - 71.086: compute queue A arms `fe58 >= 0x553` (producer: a direct list, not yet submitted). - 71.104 / 71.105: queue A's list then signals `fe60` and `fe68`. - 71.116–71.117: compute queue B arms `fe10`, `fee8` (direct producers, not submitted) and `fe68`. Its producer is queue A's list, already submitted, but held behind A's wait on `fe58`. - 71.338 / 71.345: the direct queue submits the producers and signals `fe58`, `fe10`, `fee8`. - **This is exactly your one-level-deeper chain:** B waits on `fe68`, whose producer on A waits on `fe58`, whose producer is the direct list. Here it is all GPU waits on fences that do get signalled, so it resolves without the CPU. Nothing reached 10 s. - s0b looks the same: 22 waits from 64.23 s, and the direct producers' signals at 64.36–64.48 s. - **What I can't give you:** when each wait completed. The build doesn't log completion, only that none took 10 s. So on this card the answer to your question is "the producers' lists executed late". In the 1 s run that was over 0.8 s after their waits, with the direct queue's own execution as the slow part (14 GB of video memory on a 10 GB card). The submit side was 0.01–0.25 s overnight. **2. An in-flight fence vs a longer watchdog** - **The bridge already has your in-flight fence, per counter instead of per list.** `signal_write64_pairs` queues `Signal(cell.fence, value)` on the producer's queue right after the list that recorded the `Write64BitValue*`, and sets `submitted_max`. A later wait on that counter, by any list on any queue, goes through `try_gpu_wait`: - `submitted_max >= value` on another queue: a GPU `queue.Wait(cell.fence, value)`; - on the same queue: nothing, FIFO covers it; - armed waits are pruned once the fence completes. - **Chains** (a producer waiting on another consumer) need no special handling: each hop is a GPU wait on a fence that will be signalled, and the GPU resolves them in order, as the warm-up above shows. Your local build put only not-yet-submitted producers on the GPU. The "producer submitted but still held on the GPU" case is the one the bridge covers through `submitted_max`. - **What the bridge does not cover,** and a per-list fence would: waits it isn't eligible for. These fall back to the CPU, and they are where your 7.8 s hold could come from: - `Wait32BitValueX`; - comparisons other than `GREATER_EQUAL` or a partial mask; - a counter seen going backwards (`non_monotonic`); - a counter written by something other than `Write64BitValue*`. The rule would be: wait for the GPU on the fence of the last submitted list that wrote the address, then compare. I'd guess about 100–150 lines on top of the bridge: an address → (fence, value) map filled at submit, used when the per-counter path isn't eligible, and pruned on completion. It has a limit: a GPU wait proves the list ran, not that the compare holds. For `GREATER_EQUAL` on a monotonic counter that is the same thing; for `EQUAL` or masked waits it is only right if the last writer was the one meant. - **The watchdog** is the part that does harm now. In the bridge it releases any armed wait after 1 s, including waits whose producer has been submitted, so a slow GPU turns into a consumer running unready (your 77.9 s release, my 85.1 s ones). With the split there is no reason left for a GPU wait whose producer is submitted to need breaking: the cycles came from hoisting waits ahead of their own list's writes. My suggestion, about 10 lines: - release only waits whose producer was never submitted (`submitted_max < value` at timeout); - for submitted producers, only log; - keep a much longer limit (say 30 s) as a last resort against device hangs. That is a smaller and more direct step than the per-list fence, and both could go in. **3. `0x704180158` in the bridge list vs `0x704180168` in the release list:** not a mapping bug, it's the logging. - **The bridge log** (`list_x.rs:1439`) prints `bridged to GPU queue.Wait … wait-before-signal` only for waits whose producer was not yet submitted, and only for the first 8 per run. - **The watchdog** (`list_x.rs:1110`) prints every armed wait it releases. - **So:** `0x704180168` was armed on a producer already submitted (`prod_ty=Some(2)`, a compute list), so it never got a "bridged" line. `0x704180158` was bridged and completed within 1 s, so it isn't in the release list. - **My 1 s run has the same pattern:** `fe68` is released with `prod_ty=Some(2)` and was never in the bridged list. My overnight log shows its arm line: `arm 0x70417fe68 >= 0x553 … recorded 0x553 ty Some(2), submitted 0x553 on q <compute queue A>`. - **The 16-byte steps:** each list waits on one counter and writes the next one 8 bytes up (`arm …fe58` / `signal …fe60`). Cells are keyed by the exact address in both paths (`SYNC_CELLS`). I found no base+index arithmetic in the bridge or the split, so I didn't write a test for a bug I couldn't find. **Not tested:** the watchdog change and a per-list fence (neither is written), completion times of GPU waits (not logged), AMD, and a card that executes the direct list within 1 s at world start. _Written with Claude Code (Claude Opus 5.5) from my own runs' logs; the logging patch is local only._
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 13:45 UTC · original

One elimination from the static side for the "CPU-side completion never arrives" hunt: XTaskQueueRegisterWaiter is genuinely implemented (not a stub): crates/xcl/src/hle/xgameruntime/taskqueue.rs:671 bridges to RegisterWaitForSingleObject with a real callback dispatch (waiter_fired), validates the port, refuses terminated queues with E_ABORT. The sibling runtime had to add this API today (Marvisak/VIctory#888) — this repo does not have that failure mode. So a title thread parked on its own count-0 semaphore is waiting on something behind the task queue: whichever async producer is supposed to release it (DirectStorage completion delivery, storage task queue work, or the title's own internal scheduler). Narrowing which semaphore map you get with cdb (!handle on the waiters) would tell whoever picks this up exactly which producer owns the lost completion.

**@⁠pickles976** on GitHub · 2026-11-24 13:45 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7133285004) One elimination from the static side for the "CPU-side completion never arrives" hunt: **`XTaskQueueRegisterWaiter` is genuinely implemented** (not a stub): `crates/xcl/src/hle/xgameruntime/taskqueue.rs:671` bridges to `RegisterWaitForSingleObject` with a real callback dispatch (`waiter_fired`), validates the port, refuses terminated queues with `E_ABORT`. The sibling runtime had to *add* this API today (Marvisak/VIctory#888) — this repo does not have that failure mode. So a title thread parked on its own count-0 semaphore is waiting on something **behind** the task queue: whichever async producer is supposed to release it (DirectStorage completion delivery, storage task queue work, or the title's own internal scheduler). Narrowing *which* semaphore map you get with cdb (`!handle` on the waiters) would tell whoever picks this up exactly which producer owns the lost completion.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 13:57 UTC · original

Map update from the sibling project (byte-verified by me against the same-hash copy, cross-posted from Marvisak/VIctory#630 — where the fuller picture lives): two more deliberate stops in the title, both single-occurrence, each a specific check — (1) +0x247af2d: hard 2 MiB cap on a range (end − start + [title global +0x75e6ff2] reaching 0x1FFFFF → int3, execution continues past it, so it surfaces as a record, not a death — a candidate behind "mystery record" stops in run logs); (2) +0x19f4f58: bring-up gate — a byte-returning routine +0x2478440 whose failure int3s everything after it (same routine reaches device-table slots 0x1c8/0x218). And a refinement for the 8 GB crowd: the +0x193e00f fatal is specifically a failed call [rax+0x428] through the device table (disassembled: +0x193dff8) into the reporting routine at +0x4e9b660 — so the question is which call sits at device-table slot 0x428 in our wrapper, and whether that single site could degrade instead of killing the process. Shared-site map: VIctory#630.

**@⁠pickles976** on GitHub · 2026-11-24 13:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7133590669) Map update from the sibling project (byte-verified by me against the same-hash copy, cross-posted from Marvisak/VIctory#630 — where the fuller picture lives): two more **deliberate stops** in the title, both single-occurrence, each a specific check — (1) `+0x247af2d`: hard **2 MiB cap** on a range (`end − start + [title global +0x75e6ff2]` reaching `0x1FFFFF` → `int3`, execution continues past it, so it surfaces as a *record*, not a death — a candidate behind "mystery record" stops in run logs); (2) `+0x19f4f58`: bring-up gate — a byte-returning routine `+0x2478440` whose failure `int3`s everything after it (same routine reaches device-table slots `0x1c8`/`0x218`). And a refinement for the 8 GB crowd: the `+0x193e00f` fatal is specifically a failed **`call [rax+0x428]`** through the device table (disassembled: `+0x193dff8`) into the reporting routine at `+0x4e9b660` — so the question is which call sits at device-table slot `0x428` in our wrapper, and whether that single site could degrade instead of killing the process. Shared-site map: VIctory#630.
Author
Owner

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

Tooling note for everyone in this thread who has been hand-patching builds (the modified-build A/Bs): the sibling runtime just opened a first-class knob for exactly this — Marvisak/VIctory#917, VICTORY_PATCH=<module>:<rva>:<bytes>, runtime byte-patch into the loaded title, no rebuild. I posted the bypass table for the five-site kill-map there (full version with cautions in that thread); the short form for our hunters: +0x23cf683 NOP×11 = past-the-watchdog (distinguishes transient stall from truly-lost completion — the question this thread exists to answer); +0x193e00f NOP = past-the-OOM-fatal, the first trip after it names the real dependency of the placed resource (8 GB cohort gold); +0x247af2d NOP = past-the-2 MiB-cap as a clean continuation (separates "record noise" from walls). Same image hash both sides, so any reading a sibling run produces is directly transferable — worth a cross-post when someone gets one.

**@⁠pickles976** on GitHub · 2026-11-24 14:11 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7133981754) Tooling note for everyone in this thread who has been **hand-patching builds** (the modified-build A/Bs): the sibling runtime just opened a first-class knob for exactly this — Marvisak/VIctory#917, `VICTORY_PATCH=<module>:<rva>:<bytes>`, runtime byte-patch into the loaded title, no rebuild. I posted the bypass table for the five-site kill-map there (full version with cautions in that thread); the short form for our hunters: `+0x23cf683` NOP×11 = past-the-watchdog (distinguishes transient stall from truly-lost completion — the question this thread exists to answer); `+0x193e00f` NOP = past-the-OOM-fatal, the *first* trip after it names the real dependency of the placed resource (8 GB cohort gold); `+0x247af2d` NOP = past-the-2 MiB-cap as a clean continuation (separates "record noise" from walls). Same image hash both sides, so any reading a sibling run produces is directly transferable — worth a cross-post when someone gets one.
Author
Owner

@⁠Rednaxeh on GitHub · 2026-11-24 14:20 UTC · original

RDNA3 on main 930e8b4 (with 25c6f7e "a big pipeline build the title waits for does not wait for its turn" and 9a272d4 "a DXC compile the title waits for does not queue for memory"): the stop is the same here. RX 7800 XT, driver 32.0.32029.2010, release, same command as my runs above (XCL_NETWORK=0 XCL_RUN_SECONDS=300 XCL_ACTIVITY=1 XCL_TRACE_FAULTS=1 XCL_THREAD_DUMP_AT=90,110,150,200, A at ~13 s), warm DXIL cache.

  • Intro at 60 presents / 2 s to 48 s, loading from ~50 s, presents at 0 from 88 s, the watchdog write at +0x23cf683 at 114.3 s (115 s with #891's base, 105 s on 1c87b1d).
  • Dumps at 90 s and 110 s, identical: 4 title threads in pso_async::resolve_wait ← resolve_for_bind ← bind::set_pipeline_state (resolved with the build's PDB), 45 title threads in their own waits, one thread inside amdxc64.dll (the driver compiling), the rest of XCL idle. No title thread in vram::place_on_pages / CreateReservedResource in either dump, so #1268's cost does not show on this card at this stage.
  • Builds the title waited for, from the log: 23.3 s (580 KB DXIL, 67.9 s), 21.2 s (995 KB, 44.6 s), 14.1 s (361 KB, 104.0 s), 9.8 s (829 KB, 23.5 s); 82 s of compute builds in total on title threads in a 114 s run. Commit 28.8 GB, local VRAM 14.0 GB at the end.

So removing the queueing does not change the picture on AMD: the bind still waits for the driver's own compile of that program, and AMD's compiler takes 14–23 s for the biggest ones. Logs and dumps kept.

AI use: Claude Code (Claude Fable 5.1) read the log and the dumps; the run was mine.

**@⁠Rednaxeh** on GitHub · 2026-11-24 14:20 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7134221011) RDNA3 on `main` `930e8b4` (with `25c6f7e` "a big pipeline build the title waits for does not wait for its turn" and `9a272d4` "a DXC compile the title waits for does not queue for memory"): **the stop is the same here.** RX 7800 XT, driver 32.0.32029.2010, release, same command as my runs above (`XCL_NETWORK=0 XCL_RUN_SECONDS=300 XCL_ACTIVITY=1 XCL_TRACE_FAULTS=1 XCL_THREAD_DUMP_AT=90,110,150,200`, A at ~13 s), warm DXIL cache. - Intro at 60 presents / 2 s to 48 s, loading from ~50 s, presents at 0 from 88 s, the watchdog write at `+0x23cf683` at **114.3 s** (115 s with #891's base, 105 s on `1c87b1d`). - Dumps at 90 s and 110 s, identical: **4 title threads in `pso_async::resolve_wait` ← `resolve_for_bind` ← `bind::set_pipeline_state`** (resolved with the build's PDB), 45 title threads in their own waits, one thread inside `amdxc64.dll` (the driver compiling), the rest of XCL idle. No title thread in `vram::place_on_pages` / `CreateReservedResource` in either dump, so #1268's cost does not show on this card at this stage. - Builds the title waited for, from the log: 23.3 s (580 KB DXIL, 67.9 s), 21.2 s (995 KB, 44.6 s), 14.1 s (361 KB, 104.0 s), 9.8 s (829 KB, 23.5 s); 82 s of compute builds in total on title threads in a 114 s run. Commit 28.8 GB, local VRAM 14.0 GB at the end. So removing the queueing does not change the picture on AMD: the bind still waits for the driver's own compile of that program, and AMD's compiler takes 14–23 s for the biggest ones. Logs and dumps kept. AI use: Claude Code (Claude Fable 5.1) read the log and the dumps; the run was mine.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 14:59 UTC · original

One-liner for the stall-hunters with a concrete address, from the shared map (details on Marvisak/VIctory#630): the title keeps a 17-subsystem bring-up ready bitmap at image-relative +0x75E74EE (plus pointer globals +0x75E74E0/E8, slot counter +0x75E74F0; the 2 MiB-cap parameter sits at +0x75E6FF0). Any stalled run answers "did everything come up?" with one 16-byte read at base+0x75E74E0 — worth putting in the same snapshot as the XCL_STALL_SECONDS=8 dumps in #675, since a short bitmap at the stop would reframe the stall from "lost completion" to "subsystem never marked ready".

**@⁠pickles976** on GitHub · 2026-11-24 14:59 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7135288238) One-liner for the stall-hunters with a concrete address, from the shared map (details on Marvisak/VIctory#630): the title keeps a **17-subsystem bring-up ready bitmap at image-relative `+0x75E74EE`** (plus pointer globals `+0x75E74E0/E8`, slot counter `+0x75E74F0`; the 2 MiB-cap parameter sits at `+0x75E6FF0`). Any stalled run answers "did everything come up?" with one 16-byte read at `base+0x75E74E0` — worth putting in the same snapshot as the `XCL_STALL_SECONDS=8` dumps in #675, since a short bitmap at the stop would reframe the stall from "lost completion" to "subsystem never marked ready".
Author
Owner

@⁠Linox-IDK on GitHub · 2026-11-24 15:59 UTC · original

Another data point for this crash, on an RTX 5060 Ti, plain main (930e8b4), no local merges.

Setup

  • GPU: NVIDIA GeForce RTX 5060 Ti (about 7.9 GB VRAM), driver 32.0.16.2124
  • CPU: Ryzen 5 9600X, 31 GB RAM, Windows 11 (build 26300)
  • XCL: release build of 930e8b4 (main), no local patches
  • Title: RockstarGamesInc.28872443D20A7, Series package 1.0.2.1
  • Env: XCL_NETWORK=0, XCL_ACTIVITY=1; lazy pipelines (default)

What happens

The title reaches gameplay, runs about 2 minutes (30 fps, intro and audio fine, about 17,000 Opus packets decoded, 0 errors) and then crashes:

unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) rax=0x0 rbx=0x0 rcx=0x70024c348 rdx=0x1 ...
Game exited with code 0xc0000005
  • Last lines before the crash: console code so far: 16374 draws with translated pipelines (0 skipped), 4096 dispatches, then split command list (type 2) around mid-list Wait after Write64 (#1).
  • Same 40 mesh pipeline with its MS ... in the AS slot - refused errors (minimap) as in #232.
  • 10 [STUB] calls (e.g. ID3D12GraphicsCommandList10::#132).
  • After the crash the process hangs holding about 29 GB committed (about 14.3 GB local and 4.6 GB non-local video memory), so I have to kill it.
  • Reproduced in 3 runs at the same address. A 4th run did not hit it. It ended earlier with memory allocation of 2293760 bytes failed (XCL's own allocator) at about 19 GB committed.

Questions

  • Is this the same cause as #534, #232 and #159 (timing or pipeline-build state)?
  • Memory: about 28.7 GB committed on a 7.9 GB card (video memory spills to system RAM). Is there a recommended XCL_VRAM_ARENAS setting for 8 GB cards?

Logs available: run_20261124_164501.err.log and .out.log. I can run with XCL_TRACE_MEM or other diagnostics if that helps. No game files attached.

**@⁠Linox-IDK** on GitHub · 2026-11-24 15:59 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7136947658) Another data point for this crash, on an RTX 5060 Ti, plain main (`930e8b4`), no local merges. ## Setup - GPU: NVIDIA GeForce RTX 5060 Ti (about 7.9 GB VRAM), driver 32.0.16.2124 - CPU: Ryzen 5 9600X, 31 GB RAM, Windows 11 (build 26300) - XCL: release build of `930e8b4` (main), no local patches - Title: `RockstarGamesInc.28872443D20A7`, Series package 1.0.2.1 - Env: `XCL_NETWORK=0`, `XCL_ACTIVITY=1`; lazy pipelines (default) ## What happens The title reaches gameplay, runs about 2 minutes (30 fps, intro and audio fine, about 17,000 Opus packets decoded, 0 errors) and then crashes: ``` unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) rax=0x0 rbx=0x0 rcx=0x70024c348 rdx=0x1 ... Game exited with code 0xc0000005 ``` - Last lines before the crash: `console code so far: 16374 draws with translated pipelines (0 skipped), 4096 dispatches`, then `split command list (type 2) around mid-list Wait after Write64 (#1)`. - Same 40 `mesh pipeline with its MS ... in the AS slot - refused` errors (minimap) as in #232. - 10 `[STUB]` calls (e.g. `ID3D12GraphicsCommandList10::#132`). - After the crash the process hangs holding about 29 GB committed (about 14.3 GB local and 4.6 GB non-local video memory), so I have to kill it. - Reproduced in 3 runs at the same address. A 4th run did not hit it. It ended earlier with `memory allocation of 2293760 bytes failed` (XCL's own allocator) at about 19 GB committed. ## Questions - Is this the same cause as #534, #232 and #159 (timing or pipeline-build state)? - Memory: about 28.7 GB committed on a 7.9 GB card (video memory spills to system RAM). Is there a recommended `XCL_VRAM_ARENAS` setting for 8 GB cards? Logs available: run_20261124_164501.err.log and .out.log. I can run with `XCL_TRACE_MEM` or other diagnostics if that helps. No game files attached.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 16:05 UTC · original

Answering both questions from the static side (hash-matched copy, and I have mapped this exact fault):

1. Same cause, yes — and your 4th run is the tell, not a contradiction. exe+0x23cf683 is a deliberate title watchdog, not a wild pointer: an 11-byte mov qword [0], imm32 designed to fault (map + byte-verification in Marvisak/VIctory#630; same site now confirmed on NVIDIA, RDNA2, RDNA3 and RDNA4 across both sibling runtimes). It fires after a present stall ~2 min in — the shared wall, not your hardware. The run-4 allocator OOM at the same elapsed time is the same memory pressure exiting through a different door: on a 7.9 GB card it's a coin flip whether the watchdog or the allocator dies first, and 3/4 vs 1/4 is exactly that coin.

2. Memory: the recommended setting for 8 GB cards is the opposite direction of the knob you found. Read from source: XCL_VRAM_ARENAS disables placement of title textures on the title's own pages and forces every texture into per-address arenas (vram.rs:678/693) — that increases physical VRAM demand on a tight card. Leave it unset; your 4.6 GB non-local video memory shows the spillover path working as designed. The actual over-planning is upstream: xcl hands the title the console's texture budget by default — config.rs:117: title_memory_mb = 0 means 13,824 MiB on a Series X profile — 1.7× your card. Set title_memory_mb = 6144 (host minus desktop headroom) as the one-variable A/B; this is the same trap #1337 documented on a 5060 Laptop, and run-4's 2,293,760 bytes failed is what over-planning looks like when it wins the race. Then expect a residual: #549 is still open (enqueue-time page-array snapshot), so check whether anything left in your logs is the 0x89240009 signature before filing whatever remains as new.

Post-crash the process holding ~29 GB committed until killed: noted, and consistent with teardown after a mid-frame stall — but log it on whichever thread ends up owning the stall itself; the number is useful evidence there, not its own bug.

**@⁠pickles976** on GitHub · 2026-11-24 16:05 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7137115250) Answering both questions from the static side (hash-matched copy, and I have mapped this exact fault): **1. Same cause, yes — and your 4th run is the tell, not a contradiction.** `exe+0x23cf683` is a **deliberate title watchdog**, not a wild pointer: an 11-byte `mov qword [0], imm32` designed to fault (map + byte-verification in Marvisak/VIctory#630; same site now confirmed on NVIDIA, RDNA2, RDNA3 and RDNA4 across both sibling runtimes). It fires after a present stall ~2 min in — the shared wall, not your hardware. The run-4 allocator OOM at the same elapsed time is the **same memory pressure exiting through a different door**: on a 7.9 GB card it's a coin flip whether the watchdog or the allocator dies first, and 3/4 vs 1/4 is exactly that coin. **2. Memory: the recommended setting for 8 GB cards is the opposite direction of the knob you found.** Read from source: `XCL_VRAM_ARENAS` **disables** placement of title textures on the title's own pages and forces every texture into per-address arenas (`vram.rs:678/693`) — that *increases* physical VRAM demand on a tight card. Leave it unset; your 4.6 GB non-local video memory shows the spillover path working as designed. The actual over-planning is upstream: xcl hands the title the **console's** texture budget by default — `config.rs:117`: `title_memory_mb = 0` means **13,824 MiB on a Series X profile** — 1.7× your card. Set **`title_memory_mb = 6144`** (host minus desktop headroom) as the one-variable A/B; this is the same trap #1337 documented on a 5060 Laptop, and run-4's `2,293,760 bytes failed` is what over-planning looks like when it wins the race. Then expect a residual: #549 is still open (enqueue-time page-array snapshot), so check whether anything left in your logs is the `0x89240009` signature before filing whatever remains as new. Post-crash the process holding ~29 GB committed until killed: noted, and consistent with teardown after a mid-frame stall — but log it on whichever thread ends up owning the stall itself; the number is useful evidence there, not its own bug.
Author
Owner

@⁠Rednaxeh on GitHub · 2026-11-24 23:57 UTC · original

RDNA3 measurements on today's main (#1288, #1524, #1321, #1426/#1748 in), with what the driver-blob cache does on AMD. RX 7800 XT 16 GB (driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB RAM, Windows 11 26300, release builds, retail title, XCL_NETWORK=0, A at ~13 s, XCL_PSO_TRACE=1, the process under a 43 GB job commit limit so the machine survives. Tree for the 600 s runs: main b9b6ea6 + #1321's commit (then unmerged); the two 300 s runs at the end: main 689f2db.

1. With #1288 the watchdog is gone; the load is bound by the driver's compiles of the title's own binds. No run ended before its time; all of them show a black screen from ~60 s to the end, with the title's binding threads building compute programs in the driver 10–30 s each, 1–4 threads at a time.

run (600 s) last second with frames compiles ≥ 1 s: preload workers / title threads driver time (≥ 1 s compiles) peak commit
defaults, preload off (XCL_PSO_PRELOAD=0) 84 s 0 / 110 546 s 42.0 GB
defaults, preload on 182 s 34 / 24 889 s 42.4 GB
XCL_HUGE_PSO_CONCURRENCY=4 80 s 35 / 10 1146 s 43.0 GB
the two runs after it, defaults 84 s 15 / 12, 13 / 8 992 s, 959 s 42.9 GB
  • The preload of #690 is what keeps the title rendering during the first minutes (60 fps to 182 s against 84 s), as long as its workers stay ahead of the binds.
  • More lanes do not help here: four huge compiles at once make each one slower (mean 25.5 s against 15.3 s, longest 119 s against 39 s), so the binds wait longer and the frames stop earlier.
  • A second run reuses the blobs of the first (257 "the driver's blob of an earlier build" in ms) and still meets 78 new programs taking ≥ 1 s: the title's set is not exhausted in 10 minutes.

2. The two giant programs are refused by this driver in both forms, in every run. CS_ScreenProbes_ActivateRays (record 95cc13288a27a96e) and ActivateProbes (56c0cd3b82a00c6e): 13.8 MB and 22.8 MB of DXIL on the HLSL path (#1321), 3.9 MB each with XCL_DIRECT_DXIL=1 (#1748). The driver takes 15–33 s and ~15 GB of commit on each and answers E_OUTOFMEMORY (confirmed alone with xcl shaders --measure-pso 95cc13288a27a96e: 0x8007000E); their dispatches are skipped, and nothing was logged about it – #1918 adds the line. On 32 GB that compile also decides whether the process lives: started in the background at 4 s by the giant lane of #1524, it ran the process into the commit limit at 28–34 s in three runs (XCL_HUGE_PSO_CONCURRENCY=4 twice, defaults once; a title thread's page could not be committed) – #1924 holds such a compile back until a game thread binds it.

3. The coherent-window cliff of #505 is not what stalls this card. On main 689f2db with the defaults, 300 s: 0 GPU queue.Wait … did not complete in the whole run (the RTX 5080 in #505 had 326). With XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512: on 689f2db XCL itself ends at 44 s in title_textures::refresh reading a GPU-heap page that is now outside the window (the fault #751 fixes; with #751's commit on 20cf130 the run goes on); with #751, 300 s, coherent 64/512 MB: frames stop at 80 s as with the defaults, 0 GPU timeouts, 10 compiles ≥ 1 s taking 461 s of driver time (the longest 135 s), the title's threads in the driver at the dumps. So the window changes nothing here: what the binds wait for is the compiler.

4. The driver-blob cache does not carry an AMD compile across processes. xcl shaders … --precompile --only cs --pipelines left 999 .pso files of 954 bytes each: on this driver the blob is a key into the driver's own per-application cache (%LOCALAPPDATA%\AMD\DxcCache\<a>.<app>.*.parc), and xcl shaders and xcl run get different <app> files. In the next run every big program was "the driver's blob of an earlier build" and still took 5–62 s. Only blobs kept by an earlier xcl run come back in ms, so the README line for --pipelines does not hold on AMD, and the only cache that warms up is the one a run fills itself.

What this leaves on this card: no crash any more, a load that outlasts a 10-minute run, two programs the driver cannot build at all, and a compiler that takes 10–135 s per large program where the RTX 5080 in #505 takes 0.22 s for the longest of all 2 689. Fewer or smaller programs (#1269, #1901) is the lever that is left; the preload is worth keeping ahead of the binds. Logs of every run kept; I can post any of them.

AI use: Claude Code (Claude Fable 5.1) read the logs and the cache folders and wrote this comment; the runs were mine.

**@⁠Rednaxeh** on GitHub · 2026-11-24 23:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/232#issuecomment-7147988812) RDNA3 measurements on today's `main` (#1288, #1524, #1321, #1426/#1748 in), with what the driver-blob cache does on AMD. RX 7800 XT 16 GB (driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB RAM, Windows 11 26300, release builds, retail title, `XCL_NETWORK=0`, A at ~13 s, `XCL_PSO_TRACE=1`, the process under a 43 GB job commit limit so the machine survives. Tree for the 600 s runs: `main` `b9b6ea6` + #1321's commit (then unmerged); the two 300 s runs at the end: `main` `689f2db`. **1. With #1288 the watchdog is gone; the load is bound by the driver's compiles of the title's own binds.** No run ended before its time; all of them show a black screen from ~60 s to the end, with the title's binding threads building compute programs in the driver 10–30 s each, 1–4 threads at a time. | run (600 s) | last second with frames | compiles ≥ 1 s: preload workers / title threads | driver time (≥ 1 s compiles) | peak commit | |---|---|---|---|---| | defaults, preload off (`XCL_PSO_PRELOAD=0`) | 84 s | 0 / 110 | 546 s | 42.0 GB | | defaults, preload on | 182 s | 34 / 24 | 889 s | 42.4 GB | | `XCL_HUGE_PSO_CONCURRENCY=4` | 80 s | 35 / 10 | 1146 s | 43.0 GB | | the two runs after it, defaults | 84 s | 15 / 12, 13 / 8 | 992 s, 959 s | 42.9 GB | - The preload of #690 is what keeps the title rendering during the first minutes (60 fps to 182 s against 84 s), as long as its workers stay ahead of the binds. - More lanes do not help here: four huge compiles at once make each one slower (mean 25.5 s against 15.3 s, longest 119 s against 39 s), so the binds wait longer and the frames stop earlier. - A second run reuses the blobs of the first (257 "the driver's blob of an earlier build" in ms) and still meets 78 new programs taking ≥ 1 s: the title's set is not exhausted in 10 minutes. **2. The two giant programs are refused by this driver in both forms, in every run.** `CS_ScreenProbes_ActivateRays` (record `95cc13288a27a96e`) and `ActivateProbes` (`56c0cd3b82a00c6e`): 13.8 MB and 22.8 MB of DXIL on the HLSL path (#1321), 3.9 MB each with `XCL_DIRECT_DXIL=1` (#1748). The driver takes 15–33 s and ~15 GB of commit on each and answers E_OUTOFMEMORY (confirmed alone with `xcl shaders --measure-pso 95cc13288a27a96e`: `0x8007000E`); their dispatches are skipped, and nothing was logged about it – #1918 adds the line. On 32 GB that compile also decides whether the process lives: started in the background at 4 s by the giant lane of #1524, it ran the process into the commit limit at 28–34 s in three runs (`XCL_HUGE_PSO_CONCURRENCY=4` twice, defaults once; a title thread's page could not be committed) – #1924 holds such a compile back until a game thread binds it. **3. The coherent-window cliff of #505 is not what stalls this card.** On `main` `689f2db` with the defaults, 300 s: 0 `GPU queue.Wait … did not complete` in the whole run (the RTX 5080 in #505 had 326). With `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512`: on `689f2db` XCL itself ends at 44 s in `title_textures::refresh` reading a GPU-heap page that is now outside the window (the fault #751 fixes; with #751's commit on `20cf130` the run goes on); with #751, 300 s, `coherent 64/512 MB`: frames stop at 80 s as with the defaults, 0 GPU timeouts, 10 compiles ≥ 1 s taking 461 s of driver time (the longest 135 s), the title's threads in the driver at the dumps. So the window changes nothing here: what the binds wait for is the compiler. **4. The driver-blob cache does not carry an AMD compile across processes.** `xcl shaders … --precompile --only cs --pipelines` left 999 `.pso` files of **954 bytes each**: on this driver the blob is a key into the driver's own per-application cache (`%LOCALAPPDATA%\AMD\DxcCache\<a>.<app>.*.parc`), and `xcl shaders` and `xcl run` get different `<app>` files. In the next run every big program was "the driver's blob of an earlier build" and still took 5–62 s. Only blobs kept by an earlier `xcl run` come back in ms, so the README line for `--pipelines` does not hold on AMD, and the only cache that warms up is the one a run fills itself. **What this leaves on this card:** no crash any more, a load that outlasts a 10-minute run, two programs the driver cannot build at all, and a compiler that takes 10–135 s per large program where the RTX 5080 in #505 takes 0.22 s for the longest of all 2 689. Fewer or smaller programs (#1269, #1901) is the lever that is left; the preload is worth keeping ahead of the binds. Logs of every run kept; I can post any of them. AI use: Claude Code (Claude Fable 5.1) read the logs and the cache folders and wrote this comment; the runs were mine.
This discussion has been locked. Commenting is limited to contributors.
No description provided.