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

Open
opened 2026-11-24 08:12:53 +00:00 by oeirughrepuiohg · 14 comments
oeirughrepuiohg commented 2026-11-24 08:12:53 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by oeirughrepuiohg on 2026-11-24T08:12:53Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:6577482222 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/916). Originally posted by [oeirughrepuiohg](https://github.com/oeirughrepuiohg) on 2026-11-24T08:12:53Z. --- **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 commented 2026-11-24 09:07:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by oeirughrepuiohg on 2026-11-24T08:15:25Z.


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

<!-- greyfinch-sync:ivall/xcl:comment:7125913935 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/issues/916#issuecomment-7125913935). Originally posted by [oeirughrepuiohg](https://github.com/oeirughrepuiohg) on 2026-11-24T08:15:25Z. --- 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 commented 2026-11-24 09:07:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by oeirughrepuiohg on 2026-11-24T08:20:21Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7126013027 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/issues/916#issuecomment-7126013027). Originally posted by [oeirughrepuiohg](https://github.com/oeirughrepuiohg) on 2026-11-24T08:20:21Z. --- 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 commented 2026-11-24 13:03:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by oeirughrepuiohg on 2026-11-24T13:00:03Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7132208517 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/issues/916#issuecomment-7132208517). Originally posted by [oeirughrepuiohg](https://github.com/oeirughrepuiohg) on 2026-11-24T13:00:03Z. --- 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.
Royalflamejlh commented 2026-11-24 15:06:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-24T14:51:47Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7135071857 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/issues/916#issuecomment-7135071857). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-11-24T14:51:47Z. --- 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.
tylerstraub commented 2026-11-25 00:08:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by tylerstraub on 2026-11-24T23:23:49Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7147351519 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7147351519). Originally posted by [tylerstraub](https://github.com/tylerstraub) on 2026-11-24T23:23:49Z. --- **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://github.com/xcl-dev/xcl/issues/505#issuecomment-7147351097) (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.
oeirughrepuiohg commented 2026-11-25 00:09:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by oeirughrepuiohg on 2026-11-24T23:47:28Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7147797879 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7147797879). Originally posted by [oeirughrepuiohg](https://github.com/oeirughrepuiohg) on 2026-11-24T23:47:28Z. --- 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.
humsterbumster commented 2026-11-25 03:05:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by humsterbumster on 2026-11-25T02:57:37Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7151421358 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7151421358). Originally posted by [humsterbumster](https://github.com/humsterbumster) on 2026-11-25T02:57:37Z. --- 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.*
pr1sm-dev commented 2026-11-25 20:08:39 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by pr1sm-dev on 2026-11-25T19:32:30Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7172439677 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7172439677). Originally posted by [pr1sm-dev](https://github.com/pr1sm-dev) on 2026-11-25T19:32:30Z. --- **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.*
anon31-006459 commented 2026-11-25 23:09:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by anon31-006459 on 2026-11-25T22:12:58Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7176082337 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7176082337). Originally posted by [anon31-006459](https://github.com/anon31-006459) on 2026-11-25T22:12:58Z. --- **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.
pr1sm-dev commented 2026-11-25 23:09:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by pr1sm-dev on 2026-11-25T22:24:50Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7176331008 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7176331008). Originally posted by [pr1sm-dev](https://github.com/pr1sm-dev) on 2026-11-25T22:24:50Z. --- 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 commented 2026-11-25 23:09:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by pr1sm-dev on 2026-11-25T22:54:45Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7176930353 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7176930353). Originally posted by [pr1sm-dev](https://github.com/pr1sm-dev) on 2026-11-25T22:54:45Z. --- 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.
zeeboguy commented 2026-11-26 13:05:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by zeeboguy on 2026-11-26T13:00:28Z.


RTX 5080 16 GB / Linux, main b49be18 + #2417: the device is still lost to Xid 109 (CTX SWITCH TIMEOUT), and capping the coherent window made it come sooner. Two runs, so the timings are rough.

Setup: NVIDIA 615.78.08, Ryzen 9 5900X, 32 GB RAM, Arch (kernel 7.2), GE-Proton11-12 Wine, vkd3d-proton v3.1 + scripts/linux/vkd3d-proton-xcl.patch with #775's dxil-spirv, VKD3D_CONFIG=ignore_shared_fence. XCL b49be18 + #684 + #775 + #2417. Retail 1.0.2.1, Series X. XCL_NETWORK=0 XCL_LINK_MEM=0 XCL_TEXTURE_LEVEL_PAGES=1 XCL_VRAM_KEEP_SPARE_POOLS=0, warm driver-blob cache from an earlier --precompile --only cs --pipelines --used-only pass (XCL_LINK_MEM=0 keeps those blobs valid on b49be18).

Run A Run B (+ XCL_COHERENT_MB=512)
~30 fps on the loading art until 101 s 61 s
last present 147 s (6.5 fps over the last 300) 72 s
kernel Xid 109 CTX SWITCH TIMEOUT ~152 s ~98 s
end D3D12 device removed: 0x887a0005 at 160 s +0x23cf683 write at 0x0 at ~120 s
VRAM in use at the end 15.7 / 16.3 GB 13.6 / 16.3 GB
  • #2417 does not stop the GPU hang here. Without it, the best run on the previous main (6d12f58) lost the device at 124 s, the same way.
  • Less VRAM made it worse. The 512 MB coherent window kept VRAM about 2 GB lower all the way and the Xid came ~55 s earlier, so the hang does not look like VRAM pressure on this card.
  • Before the Xid, in both runs, the driver is building huge compute PSOs one at a time (1.2–1.6 MB of DXIL, 43–67 s each, gated). Run B also logged, only once and in that run only:
    • 93.6 s: a command list is submitted while its previous submit is still on the GPU (the same recording, the same queue; #1 so far) – the PC does not allow it (debug layer id 553)
    • 103.6 s: 1 writes after the GPU so far done although their queue had not got there after 10000 ms (fence at 2063, wanted 2064; 4 writes)

Not tested: retain_psos, XCL_PSO_WAIT_MS, Windows.

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

<!-- greyfinch-sync:ivall/xcl:comment:7192748697 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7192748697). Originally posted by [zeeboguy](https://github.com/zeeboguy) on 2026-11-26T13:00:28Z. --- **RTX 5080 16 GB / Linux, `main` `b49be18` + #2417: the device is still lost to Xid 109 (CTX SWITCH TIMEOUT), and capping the coherent window made it come sooner.** Two runs, so the timings are rough. **Setup:** NVIDIA 615.78.08, Ryzen 9 5900X, 32 GB RAM, Arch (kernel 7.2), GE-Proton11-12 Wine, vkd3d-proton v3.1 + `scripts/linux/vkd3d-proton-xcl.patch` with #775's dxil-spirv, `VKD3D_CONFIG=ignore_shared_fence`. XCL `b49be18` + #684 + #775 + #2417. Retail 1.0.2.1, Series X. `XCL_NETWORK=0 XCL_LINK_MEM=0 XCL_TEXTURE_LEVEL_PAGES=1 XCL_VRAM_KEEP_SPARE_POOLS=0`, warm driver-blob cache from an earlier `--precompile --only cs --pipelines --used-only` pass (`XCL_LINK_MEM=0` keeps those blobs valid on `b49be18`). | | Run A | Run B (+ `XCL_COHERENT_MB=512`) | |---|---|---| | ~30 fps on the loading art until | 101 s | 61 s | | last present | 147 s (6.5 fps over the last 300) | 72 s | | kernel Xid 109 CTX SWITCH TIMEOUT | ~152 s | ~98 s | | end | `D3D12 device removed: 0x887a0005` at 160 s | `+0x23cf683` write at 0x0 at ~120 s | | VRAM in use at the end | 15.7 / 16.3 GB | 13.6 / 16.3 GB | - **#2417 does not stop the GPU hang here.** Without it, the best run on the previous `main` (`6d12f58`) lost the device at 124 s, the same way. - **Less VRAM made it worse.** The 512 MB coherent window kept VRAM about 2 GB lower all the way and the Xid came ~55 s earlier, so the hang does not look like VRAM pressure on this card. - **Before the Xid**, in both runs, the driver is building huge compute PSOs one at a time (1.2–1.6 MB of DXIL, 43–67 s each, `gated`). Run B also logged, only once and in that run only: - 93.6 s: `a command list is submitted while its previous submit is still on the GPU (the same recording, the same queue; #1 so far) – the PC does not allow it (debug layer id 553)` - 103.6 s: `1 writes after the GPU so far done although their queue had not got there after 10000 ms (fence at 2063, wanted 2064; 4 writes)` **Not tested:** `retain_psos`, `XCL_PSO_WAIT_MS`, Windows. **AI use:** Claude Code (Claude Opus 5.5) built the tree, ran the title and drafted this; I reviewed it before posting.
zeeboguy commented 2026-11-26 14:03:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by zeeboguy on 2026-11-26T13:34:18Z.


Follow-up to my RTX 5080 runs above: with vkd3d-proton master instead of v3.1 the Xid 109 is gone. Same tree, same switches, the device was not lost in 1,002 s. One run.

The only change: vkd3d-proton ec207194 (master, 2026-11-24; dxil-spirv 7c04863) + scripts/linux/vkd3d-proton-xcl.patch, which applies to it unchanged, -Db_ndebug=true, built with scripts/linux/build-vkd3d-proton.sh (VKD3D_PROTON_REF=master DXIL_SPIRV_REF=). XCL b49be18 + #684 + #775 + #2417 as before, VKD3D_CONFIG=ignore_shared_fence.

v3.1 (Run A above) ec207194
~30 fps on the loading art until 101 s 65 s
last present 147 s 111 s
kernel Xid 109 CTX SWITCH TIMEOUT ~152 s none in 1,002 s
end 0x887a0005 at 160 s none; I stopped it at 1,002 s (host RAM)
VRAM in use 13–15.7 GB 9.2–11.5 GB
  • After the last present the title keeps running (audio decodes the whole time) and XCL builds huge compute PSOs one after another: 423 driver compiles, up to 134 s each (1901248 B DXIL, 133928 ms, gated (waited 251288 ms)). vkd3d-proton's own pipeline cache was cold for the new version, which makes this run's compile wall longer than it would be warm. This is the same compile-wall black screen others report on NVIDIA.
  • The title process reached 20 GB resident by 17 minutes, on a 32 GB machine.

So on this card the Xid 109 seems to come from v3.1's side, and something on vkd3d-proton master since then avoids it (one run, so not proven). Next I'm trying nvidia-dev on the same vkd3d-proton.

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

<!-- greyfinch-sync:ivall/xcl:comment:7193535129 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7193535129). Originally posted by [zeeboguy](https://github.com/zeeboguy) on 2026-11-26T13:34:18Z. --- **Follow-up to [my RTX 5080 runs above](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7192748697): with vkd3d-proton master instead of v3.1 the Xid 109 is gone. Same tree, same switches, the device was not lost in 1,002 s.** One run. **The only change:** vkd3d-proton `ec207194` (master, 2026-11-24; dxil-spirv `7c04863`) + `scripts/linux/vkd3d-proton-xcl.patch`, which applies to it unchanged, `-Db_ndebug=true`, built with `scripts/linux/build-vkd3d-proton.sh` (`VKD3D_PROTON_REF=master DXIL_SPIRV_REF=`). XCL `b49be18` + #684 + #775 + #2417 as before, `VKD3D_CONFIG=ignore_shared_fence`. | | v3.1 (Run A above) | `ec207194` | |---|---|---| | ~30 fps on the loading art until | 101 s | 65 s | | last present | 147 s | 111 s | | kernel Xid 109 CTX SWITCH TIMEOUT | ~152 s | none in 1,002 s | | end | `0x887a0005` at 160 s | none; I stopped it at 1,002 s (host RAM) | | VRAM in use | 13–15.7 GB | 9.2–11.5 GB | - After the last present the title keeps running (audio decodes the whole time) and XCL builds huge compute PSOs one after another: 423 driver compiles, up to 134 s each (`1901248 B DXIL, 133928 ms, gated (waited 251288 ms)`). vkd3d-proton's own pipeline cache was cold for the new version, which makes this run's compile wall longer than it would be warm. This is the same compile-wall black screen others report on NVIDIA. - The title process reached 20 GB resident by 17 minutes, on a 32 GB machine. So on this card the Xid 109 seems to come from v3.1's side, and something on vkd3d-proton master since then avoids it (one run, so not proven). Next I'm trying `nvidia-dev` on the same vkd3d-proton. **AI use:** Claude Code (Claude Opus 5.5) built the tree, ran the title and drafted this; I reviewed it before posting.
St5sz2Jk commented 2026-11-28 02:34:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by St5sz2Jk on 2026-11-28T02:34:46Z.


AMD / RADV data point: the same stop as run 3 above. After the first mid-list Wait-after-Write64 split, the sparse queue falls behind, and soon after split #8 frames stop for good (0 fps, GPU idle for 22 min).

Setup: RX 9070 XT 16 GB (RDNA4, RADV, Mesa 26.3.1), Ryzen 9 5950X, 128 GB, CachyOS kernel 7.3.6, Wine 11.22, vkd3d-proton master ec207194 (-Db_ndebug=true; dxil-spirv with 0naku's fast_dominates/recursion fixes plus a local LoopMergeTracer fix), Resizable BAR on. Retail 1.0.2.1.
Build: #871 head cb3902a4 (on main f9a0cb80 + #867) + #2938 a76cc3e6 + #609 + #2229 + #684 e56dbc3f.
Env: XCL_NETWORK=0 XCL_PREPARE=0 XCL_UMA_DRIVER=mixed:1536:1792 XCL_DIRECT_DXIL=1 XCL_DECLARED_LDS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_BYTE_STORE_CS=e166372fa54a77c7 XCL_WATCH_TRAP=1.

Menus and the start of the story load run at 30 fps with DirectStorage streaming. With #684 the earlier xg::copy_from crash (#662) no longer happens. Then:

split command list (type 2) around mid-list Wait after Write64 (#1)
Wait64BitValueX at 0x42437fae8 >= 0x8ab bridged to GPU queue.Wait (waiter=q0/ty2, prod=qSome(1)/tySome(0); wait-before-signal, after_write64=false)
sparse: the queue has not reached fence value 71399 after 5 s (at 71398)      <- 8 lines after split #1
... splits #2-#4, seven more wait-before-signal bridges on 0x42437faf8..0x42437fb58 (all >= 0x8ab, waiters q0/q2/q3/q4, producer q1)
split command list (type 2) around mid-list Wait after Write64 (#8)
sparse: the queue has not reached fence value 71775 after 5 s (at 71716)      <- last advance; repeats until the run is stopped

The sparse-fence timeout is logged 406 times in this run. After split #8, the activity lines show 0 presents / 0 draws, the GPU is at 0% and VRAM stays at 13.9 GiB until the 1,500 s stop. There is no device loss and no crash. An earlier run on the same tree without #684 logged the same timeout 91 times before it ended in a stall I had blamed on PSO compiles.

So on RADV this looks like run 3's stuck fence and not the NVIDIA-specific vkQueueSubmit2 AV or device-lost. All the bridged waits are wait-before-signal on one producer queue (q1), and none of their values gets reached once the sparse queue stops. That may be useful for #3062 too: there, the 5 s bound gives up and goes on, but here the queue never gets past its fence at all.

Full console log and the guard trace are available if useful.

AI-assisted: yes. Claude Code ran the build and the title on my machine and drafted this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7232457830 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/916#issuecomment-7232457830). Originally posted by [St5sz2Jk](https://github.com/St5sz2Jk) on 2026-11-28T02:34:46Z. --- **AMD / RADV data point: the same stop as run 3 above.** After the first mid-list Wait-after-Write64 split, the sparse queue falls behind, and soon after split #8 frames stop for good (0 fps, GPU idle for 22 min). **Setup:** RX 9070 XT 16 GB (RDNA4, RADV, Mesa 26.3.1), Ryzen 9 5950X, 128 GB, CachyOS kernel 7.3.6, Wine 11.22, vkd3d-proton master `ec207194` (`-Db_ndebug=true`; dxil-spirv with 0naku's fast_dominates/recursion fixes plus a local LoopMergeTracer fix), Resizable BAR on. Retail 1.0.2.1. **Build:** #871 head `cb3902a4` (on `main` `f9a0cb80` + #867) + #2938 `a76cc3e6` + #609 + #2229 + #684 `e56dbc3f`. **Env:** `XCL_NETWORK=0 XCL_PREPARE=0 XCL_UMA_DRIVER=mixed:1536:1792 XCL_DIRECT_DXIL=1 XCL_DECLARED_LDS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_BYTE_STORE_CS=e166372fa54a77c7 XCL_WATCH_TRAP=1`. Menus and the start of the story load run at 30 fps with DirectStorage streaming. With #684 the earlier `xg::copy_from` crash (#662) no longer happens. Then: ``` split command list (type 2) around mid-list Wait after Write64 (#1) Wait64BitValueX at 0x42437fae8 >= 0x8ab bridged to GPU queue.Wait (waiter=q0/ty2, prod=qSome(1)/tySome(0); wait-before-signal, after_write64=false) sparse: the queue has not reached fence value 71399 after 5 s (at 71398) <- 8 lines after split #1 ... splits #2-#4, seven more wait-before-signal bridges on 0x42437faf8..0x42437fb58 (all >= 0x8ab, waiters q0/q2/q3/q4, producer q1) split command list (type 2) around mid-list Wait after Write64 (#8) sparse: the queue has not reached fence value 71775 after 5 s (at 71716) <- last advance; repeats until the run is stopped ``` The sparse-fence timeout is logged 406 times in this run. After split #8, the activity lines show 0 presents / 0 draws, the GPU is at 0% and VRAM stays at 13.9 GiB until the 1,500 s stop. There is no device loss and no crash. An earlier run on the same tree without #684 logged the same timeout 91 times before it ended in a stall I had blamed on PSO compiles. So on RADV this looks like run 3's stuck fence and not the NVIDIA-specific `vkQueueSubmit2` AV or device-lost. All the bridged waits are wait-before-signal on one producer queue (q1), and none of their values gets reached once the sparse queue stops. That may be useful for #3062 too: there, the 5 s bound gives up and goes on, but here the queue never gets past its fence at all. Full console log and the guard trace are available if useful. AI-assisted: yes. Claude Code ran the build and the title on my machine and drafted this comment.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl#910
No description provided.