Repository navigation
Description
On NVIDIA, the retail game stops at world load: one ExecuteCommandLists on the title's submit thread never returns, the NVIDIA user-mode driver (nvwgf2umx) recurses inside it about 1,000 levels deep, and the title thread's 1 MiB stack overflows (thread '<unknown>' has overflowed its stack, exit 0xc0000005). It happens once per run, at the same point, on both the Series X and the Series S profile.
What the evidence points to (inference, not proven yet)
- At world load the title arms
Wait64BitValueXwaits on its four compute queues (q1–q4) for a value that the graphics queue (q0) signals only in a list the title has not submitted yet. XCL bridges each one to a GPUqueue.Wait(wait-before-signal,try_gpu_waitinlist_x.rs). - The same title thread then submits more lists to one of the waiting queues. In the Series S run's dump the stuck call is the title's 16-list submission to q1, one of the queues blocked at that wait.
- Inside that call
nvwgf2umxchecks the free space of a command ring, finds too little, flushes, and the flush calls the same check again. The ring of a queue stopped at an unsatisfied fence wait never drains, so the check never passes and each level recurses deeper. The q0 list that would satisfy the wait is never submitted: the thread that would submit it is the one stuck in the driver. - XCL's GPU-wait watchdog (
XCL_GPU_WAIT_TIMEOUT_MS, default 5000 ms) would release the waits on the CPU, butwait_expiredrestarts every armed wait's clock whilepso_async::title_held()is true. Since d4c6d34 that is true during any PC call of 250 ms or more, and since 52e9014 during build holds. In these runs the title is in pipeline waits during the whole window, and then in the stuck submit itself, so the watchdog never fires (also not with a 1 s timeout).
D3D12 allows waiting on a fence before its signal is submitted, so step 2 is legal API use; the driver blocking in ExecuteCommandLists instead of queuing the work is what turns it into a deadlock. That is my reading of the dump and logs; the GPU trace that should confirm the queue state is still being analysed.
Related
- Retail game (retail title, Series X build): GPU device removal after Wait64BitValueX waits with no producer; also watchdog stalls on slow compute pipeline builds #1452: the same pattern of waits with an unsubmitted producer, reported there as device removal on an RTX 3060 (the 5 s release fired in those runs).
- D3D12.X: translated compute pipelines are made with node mask 0 #1368: with that change the title gets past the compile freeze and reaches this point; the comment there promised this issue.
- RTX 5060 Laptop (8 GB): menus 30 fps and the world renders, but it dies at ~70–80 s —
title_memory_budget_mbis 13,824 MB regardless of the adapter's memory #1337 / D3D12.X: video memory use is high, title memory and textures are mirrored into VRAM #1773: video memory is 5–7 GB over budget at this point in every run (see comments); it is not ruled out as a contributor.
Hardware: RTX 2070 SUPER 8 GB, driver 621.40 (nvwgf2umx 32.0.16.2140), Ryzen 5 3600XT, Windows 11. Not seen on AMD here: I have no AMD card.
Experiments, traces and dumps follow in the comments.
AI use: Claude Code (Claude Opus 5.5) ran the builds and the queued runs, analysed the logs, dumps and traces, and wrote this issue. I checked the figures.
Activity
KOLESNiii commentedon Nov 30, 2026
Runs so far (all warm caches after a full startup preparation,
XCL_PREPARE_ALL=1, release builds, RTX 2070 SUPER 8 GB, driver 621.40; one run each)ExecuteCommandLists, stack overflow at ~290 sXCL_GPU_WAIT_TIMEOUT_MS=1000XCL_WATCHDOG_BUILD_HOLDS_ONLY=1)XCL_WAIT_TIMEOUT_CONTINUE=1DXGI_ERROR_DEVICE_HUNG0x887a0006XCL_DRED=1, full dumpXCL_WBS_CPU=1keeps a wait whose producer is not submitted on the CPU instead of a GPUqueue.WaitDXGI_ERROR_DEVICE_HUNGXCL_DEVICE_TYPE=lockhart), DRED, full dump, WPR CPU+GPU traceNotes:
XCL_ACTIVITY XCL_HEAP_WINDOWS XCL_HEAP_FLAT XCL_STALL_TRACE_DETAIL XCL_PSO_TRACE XCL_GPU_PROFILE XCL_SYNC_TRACE XCL_LOOK_STATS XCL_DIRECT_DXIL_STATS, plus typeperf, nvidia-smi and (from D on) an elevated circular WPR CPU+GPU capture saved at the end of the run.KOLESNiii commentedon Nov 30, 2026
Crash dump of run G (Series S, current main)
The overflowing thread is the title's submit thread (the same thread the watch reported as "ExecuteCommandLists on thread 10676 has not returned for 2056 ms"). Bottom of its stack:
list_x::QUEUE_IDS(the table behind theq0/q1names in the log) holds[0x7ee3c320, 0x7ee3c070, 0x22b879e0, 0x22b87c90, 0x22b884a0]. The stuck call's queue 0x7ee3c070 is q1, one of the four compute queues waiting for q0's value. It was the first chunk of the title's 16-list submission, so none of it had reached the driver.nvwgf2umx+0x1f1200–0x1f12a9(driver 621.40) compares a ring's free space (fields at+0x38and+0x58of the ring object, thresholds 0x2000 / 0x10000 / 0x40000 / 0x100000) with the size needed, and calls+0x1f3cd0when it does not fit; that call ends up back in the same check. My reading: the ring belongs to the waiting queue and cannot drain while that queue's GPU wait is unsatisfied.nvgpucomp64compiling, pipeline workers idle, one XCL thread blocked inqueue_submit::Lease::enterbehind the stuck submit, two inpso_async::Wait::until_done, several title threads parked in game code. No XCL thread was waiting on a fence.Dumps are 31–35 GB each and contain game memory, so I cannot attach them. I can run any debugger command on them on request.
KOLESNiii commentedon Nov 30, 2026
Sync and watchdog evidence from the logs
Run G (Series S, current main), title submit thread 10676:
Then, from the 2 s activity lines:
XCL_GPU_PROFILE2 s lines stop at 502.6 s; the 20 s summary at 522.9 s reports 4,556 ops in flight.title_held()(pipeline waits over 250 ms, then the stuck submit itself).Run F (waits kept on the CPU), sync trace at the stall, times relative to it:
f68,78) were signalled 8 ms after q2's own signal (80), so q0's progress appears to depend on the compute queues' signals: the title's queues wait on each other in both directions, and that only works if each queue keeps running up to its waits. That is a reading, not proven.f68/78: their q0 producer had been submitted.The ring holds 1,500 events; in run D routine q0 entries overwrote the compute-queue entries before the dump, so it cannot show the edges.
KOLESNiii commentedon Nov 30, 2026
Video memory, and what the Series S run changed
At the point of failure every run is far over the video memory budget Windows gives the process (8 GB card):
Cache and builds used: run G's cache is a cold Series S preparation of the same build (26,308 shaders, 0 errors, compute pipelines in 2,544 s, no graphics pipelines because no earlier Series S run had recorded any).
KOLESNiii commentedon Nov 30, 2026
Not done yet / next steps
queue.Waitwhose producer is not submitted; keep the waiting queue's later lists on the CPU side (in submission order) until the producer is submitted, then submit them behind a GPU wait that can be satisfied. vkd3d-proton handles wait-before-signal this way, by deferring the submission. Together with it: the watchdog should not count a stuck driver call as a reason to pause (title_held()/wait_expired).XCL_SYNC_TRACE=1and look forbridged to GPU queue.Wait (… wait-before-signal …)followed byhas not returned.The two experiment switches from runs D and F are local commits for now; I can push them to a branch if anyone wants to reproduce.
Gevroska commentedon Nov 30, 2026
@KOLESNiii I found the same
Wait64queue pattern in two saved RTX 3080 loading runs on206b8ff9, one cold and one warm. In each run, the thread that had previously loggedPresentXenqueued eight wait-before-signal bridges after the last interval with a present. Four COMPUTE queues accounted for two waits each, and all eight records pointed to the same DIRECT queue as the possible producer.The first bridge appeared 33.6 s after the last positive present interval on the cold run and 1.3 s after it on the warm run. Eight is the per-process logging limit, so later waits may also have occurred.
The markers confirm that the native
queue.Waitcalls returned after enqueueing the waits. The logs don’t show which queue eventually signalled those fences or whether the waits completed. Both runs reached their time limits without a crash or device removal. I can corroborate the queue pattern on a second GPU, but I didn’t reproduce the stack overflow.I used Codex GPT-6.2 Sol to analyze the traces. The queue counts, thread identity, and timing were independently checked against both full logs. Codex GPT-6.2 Astra drafted this comment.
I reviewed and approved this comment before posting.
KOLESNiii commentedon Nov 30, 2026
Correction: the stuck submit is caused by
XCL_GPU_PROFILE=1, not by the wait-before-signalEvery run in this issue had
XCL_GPU_PROFILE=1on (my profiling template sets it). That profiler records a timestampEndQuerybefore and after every dispatch, plus aResolveQueryData. On this driver, too many timestamp queries in one compute-queue submission makeExecuteCommandListsrecurse until the stack overflows, and a resolve of them on a compute queue hangs the GPU. A small D3D12 test reproduces both, with no title and no XCL.Standalone test (RTX 2070 SUPER, driver 621.40)
One
ExecuteCommandListsof a list of trivial dispatches, nothing else on the device:ResolveQueryDataonlyWriteBufferImmediatemarker onlyEndQueryEndQueryExecuteCommandListsEndQuery, 8 lists × 1,000 in one callEndQuery+ResolveQueryDataDXGI_ERROR_DEVICE_HUNG(the call takes ~0.5 s)The recursion is the same
nvwgf2umxframe cycle as in the dumps above. With a 512 MB stack (XCL_DRIVER_STACK_MB, experiment), the call ran for 54 minutes and still overflowed, so it does not finish.Ruled out by the same test: an unsatisfied GPU wait in front of the submissions, with 20,000 submits, 858 MB of shader code, or 20 GB of buffers on a 7.2 GB budget. Nothing blocked.
In the title
WriteBufferImmediate, Dispatch, WriteBufferImmediate, ResolveQueryData, repeated (DRED, run H3). The GPU finished 110 of them before the hang.XCL_WBS_HOLD) made no difference. It held and replayed every such wait correctly, then the replayed q1 submission stood still with 0 unmet waits and every queue idle, and the run ended inDEVICE_HUNG.Without the profiler (same build, Series S, warm, 2 runs)
CopyTextureRegioncalls, at an address where a resource had just been freed, with 5–6 GB over the video memory budget. The hold was not active yet. This looks like a separate problem; one run so far.So with the profiler off, the world-load waits on this title do not deadlock on NVIDIA. What's left at that point is the cold-pipeline wait (and the page fault, to be checked).
What this changes
XCL_GPU_PROFILEshould not record per-op timestamps on compute lists on NVIDIA, or should cap them per submission, well below about 4,000 queries.windowscrate).Runs: commit
b19c39c9(experiment branch on top of the build named above), Series S device type, warm cache fromfee84e55, 10–15 min each, through the local queue.AI use: Claude Code (Claude Opus 5.5) wrote the experiments and the test, ran them on my PC and wrote this.
KOLESNiii commentedon Nov 30, 2026
A/B request: does
XCL_GPU_PROFILEtiming on compute lists break your driver too? Fix in draft #3540.As in my correction above: on NVIDIA 621.40 (RTX 2070 SUPER), timestamp queries on compute lists break the driver. One compute
ExecuteCommandListswith about 3,000 or more of them overflows the stack insidenvwgf2umx, and a resolve of them on a compute queue hung the GPU with 100 dispatches. Direct queues were fine with 6,000. #3540 makesXCL_GPU_PROFILEandXCL_GPU_TIMEStime only direct lists unlessXCL_GPU_PROFILE_COMPUTE=1. Before turning compute timing off for everyone, I'd like to know which GPUs and drivers actually have the problem.What to run (any title that gets to a heavy compute scene, the same one on both sides):
3ef4593d, branchKOLESNiii:d3d12x-gpu-profile-direct-only),cargo build --release -p xcl.XCL_GPU_PROFILE=1 XCL_GPU_PROFILE_COMPUTE=1(compute timing on, as onmaintoday).XCL_GPU_PROFILE=1only (this PR's default).XCL_PRESS_AT=25:A, warm DXIL cache, other programs closed. Run A, B, A, B if you can; 10 minutes or until the title is past its heaviest load.What to paste back:
DXGI_ERROR_DEVICE_HUNG/ a stack overflow, and when.D3D12.X: XCL_GPU_PROFILElines and anydevice removed/ DRED lines fromxcl.log.A run where compute timing is fine is just as useful as one where it breaks: if only NVIDIA has the problem, the default can depend on the vendor. AMD (RDNA2/3/4) and other NVIDIA drivers are what I most need; I can only test NVIDIA 621.40 here.
If you'd rather test the driver alone: the standalone test is about 150 lines with the
windowscrate. Say so and I'll post it.Our environment: RTX 2070 SUPER 8 GB, driver 621.40, Ryzen 5 3600XT, 32 GB, Windows 11 Home 26300, rustc 1.100.1.
AI use: Claude Code (Claude Opus 5.5) wrote this request and the change.