D3D12.X: a GPU wait timeout logs what each queue waits on #1570
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1580"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by zmelumian972 on 2026-11-24T17:54:00Z.
When a bridged GPU
queue.Waitdoes not complete within the watchdog's 5 s, the log names the wait, its producer queue and the fence values, but not why the producer is behind. On the retail title under Wine (#662) that is the open question: a cycle through the waits XCL submitted, or a producer stuck on something XCL does not track? This logs the sync graph at the first four timeouts of a run so a log answers it. Part of #662.Each line is one queue with outstanding work, in submission order: its pending GPU signals and the waits it has not got past, each wait with the queue and submission that satisfies it (
<- q1#57, orno GPU signal), for both theWait64BitValueXcells and the title'sID3D12Fences. Completed entries are pruned first. Example from the retail title (shortened):In both runs where it fired, the compute queues' oldest pending entry is a signal with no wait before it, while the direct queue waits on those signals: no cycle through the tracked waits. One of the two ran with vkd3d-proton's per-family queue limit raised from 4 to 16 (each D3D12 queue on its own
VkQueue), so it is not queue sharing in vkd3d-proton either. I will post the logs on #662.What is in it
crates/xcl/src/hle/d3d12x/list_x.rs(+95):sync_graph_dump, called from the sync watchdog when an armed wait has expired (at most 4 times per run), logged after the graph lock is released.list_x::tests::sync_graph_dump_names_the_submission_each_wait_needs(no GPU): a two-queue cycle through a cell and a title fence, and a wait with no signal.Tested
53aac41and a local vtable patch, DXVK 3.1.1dxgi; rustc 1.100.0, cross-built with cargo-xwin (x86_64-pc-windows-msvc), release.cargo xwin test --workspace --target x86_64-pc-windows-msvc --release --no-fail-fast -- --test-threads=4, run under Wine:main9e3831e0fff825The 13 failures are the same tests on both (Wine: the CLI e2e tests that start
xcl.exe—e2e,disasm_e2e,rpf_e2e,shaders_e2e,pls_quota— andgpu_depth_buffer_created_for_unordered_access_is_placed,offline_compute_pipeline_is_reused_by_a_second_process,set_predication_buffer_state_and_kickoff). The +1 is the new test.SKIPPEDon this adapter:gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).XCL_PSO_WAIT_MS=1): the dump appears at the first timeouts, as above.Regression run
Both blocks from
smoke.sh, a Linux port ofscripts/smoke.ps1that prints the same block, under Wine, withwinestarted inside a bwrap sandbox (no network, game folder read-only),XCL_PSO_WAIT_MS=1, 60 s of the retail title. Under Wine XCL logs no commit size, sopeak commitis 0 on both.main:This PR:
Not tested
AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T18:00:58Z.
Review: COMMENTED
AI-assisted review (GPT-6): I traced the timeout predicate through the completed-wait pruning and dump generation.
Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T18:00:58Z.
Code review location:
crates/xcl/src/hle/d3d12x/list_x.rs; line 1424Could completed waits be pruned before computing
expiring? A wait can cross the threshold and then complete before this scan;expiringstill consumes one of the fourDUMPSslots, whileprune_completed_waitsremoves the wait beforesync_graph_dump. That can emit an empty timeout dump and reduce reports available for later genuine hangs. Please base the predicate on waits that remain pending after pruning. AI-assisted review: I traced this race through the watchdog and pruning path.Imported from ivall/xcl. Originally posted by simonbronk on 2026-11-24T19:20:53Z.
Test report:
0fff825on the retail title, RTX 5070 12 GB (Windows). The dump answers the PR's question for this run: no cycle. The producer queue has no wait of its own outstanding and still completes nothing.Setup: RTX 5070 12 GB (driver 621.24), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, release, DXC 1.9.2609. Retail 1.0.2.1, Series X. Tree:
main9e3831eplus this PR, nothing else in the runtime.XCL_NETWORK=0 XCL_HEAP_WINDOWS=1 XCL_PSO_WAIT_MS=50 XCL_PSO_PRELOAD=0 XCL_ACTIVITY=1. Warm DXIL and driver-blob caches from an offline--precompile --only cs --pipelinespass (about 2 100 compute pipelines). One run.Sequence:
0x36116f0(done=0xc54/sig=0xc57). So q2's submission before #3175 is what does not finish.LLVM ERROR: out of memoryin the driver's compiler (exit 0xc0000409). (Edited: the first version said the run reached 200 s; it did not.)Reading: q0 and q1 wait on q2, and q2 waits on nothing XCL tracks. That fits the reading on #505 / #1284: GPU work on q2 runs long, for example a translated loop up to
LOOP_GUARD. It does not fit a wait cycle.Separate finding, not this PR: with
XCL_PSO_PRELOADon (the default) and anused-pipelines.txtof 1 184 sets, private commit grew about 2 GB/s in the menus and the run ended at 38 s withmemory allocation of 2073600 bytes failed. In the same run withXCL_PSO_PRELOAD=0, commit stays at about 15 GB in the menus. I did not look further into it.AI use: Claude Code with Claude Opus 5.5 built the tree, ran the title, read the log and wrote this report at the request of the person running it.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T19:51:44Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:10:54Z.
Triage (#1607) – head
0fff825#1123 (opened earlier) adds a diagnostic for the same watchdog timeout in list_x.rs: it follows the chain of waits from each released wait and says how it ends (cycle, signal, unsubmitted, signal gone). This PR instead dumps every queue's pending waits and signals at the first four timeouts. They solve the same question differently; the maintainer should pick one.
No problems found in the diff; it is a draft and conflicts with main.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.