Linux + NVIDIA: world load fails right after the 4th mid-list Wait-after-Write64 split (vkQueueSubmit2 AV / device lost / stuck fence) #916

Open
opened 2026-11-26 04:36:42 +00:00 by github-bot · 11 comments
Owner

@⁠oeirughrepuiohg on GitHub · 2026-11-24 08:12 UTC · original

Linux (Wine + vkd3d-proton) + NVIDIA: every world load fails right after the 4th "split command list around mid-list Wait after Write64"

Setup: RTX 4070 Ti 12 GB (620.70.06), Fedora 45 kernel 7.3, GE-Proton11-14 Wine, vkd3d-proton cae8353e + scripts/linux/vkd3d-proton-xcl.patch (-Db_ndebug=true), VKD3D_CONFIG=ignore_shared_fence. Settings: XCL_PAGE_BUDGET_MB=4096 (#640), XCL_PSO_WAIT_MS=50 (#891), XCL_BIG_COMPILES=1, XCL_COHERENT_MB=1024; the title's stall watchdog disarmed locally so the runs do not end on it.

In three back-to-back runs that reach the world load (menus and loading at ~28-30 fps), the log shows exactly four split command list (type 2) around mid-list Wait after Write64 (#1..#4) (the #797 path), and what goes wrong starts after #4 every time. (Correction: the log prints splits #1-#4 and then only powers of two, so "after #4" means after the 4th split and before an 8th; no run reached #8, so the failure comes within splits 5-7 or right after #4.)

run build right after split #4
1 main 1ec4c98 + #793 #820 #759 #640 #889 #891 #826 err:vulkan:vkQueueSubmit2 Exception 0xc0000005 in Unix call, process ends
2 main 09940bb + same set 1 allocator resets so far with recordings still held or on the GPU – another PC allocator took …, then vkWaitSemaphores failed, vr -4 (device lost)
3 run 2 + #541 sparse: the queue has not reached fence value N after 5 s (at N-2), frames stop (0 fps), no device loss

Around them: Wait64BitValueX … bridged to GPU queue.Wait (… wait-before-signal, after_write64=false) on several queues waiting on one producer queue. Video memory is ~11.9 of 12.3 GB at that point (page budget active), host RAM fine.

So on vkd3d-proton the mid-list split around a Write64→Wait seems to leave either a list or an allocator in use after it is handed back, or a wait the producer never signals. #708 looks aimed at the same area but does not merge with current main. Next I am running the same route with XCL_SPLIT_MIDLIST_WAIT=0 and will add the result here.

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

**@⁠oeirughrepuiohg** on GitHub · 2026-11-24 08:12 UTC · [original](https://github.com/xcl-dev/xcl/issues/916) **Linux (Wine + vkd3d-proton) + NVIDIA: every world load fails right after the 4th "split command list around mid-list Wait after Write64"** **Setup:** RTX 4070 Ti 12 GB (620.70.06), Fedora 45 kernel 7.3, GE-Proton11-14 Wine, vkd3d-proton `cae8353e` + `scripts/linux/vkd3d-proton-xcl.patch` (`-Db_ndebug=true`), `VKD3D_CONFIG=ignore_shared_fence`. Settings: `XCL_PAGE_BUDGET_MB=4096` (#640), `XCL_PSO_WAIT_MS=50` (#891), `XCL_BIG_COMPILES=1`, `XCL_COHERENT_MB=1024`; the title's stall watchdog disarmed locally so the runs do not end on it. In three back-to-back runs that reach the world load (menus and loading at ~28-30 fps), the log shows exactly four `split command list (type 2) around mid-list Wait after Write64 (#1..#4)` (the #797 path), and what goes wrong starts after `#4` every time. (Correction: the log prints splits #1-#4 and then only powers of two, so "after #4" means after the 4th split and before an 8th; no run reached #8, so the failure comes within splits 5-7 or right after #4.) | run | build | right after split #4 | |---|---|---| | 1 | `main` `1ec4c98` + #793 #820 #759 #640 #889 #891 #826 | `err:vulkan:vkQueueSubmit2 Exception 0xc0000005 in Unix call`, process ends | | 2 | `main` `09940bb` + same set | `1 allocator resets so far with recordings still held or on the GPU – another PC allocator took …`, then `vkWaitSemaphores failed, vr -4` (device lost) | | 3 | run 2 + #541 | `sparse: the queue has not reached fence value N after 5 s (at N-2)`, frames stop (0 fps), no device loss | Around them: `Wait64BitValueX … bridged to GPU queue.Wait (… wait-before-signal, after_write64=false)` on several queues waiting on one producer queue. Video memory is ~11.9 of 12.3 GB at that point (page budget active), host RAM fine. So on vkd3d-proton the mid-list split around a Write64→Wait seems to leave either a list or an allocator in use after it is handed back, or a wait the producer never signals. #708 looks aimed at the same area but does not merge with current `main`. Next I am running the same route with `XCL_SPLIT_MIDLIST_WAIT=0` and will add the result here. *AI-assisted (Claude Code). No game data attached.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:36:42 +00:00
Author
Owner

@⁠oeirughrepuiohg on GitHub · 2026-11-24 08:15 UTC · original

Result with XCL_SPLIT_MIDLIST_WAIT=0 (run 2 build + #541, same route and settings): no splits are logged, and the world load still ends in device loss (d3d12_command_queue_execute: Failed to submit queue(s), vr -4) at about the same point. So the split is not the cause on its own; it most likely only happens to sit next to whatever faults the GPU in the first world frames. I will try vkd3d-proton breadcrumbs next to find the faulting command.

AI-assisted (Claude Code).

**@⁠oeirughrepuiohg** on GitHub · 2026-11-24 08:15 UTC · [original](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7125913935) Result with `XCL_SPLIT_MIDLIST_WAIT=0` (run 2 build + #541, same route and settings): no splits are logged, and the world load still ends in device loss (`d3d12_command_queue_execute: Failed to submit queue(s), vr -4`) at about the same point. So the split is not the cause on its own; it most likely only happens to sit next to whatever faults the GPU in the first world frames. I will try vkd3d-proton breadcrumbs next to find the faulting command. *AI-assisted (Claude Code).*
Author
Owner

@⁠oeirughrepuiohg on GitHub · 2026-11-24 08:20 UTC · original

Narrowed down: the world-load failures here are GPU MMU faults in shader code, not the split. Kernel log during each device loss (runs with and without XCL_SPLIT_MIDLIST_WAIT=0, with VKD3D_CONFIG=breadcrumbs and =fault): NVRM: Xid 13 … Graphics SM Warp Exception: MMU Fault (22 warps in the last run), plus once Illegal Instruction Encoding. vkd3d-proton reports no fault address under Wine (VK_EXT_device_fault info does not come through), and breadcrumbs print nothing with an -Db_ndebug=true build.

This looks like the same class as VIctory #542 (Marvisak/VIctory): there, under Wine + vkd3d-proton on NVIDIA, every world run lost the device with Xid 13, and the fault address was a title buffer plus exactly 0x1_0000_0000 – 32-bit offset arithmetic in translated buffer loads/stores wrapping past 4 GiB. Their fix bounds raw/structured/typed buffer offsets below 2 GiB in the translated shaders. If XCL's translated buffer accesses compute offsets in 32 bits the same way, the same bound may apply. Happy to test a build.

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

**@⁠oeirughrepuiohg** on GitHub · 2026-11-24 08:20 UTC · [original](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7126013027) Narrowed down: the world-load failures here are GPU **MMU faults in shader code**, not the split. Kernel log during each device loss (runs with and without `XCL_SPLIT_MIDLIST_WAIT=0`, with `VKD3D_CONFIG=breadcrumbs` and `=fault`): `NVRM: Xid 13 … Graphics SM Warp Exception: MMU Fault` (22 warps in the last run), plus once `Illegal Instruction Encoding`. vkd3d-proton reports no fault address under Wine (`VK_EXT_device_fault` info does not come through), and breadcrumbs print nothing with an `-Db_ndebug=true` build. This looks like the same class as VIctory #542 (Marvisak/VIctory): there, under Wine + vkd3d-proton on NVIDIA, every world run lost the device with Xid 13, and the fault address was a title buffer plus exactly `0x1_0000_0000` – 32-bit offset arithmetic in translated buffer loads/stores wrapping past 4 GiB. Their fix bounds raw/structured/typed buffer offsets below 2 GiB in the translated shaders. If XCL's translated buffer accesses compute offsets in 32 bits the same way, the same bound may apply. Happy to test a build. *AI-assisted (Claude Code). No game data attached.*
Author
Owner

@⁠oeirughrepuiohg on GitHub · 2026-11-24 13:00 UTC · original

Correction to my comments above: neither the mid-list split nor a 32-bit offset wrap is the cause. What I measured since, with breadcrumbs naming the program that runs during the stall, is in #505: https://github.com/ivall/xcl/issues/505#issuecomment-7132207920

AI use: Claude Code, Claude Opus 5.5 wrote this comment.

**@⁠oeirughrepuiohg** on GitHub · 2026-11-24 13:00 UTC · [original](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7132208517) Correction to my comments above: neither the mid-list split nor a 32-bit offset wrap is the cause. What I measured since, with breadcrumbs naming the program that runs during the stall, is in #505: https://github.com/ivall/xcl/issues/505#issuecomment-7132207920 AI use: Claude Code, Claude Opus 5.5 wrote this comment.
Author
Owner

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

Data from a second Linux + NVIDIA machine, on a 12 GB and a 16 GB card: the vkQueueSubmit2 exception came here on a tree from beaa245 and in none of 14 runs on 09940bb and later, and the stuck sparse fence came in 4 of 7 runs on main with XCL_PSO_WAIT_MS=50. The kernel logged no Xid in any of these runs.

Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175, VKD3D_CONFIG=ignore_shared_fence, NVIDIA driver 615.71.09, RTX 4070 12 GB or RTX 4060 Ti 16 GB as marked. Title 1.0.2.1 from a saved profile (first-run screens done once), one A press through XCL_PRESS_AT. No page budget, the watchdog left armed. Counts are of runs that reached the world load.

The exception. Tree: beaa245 + #684 + #533 a966993 + #267 043d1f7 (both since closed), default preload. With #267's limit for a draw at 1 ms, 6 runs:

  • 3 ended with err:vulkan:vkQueueSubmit2 Exception 0xc0000005 in Unix call: at 106.5 s on the 12 GB card and at 90.3 and 109.4 s on the 16 GB card, with 9.5 and 14.6 GB of video memory in use.
  • 1 more on the 12 GB card ended at 105.3 s with exit 3 from a vkd3d-proton queue thread in winevulkan.dll; Wine's error channel was off, so the line itself is not shown.
  • The last split logged before these four was #4, #8, #8 and #4.
  • Of the other 2, one ended in a device removal (0x887a0005) and the watchdog, and one was ended by its 140 s limit.

With both limits at their 4 s default: 0 of 4 (2 per card). With only #533's compute limit at 1 ms: 0 of 1.

On later trees, all on the 16 GB card and with XCL_PSO_PRELOAD=0, it did not come in any of 14 runs: 09940bb + #684 + #533 001e37d + #751 with XCL_COMPUTE_PSO_WAIT_MS=1, which bounds draws too at that head (4 runs); 47efa2e + #684 with XCL_PSO_WAIT_MS=1 (3); 384f7f7 or 47efa2e + #684, 4 of them with #751, #850, #851 and #906 as well, with 50 ms (7). All 14 still stopped presenting and ended at the title's watchdog (#662). Both the code and the preload setting differ from the runs that faulted; I have not separated them.

The sparse fence. sparse: the queue has not reached fence value N after 5 s (at N-2) repeated every 5 s to the end in 4 of the 7 runs at 50 ms and in 0 of the 3 at 1 ms. In the 3 of those 4 that have a thread dump, the thread that submits the title's command lists was in sparse::State::upload_dirty.

Not tested: XCL_SPLIT_MIDLIST_WAIT=0; the page budget; VKD3D_CONFIG=breadcrumbs; the older tree with XCL_PSO_PRELOAD=0; native Windows; the cargo test suite.

AI use: Claude Code (Claude Fable 5.2) merged the pull requests locally, ran the title, read the logs and thread dumps and drafted this comment.

**@⁠Royalflamejlh** on GitHub · 2026-11-24 14:51 UTC · [original](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7135071857) Data from a second Linux + NVIDIA machine, on a 12 GB and a 16 GB card: the `vkQueueSubmit2` exception came here on a tree from `beaa245` and in none of 14 runs on `09940bb` and later, and the stuck sparse fence came in 4 of 7 runs on `main` with `XCL_PSO_WAIT_MS=50`. The kernel logged no Xid in any of these runs. **Setup:** Fedora 44 (kernel 7.2.9), Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175, `VKD3D_CONFIG=ignore_shared_fence`, NVIDIA driver 615.71.09, RTX 4070 12 GB or RTX 4060 Ti 16 GB as marked. Title 1.0.2.1 from a saved profile (first-run screens done once), one A press through `XCL_PRESS_AT`. No page budget, the watchdog left armed. Counts are of runs that reached the world load. **The exception.** Tree: `beaa245` + #684 + #533 `a966993` + #267 `043d1f7` (both since closed), default preload. With #267's limit for a draw at 1 ms, 6 runs: - 3 ended with `err:vulkan:vkQueueSubmit2 Exception 0xc0000005 in Unix call`: at 106.5 s on the 12 GB card and at 90.3 and 109.4 s on the 16 GB card, with 9.5 and 14.6 GB of video memory in use. - 1 more on the 12 GB card ended at 105.3 s with exit 3 from a vkd3d-proton queue thread in `winevulkan.dll`; Wine's error channel was off, so the line itself is not shown. - The last split logged before these four was #4, #8, #8 and #4. - Of the other 2, one ended in a device removal (`0x887a0005`) and the watchdog, and one was ended by its 140 s limit. With both limits at their 4 s default: 0 of 4 (2 per card). With only #533's compute limit at 1 ms: 0 of 1. On later trees, all on the 16 GB card and with `XCL_PSO_PRELOAD=0`, it did not come in any of 14 runs: `09940bb` + #684 + #533 `001e37d` + #751 with `XCL_COMPUTE_PSO_WAIT_MS=1`, which bounds draws too at that head (4 runs); `47efa2e` + #684 with `XCL_PSO_WAIT_MS=1` (3); `384f7f7` or `47efa2e` + #684, 4 of them with #751, #850, #851 and #906 as well, with 50 ms (7). All 14 still stopped presenting and ended at the title's watchdog (#662). Both the code and the preload setting differ from the runs that faulted; I have not separated them. **The sparse fence.** `sparse: the queue has not reached fence value N after 5 s (at N-2)` repeated every 5 s to the end in 4 of the 7 runs at 50 ms and in 0 of the 3 at 1 ms. In the 3 of those 4 that have a thread dump, the thread that submits the title's command lists was in `sparse::State::upload_dirty`. **Not tested:** `XCL_SPLIT_MIDLIST_WAIT=0`; the page budget; `VKD3D_CONFIG=breadcrumbs`; the older tree with `XCL_PSO_PRELOAD=0`; native Windows; the `cargo test` suite. **AI use:** Claude Code (Claude Fable 5.2) merged the pull requests locally, ran the title, read the logs and thread dumps and drafted this comment.
Author
Owner

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

Heads-up for Linux + NVIDIA runs on vkd3d-proton with dxil-spirv 53aac41: two tests of the lib suite that use 64-bit atomics time out the GPU (Xid 109, CTX SWITCH TIMEOUT) and remove the device, which then fails every later GPU test in the same process.

Setup: as in my #505 comment (RTX 5090, NVIDIA 595.99.02, Ubuntu 26.04.1, Proton Experimental 11.0-20261112, tree c4d37be + #751 + #822 + #1435).

  • gpu::dxil::ops_tests::raw_and_structured_buffer_atomics_run and gpu::recomp::tests::gpu_more_atomics_sub_dword_scratch_valu: fence still pending after 10 s, Xid 109 in the kernel log. Same result with 1 and 4 test threads.
  • Running each part of the first kernel alone: the 32-bit raw add / or / umax, the compare-exchange, the structured store and the structured atomic each finish in about 0.6 s. The 64-bit raw add (dx.op.atomicBinOp.i64) alone times out.
  • Two vkd3d-proton 3.1 builds carrying dxil-spirv 53aac41 both time out. Another local vkd3d-proton build, whose dxil-spirv revision I did not record, passes both tests on the same card and driver. The integrated Radeon (RADV) passes with the 53aac41 build.
  • A whole-suite run on this stack reports 117 failed, against 10 on the Radeon in the same sandbox. Most of the difference is the one device removal. Skip the two tests, or run them in their own process, before reading the counts.
  • None of the 681 translated programs my title runs had cached sets a 64-bit-atomic feature bit, so I don't think this is the world-load stall.

Not tested: which dxil-spirv change introduces it (I have one passing and one failing build, not a bisect), stock Proton vkd3d-proton, other NVIDIA drivers, Windows.

AI use: Claude Code (Claude Fable 5.2) ran the tests and the bisect on the machine above, and wrote and posted this comment at my request.

**@⁠tylerstraub** on GitHub · 2026-11-24 23:23 UTC · [original](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7147351519) **Heads-up for Linux + NVIDIA runs on vkd3d-proton with dxil-spirv `53aac41`: two tests of the lib suite that use 64-bit atomics time out the GPU (Xid 109, CTX SWITCH TIMEOUT) and remove the device, which then fails every later GPU test in the same process.** **Setup:** as in [my #505 comment](https://git.gtahub.st/github/xcl-dev--xcl/issues/505) (RTX 5090, NVIDIA 595.99.02, Ubuntu 26.04.1, Proton Experimental 11.0-20261112, tree `c4d37be` + #751 + #822 + #1435). - `gpu::dxil::ops_tests::raw_and_structured_buffer_atomics_run` and `gpu::recomp::tests::gpu_more_atomics_sub_dword_scratch_valu`: fence still pending after 10 s, Xid 109 in the kernel log. Same result with 1 and 4 test threads. - Running each part of the first kernel alone: the 32-bit raw add / or / umax, the compare-exchange, the structured store and the structured atomic each finish in about 0.6 s. The 64-bit raw add (`dx.op.atomicBinOp.i64`) alone times out. - Two vkd3d-proton 3.1 builds carrying dxil-spirv `53aac41` both time out. Another local vkd3d-proton build, whose dxil-spirv revision I did not record, passes both tests on the same card and driver. The integrated Radeon (RADV) passes with the `53aac41` build. - A whole-suite run on this stack reports 117 failed, against 10 on the Radeon in the same sandbox. Most of the difference is the one device removal. Skip the two tests, or run them in their own process, before reading the counts. - None of the 681 translated programs my title runs had cached sets a 64-bit-atomic feature bit, so I don't think this is the world-load stall. **Not tested:** which dxil-spirv change introduces it (I have one passing and one failing build, not a bisect), stock Proton vkd3d-proton, other NVIDIA drivers, Windows. **AI use:** Claude Code (Claude Fable 5.2) ran the tests and the bisect on the machine above, and wrote and posted this comment at my request.
Author
Owner

@⁠oeirughrepuiohg on GitHub · 2026-11-24 23:47 UTC · original

Some data for narrowing this down offline, in case it saves a bisect.

A known-revision build to compare against: GE-Proton11-14's vkd3d-proton (cae8353e) pins dxil-spirv 34f0ff84 (2026-11-20). Between it and 53aac418 there are only six commits, all structurizer traversal rewrites (5bb6460a, 3d98ce0b, 4fc48777, 3007d9a8, e6cff0bb, e74ef38c); none touches atomics.

Those six commits don't change 64-bit atomic code here. I built the dxil-spirv CLI at both revisions and converted every translated shader one Xbox title's cache holds (VIctory translations, 6,778 programs, --bindless --ssbo-uav --ssbo-srv). 63 of them declare Int64Atomics, and all 63 come out byte-identical under 34f0ff84 and 53aac418. That's real-world programs rather than your two test kernels, but it points away from the structurizer commits and towards something else that differs between your passing and failing builds (vkd3d-proton's options, or the driver: 595.99.02 there).

Not the raw access chains, for the atomic itself: dxil-spirv emits 64-bit raw atomics through a plain OpAccessChain on the storage buffer (emit_atomic_access_chain), not SPV_NV_raw_access_chains. The loads and stores around it in the same kernel do use raw access chains when the device offers them, so VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains is still a one-line check, but I wouldn't expect it to change the atomic.

Not tested: your two kernels themselves, and running anything on the GPU with either revision. RTX 4070 Ti, NVIDIA 620.70.06 here.

AI use: Claude Code (Claude Opus 5.5) built and ran these comparisons on my machine and drafted this comment.

**@⁠oeirughrepuiohg** on GitHub · 2026-11-24 23:47 UTC · [original](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7147797879) Some data for narrowing this down offline, in case it saves a bisect. **A known-revision build to compare against:** GE-Proton11-14's vkd3d-proton (`cae8353e`) pins dxil-spirv `34f0ff84` (2026-11-20). Between it and `53aac418` there are only six commits, all structurizer traversal rewrites (`5bb6460a`, `3d98ce0b`, `4fc48777`, `3007d9a8`, `e6cff0bb`, `e74ef38c`); none touches atomics. **Those six commits don't change 64-bit atomic code here.** I built the dxil-spirv CLI at both revisions and converted every translated shader one Xbox title's cache holds (VIctory translations, 6,778 programs, `--bindless --ssbo-uav --ssbo-srv`). 63 of them declare `Int64Atomics`, and all 63 come out byte-identical under `34f0ff84` and `53aac418`. That's real-world programs rather than your two test kernels, but it points away from the structurizer commits and towards something else that differs between your passing and failing builds (vkd3d-proton's options, or the driver: 595.99.02 there). **Not the raw access chains, for the atomic itself:** dxil-spirv emits 64-bit raw atomics through a plain `OpAccessChain` on the storage buffer (`emit_atomic_access_chain`), not `SPV_NV_raw_access_chains`. The loads and stores around it in the same kernel do use raw access chains when the device offers them, so `VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains` is still a one-line check, but I wouldn't expect it to change the atomic. Not tested: your two kernels themselves, and running anything on the GPU with either revision. RTX 4070 Ti, NVIDIA 620.70.06 here. AI use: Claude Code (Claude Opus 5.5) built and ran these comparisons on my machine and drafted this comment.
Author
Owner

@⁠humsterbumster on GitHub · 2026-11-25 02:57 UTC · original

Three world-load runs on a 32 GB card with the split workaround, and the two things that stop it here are not VRAM pressure.

Setup: RTX 5090 32 GB, NVIDIA 620.70.06, Arch/CachyOS kernel 7.3.5, Proton 11 (Wine 11.0), vkd3d-proton 4522cc1a8b1347f+ (the patched build, from the startup +vkd3d line), VKD3D_CONFIG=ignore_shared_fence, XCL main aa9ab8a local release build, XCL_PSO_WAIT_MS=50, XCL_PSO_PRELOAD=0, retail title 1.0.2.1 with a saved first-run profile. XCL_PSO_DISK_CACHE=0 + __GL_SHADER_DISK_CACHE=0 had to be on or the run dies earlier with #2003 (vkCreateComputePipelines Exception 0xc0000005 in Unix call), so no driver blobs and a cold NVIDIA cache in all runs below.

run settings splits what happened
1 XCL_SPLIT_MIDLIST_WAIT=0 0 reached the world-load prestream, then unhandled exception 0xc0000005 in msvcrt.dll+0xa4c9 (write at address 0x8074f5c40)
2 + XCL_PAGE_BUDGET_MB=4096 XCL_COHERENT_MB=1024 0 world-load prestream at 3.5-4 fps, process ends with status 0x3 at 200 s, stack winevulkan.dll+0x12eb2 .. d3d12core.dll+0x4d7cb <- xcl.exe+0x1531da
3 same as 2 + WINEDEBUG=err+all 0 died earlier, at 193 s, back on the #2003 signature (vkCreateComputePipelines Exception 0xc0000005 in Unix call) - Wine logging changes the timing enough to bring that one back, so the call name of the submit abort is still uncaptured

Run 1 details, from the title's own crash report: game time 4m38s, frame 5520, 2227 streaming requests outstanding, tile heap 3296 of 6236 MB, Current SRL State: Prestream for the story intro, and the fault is a 2 KiB memcpy (rsi 0x15aaf7070, rcx/rdi 0x8074f5c40, rbx 0x800) into an address 2 GB above the 32 GiB boundary of this card. Video memory at the time: 12.7-12.9 GB local, 4.5 GB non-local, so not the 9.5-14.6 GB-limited case from the 12/16 GB reports - there is plenty of VRAM left here.

Takeaways for the split theory: with the mid-list split turned off the split count is 0 in all three runs, and the submit-path abort still arrives during world-load streaming (run 2/3) - so on this tree the mid-list Wait after Write64 split is not the only trigger (and #2003 is timing-sensitive: the same build/settings that run clean at full speed abort in vkCreateComputePipelines when Wine's logging slows the PSO threads down) of the winevulkan/d3d12core abort; a queue submit during the prestream dies on its own. The prestream itself runs (draws and dispatches go out, ~4 fps).

AI-assisted (omp / DeepSeek V4.1 Flash 1017). No game data attached.

**@⁠humsterbumster** on GitHub · 2026-11-25 02:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7151421358) Three world-load runs on a 32 GB card with the split workaround, and the two things that stop it here are *not* VRAM pressure. **Setup:** RTX 5090 32 GB, NVIDIA 620.70.06, Arch/CachyOS kernel 7.3.5, Proton 11 (Wine 11.0), vkd3d-proton `4522cc1a8b1347f+` (the patched build, from the startup `+vkd3d` line), `VKD3D_CONFIG=ignore_shared_fence`, XCL `main` `aa9ab8a` local release build, `XCL_PSO_WAIT_MS=50`, `XCL_PSO_PRELOAD=0`, retail title 1.0.2.1 with a saved first-run profile. `XCL_PSO_DISK_CACHE=0` + `__GL_SHADER_DISK_CACHE=0` had to be on or the run dies earlier with #2003 (`vkCreateComputePipelines Exception 0xc0000005 in Unix call`), so no driver blobs and a cold NVIDIA cache in all runs below. | run | settings | splits | what happened | |---|---|---|---| | 1 | `XCL_SPLIT_MIDLIST_WAIT=0` | 0 | reached the world-load prestream, then `unhandled exception 0xc0000005 in msvcrt.dll+0xa4c9 (write at address 0x8074f5c40)` | | 2 | + `XCL_PAGE_BUDGET_MB=4096 XCL_COHERENT_MB=1024` | 0 | world-load prestream at 3.5-4 fps, `process ends with status 0x3` at 200 s, stack `winevulkan.dll+0x12eb2 .. d3d12core.dll+0x4d7cb <- xcl.exe+0x1531da` | | 3 | same as 2 + `WINEDEBUG=err+all` | 0 | died earlier, at 193 s, back on the #2003 signature (`vkCreateComputePipelines Exception 0xc0000005 in Unix call`) - Wine logging changes the timing enough to bring that one back, so the call name of the submit abort is still uncaptured | Run 1 details, from the title's own crash report: game time 4m38s, frame 5520, 2227 streaming requests outstanding, tile heap 3296 of 6236 MB, `Current SRL State: Prestream` for the story intro, and the fault is a 2 KiB `memcpy` (rsi 0x15aaf7070, rcx/rdi 0x8074f5c40, rbx 0x800) into an address 2 GB *above* the 32 GiB boundary of this card. Video memory at the time: 12.7-12.9 GB local, 4.5 GB non-local, so **not** the 9.5-14.6 GB-limited case from the 12/16 GB reports - there is plenty of VRAM left here. Takeaways for the split theory: with the mid-list split turned off the split count is 0 in all three runs, and the submit-path abort still arrives during world-load streaming (run 2/3) - so on this tree the mid-list `Wait after Write64` split is not the only trigger (and #2003 is timing-sensitive: the same build/settings that run clean at full speed abort in `vkCreateComputePipelines` when Wine's logging slows the PSO threads down) of the `winevulkan`/`d3d12core` abort; a queue submit during the prestream dies on its own. The prestream itself runs (draws and dispatches go out, ~4 fps). *AI-assisted (omp / DeepSeek V4.1 Flash 1017). No game data attached.*
Author
Owner

@⁠pr1sm-dev on GitHub · 2026-11-25 19:32 UTC · original

On this machine the vkQueueSubmit2 "Exception 0xc0000005 in Unix call" at the world's first indirect mesh draws goes away with VKD3D_CONFIG=…,retain_psos: 3 of 3 world starts passed with it, 4 of 5 died without it. It looks like pipelines get destroyed while a recorded command list that binds them has not been submitted yet.

Setup: RTX 3070 8 GB, NVIDIA 595.91.07, Linux 6.17, Wine 11.22, vkd3d-proton master 30b0eb9b + #257's patch + the two dxil-spirv dominator patches from #1269. This is a local tree, not clean main: upstream 06c9f55 + #2092 (two-pass mesh draws) + our own commits. Clean main does not run the two-pass mesh draws, so I could not check it there.

Measured (same command line, warm caches, 240 s each; the only change is retain_psos):

  • without: 4 of 5 world starts died in vkQueueSubmit2 on vkd3d's queue thread, each within the first 512–2,048 two-pass ExecuteIndirect(DispatchMesh) calls
  • with: 3 of 3 runs that reached the world passed 16,384–32,768 of those calls with no submit fault. A 4th run died earlier, before the first of those draws, from an unrelated GPU fault on the copy engine (Xid 31), so it counts neither way.
  • Memory over each run was the same with and without the setting.

Why (from the source; the fix itself is not tested yet):

  • vkd3d-proton only keeps a pipeline referenced by the allocator of a list that binds it when retain_psos is set (libs/vkd3d/command.c, in d3d12_command_list_SetPipelineState: if (VKD3D_CONFIG_FLAG_IS_SET(RETAIN_PSOS) && state) d3d12_command_allocator_retain_pipeline_state(...)). Otherwise the last Release runs vkDestroyPipeline at once (state.c, d3d12_pipeline_state_dec_ref).
  • XCL releases some pipelines the title cannot track:
    • the background-built real pipeline when its stand-in is released (real.rs pso_release → pso_async::released)
    • its own two-pass compute pipeline when the mesh PSO goes (forget_pso drops the TwoPassPso entry; its Drop releases compute)
  • XCL's submit timing also differs from the title's (split segments, allocators put aside by alloc_pool), so a title Release that would be safe on the console can come before a recording that binds the pipeline has been submitted.
  • late_release.rs holds only resources, and only until the queues pass a fence signalled at release time. That does not cover a recording that has not been submitted yet.

Workaround on vkd3d-proton: add retain_psos to VKD3D_CONFIG. Native D3D12 on Windows has no such switch. There, an XCL-side fix would keep a reference to each pipeline XCL binds on a PC list, held by that list's PC allocator and let go when alloc_pool really resets it (like the per-allocator memory in #1422). I can write that if it is wanted. Not done or tested yet.

AI use: found, measured and written up with Claude Code (Claude Opus 5.5); the runs are real runs on the machine above.

**@⁠pr1sm-dev** on GitHub · 2026-11-25 19:32 UTC · [original](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7172439677) **On this machine the `vkQueueSubmit2` "Exception 0xc0000005 in Unix call" at the world's first indirect mesh draws goes away with `VKD3D_CONFIG=…,retain_psos`: 3 of 3 world starts passed with it, 4 of 5 died without it.** It looks like pipelines get destroyed while a recorded command list that binds them has not been submitted yet. **Setup:** RTX 3070 8 GB, NVIDIA 595.91.07, Linux 6.17, Wine 11.22, vkd3d-proton master `30b0eb9b` + #257's patch + the two dxil-spirv dominator patches from #1269. **This is a local tree, not clean `main`:** upstream `06c9f55` + #2092 (two-pass mesh draws) + our own commits. Clean `main` does not run the two-pass mesh draws, so I could not check it there. **Measured (same command line, warm caches, 240 s each; the only change is `retain_psos`):** - without: 4 of 5 world starts died in `vkQueueSubmit2` on vkd3d's queue thread, each within the first 512–2,048 two-pass `ExecuteIndirect(DispatchMesh)` calls - with: 3 of 3 runs that reached the world passed 16,384–32,768 of those calls with no submit fault. A 4th run died earlier, before the first of those draws, from an unrelated GPU fault on the copy engine (Xid 31), so it counts neither way. - Memory over each run was the same with and without the setting. **Why (from the source; the fix itself is not tested yet):** - vkd3d-proton only keeps a pipeline referenced by the allocator of a list that binds it when `retain_psos` is set (`libs/vkd3d/command.c`, in `d3d12_command_list_SetPipelineState`: `if (VKD3D_CONFIG_FLAG_IS_SET(RETAIN_PSOS) && state) d3d12_command_allocator_retain_pipeline_state(...)`). Otherwise the last `Release` runs `vkDestroyPipeline` at once (`state.c`, `d3d12_pipeline_state_dec_ref`). - XCL releases some pipelines the title cannot track: - the background-built real pipeline when its stand-in is released (`real.rs` `pso_release` → `pso_async::released`) - its own two-pass compute pipeline when the mesh PSO goes (`forget_pso` drops the `TwoPassPso` entry; its `Drop` releases `compute`) - XCL's submit timing also differs from the title's (split segments, allocators put aside by `alloc_pool`), so a title `Release` that would be safe on the console can come before a recording that binds the pipeline has been submitted. - `late_release.rs` holds only resources, and only until the queues pass a fence signalled at release time. That does not cover a recording that has not been submitted yet. **Workaround on vkd3d-proton:** add `retain_psos` to `VKD3D_CONFIG`. Native D3D12 on Windows has no such switch. There, an XCL-side fix would keep a reference to each pipeline XCL binds on a PC list, held by that list's PC allocator and let go when `alloc_pool` really resets it (like the per-allocator memory in #1422). I can write that if it is wanted. Not done or tested yet. *AI use: found, measured and written up with Claude Code (Claude Opus 5.5); the runs are real runs on the machine above.*
Author
Owner

@⁠anon31-006459 on GitHub · 2026-11-25 22:12 UTC · original

RTX 3070 Ti 8 GB / Linux, with #795 in: two stall forms before the title's watchdog write, from 6 runs that reached the world load.

Setup: NVIDIA 595.104.02, Proton Experimental's Wine, vkd3d-proton 2576c0b (vtable checks relaxed), VKD3D_CONFIG=ignore_shared_fence,retain_psos, XCL_PSO_WAIT_MS=50. Local tree: 00cf258 + the ideas of #793 / #684, a #640 rebase, #495 and a local sync diagnostic. Retail 1.0.2.1, Series X.

1. A CPU fallback left in try_gpu_wait (1 run without the switch below: 4 × 2 s)

  • Wait64BitValueX timed out … want 0x882; memory holds 880; sync=Some((882, 882, false, …)): the fence has completed, but the CPU's view of the word lags, so completed >= w.value && !w.is_satisfied() falls back to the CPU and blocks the submit thread while compute queues wait on GPU for >= 0x882.
  • Returning Handled there (local switch, 5 runs): when it acted (2 runs) there were no CPU-wait timeouts and no new errors. It does not change the end. A CPU-side counter reset would also pass this test, so trusting the fence only when memory is a few steps behind would be safer.

2. GPU waits on Write64s that are recorded but never signalled (5 of 6 runs)

  • 2–4 releases per run, e.g. GPU queue.Wait at 0x70417f980 >= 0x946 … recorded=0x946, submitted=0x0, completed=0x0. The write was recorded into a compute list, closed at 139.2 s, and its Signal was still not submitted 42 s later.
  • A title fence was pending at the release (0x1541c10(done=0x0/sig=0x1)). The title seems to hold back the producing submission until its own fence completes, while the work behind that fence waits on the write. This matches the submitted = completed + 1 releases in #795's review.

End: +0x23cf683 in 5 runs (186–254 s), +0x2215c35 in 1 (239 s). retain_psos did not change it, and there were no Vulkan errors (err+vulkan).

Not tested: Windows, AMD, clean main, #2057; which queue owes the 0x1541c10 Signal.

AI use: Claude Code (Claude Opus 5.5) wrote the diagnostic, ran the title and drafted this; I reviewed it before posting.

**@⁠anon31-006459** on GitHub · 2026-11-25 22:12 UTC · [original](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7176082337) **RTX 3070 Ti 8 GB / Linux, with #795 in: two stall forms before the title's watchdog write, from 6 runs that reached the world load.** **Setup:** NVIDIA 595.104.02, Proton Experimental's Wine, vkd3d-proton `2576c0b` (vtable checks relaxed), `VKD3D_CONFIG=ignore_shared_fence,retain_psos`, `XCL_PSO_WAIT_MS=50`. Local tree: `00cf258` + the ideas of #793 / #684, a #640 rebase, #495 and a local sync diagnostic. Retail 1.0.2.1, Series X. **1. A CPU fallback left in `try_gpu_wait` (1 run without the switch below: 4 × 2 s)** - `Wait64BitValueX timed out … want 0x882; memory holds 880; sync=Some((882, 882, false, …))`: the fence has completed, but the CPU's view of the word lags, so `completed >= w.value && !w.is_satisfied()` falls back to the CPU and blocks the submit thread while compute queues wait on GPU for `>= 0x882`. - Returning `Handled` there (local switch, 5 runs): when it acted (2 runs) there were no CPU-wait timeouts and no new errors. It does not change the end. A CPU-side counter reset would also pass this test, so trusting the fence only when memory is a few steps behind would be safer. **2. GPU waits on Write64s that are recorded but never signalled (5 of 6 runs)** - 2–4 releases per run, e.g. `GPU queue.Wait at 0x70417f980 >= 0x946 … recorded=0x946, submitted=0x0, completed=0x0`. The write was recorded into a compute list, closed at 139.2 s, and its Signal was still not submitted 42 s later. - A title fence was pending at the release (`0x1541c10(done=0x0/sig=0x1)`). The title seems to hold back the producing submission until its own fence completes, while the work behind that fence waits on the write. This matches the `submitted = completed + 1` releases in #795's review. **End:** `+0x23cf683` in 5 runs (186–254 s), `+0x2215c35` in 1 (239 s). `retain_psos` did not change it, and there were no Vulkan errors (`err+vulkan`). **Not tested:** Windows, AMD, clean `main`, #2057; which queue owes the `0x1541c10` Signal. **AI use:** Claude Code (Claude Opus 5.5) wrote the diagnostic, ran the title and drafted this; I reviewed it before posting.
Author
Owner

@⁠pr1sm-dev on GitHub · 2026-11-25 22:24 UTC · original

I'm taking the XCL-side fix for this, so that it no longer depends on vkd3d-proton's retain_psos (and does not rely on driver behaviour on Windows either).

On main e1d84b7, when the title releases a stand-in pipeline for good, XCL releases the real pipeline behind it at once (real.rs pso_release / standin_released, and TwoPassPso::drop for the two-pass compute pipeline). PC command lists bind that real pipeline, so a list that was recorded but has not run yet can still bind a destroyed pipeline.

Plan: hold one reference to each pipeline bound on a PC list with that recording's allocator (alloc_pool), and release it when that allocator is reset or forgotten. That is the same rule retain_psos follows. Switch: XCL_RETAIN_PSOS=0. Comes with a unit test that the real pipeline behind a released stand-in lives until its recording's allocator is reset, and Linux/Wine runs without retain_psos. One small PR.

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

**@⁠pr1sm-dev** on GitHub · 2026-11-25 22:24 UTC · [original](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7176331008) I'm taking the XCL-side fix for this, so that it no longer depends on vkd3d-proton's `retain_psos` (and does not rely on driver behaviour on Windows either). On `main` `e1d84b7`, when the title releases a stand-in pipeline for good, XCL releases the real pipeline behind it at once (`real.rs` `pso_release` / `standin_released`, and `TwoPassPso::drop` for the two-pass compute pipeline). PC command lists bind that real pipeline, so a list that was recorded but has not run yet can still bind a destroyed pipeline. Plan: hold one reference to each pipeline bound on a PC list with that recording's allocator (`alloc_pool`), and release it when that allocator is reset or forgotten. That is the same rule `retain_psos` follows. Switch: `XCL_RETAIN_PSOS=0`. Comes with a unit test that the real pipeline behind a released stand-in lives until its recording's allocator is reset, and Linux/Wine runs without `retain_psos`. One small PR. AI use: Claude Code (Claude Opus 5.5) wrote this comment.
Author
Owner

@⁠pr1sm-dev on GitHub · 2026-11-25 22:54 UTC · original

Update to my comment above: #2417 (@⁠fixgep, opened before it) already covers this. It keeps the resolved background-built pipelines referenced by the command lists that bind them and puts their final release behind queue retirement. So I'm not opening a separate PR for the same thing.

For comparison only, in case the smaller shape is useful there: what I wrote locally holds one reference per pipeline bound on a PC list (in the adopted list's SetPipelineState / ClearState hooks), keyed by the PC allocator the recording is on (alloc_pool::recording_backing), and drops them where dispatch_chain::allocator_reset already runs (allocator reset or final release). That is about 100 lines outside its tests (mostly the new module and its comments), on main e1d84b7. Its unit test of the stand-in flow (title releases the stand-in, the recording still binds the real pipeline, then the allocator is reset) fails with it switched off (as main behaves) and passes with it. Measured only under Wine + vkd3d-proton on an RTX 3070 (Linux).

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

**@⁠pr1sm-dev** on GitHub · 2026-11-25 22:54 UTC · [original](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7176930353) Update to my comment above: #2417 (@⁠fixgep, opened before it) already covers this. It keeps the resolved background-built pipelines referenced by the command lists that bind them and puts their final release behind queue retirement. So I'm not opening a separate PR for the same thing. For comparison only, in case the smaller shape is useful there: what I wrote locally holds one reference per pipeline bound on a PC list (in the adopted list's `SetPipelineState` / `ClearState` hooks), keyed by the PC allocator the recording is on (`alloc_pool::recording_backing`), and drops them where `dispatch_chain::allocator_reset` already runs (allocator reset or final release). That is about 100 lines outside its tests (mostly the new module and its comments), on `main` `e1d84b7`. Its unit test of the stand-in flow (title releases the stand-in, the recording still binds the real pipeline, then the allocator is reset) fails with it switched off (as `main` behaves) and passes with it. Measured only under Wine + vkd3d-proton on an RTX 3070 (Linux). AI use: Claude Code (Claude Opus 5.5) wrote this comment.
This discussion has been locked. Commenting is limited to contributors.
No description provided.