Repository navigation
D3D12.X: a GPU wait timeout logs what each queue waits on - #1580
zmelumian972 wants to merge 1 commit into
Conversation
When a bridged GPU queue.Wait does 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 (xcl-dev#662) that is the question: is it a cycle through the waits XCL submitted, or is the producer stuck on something XCL does not track? The first four timeouts of a run now log one line per queue with outstanding work in the sync graph, 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"), for both the Wait64BitValueX cells and the title's ID3D12Fences. Completed entries are pruned first. On the retail title the dump shows compute queues whose 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. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a1dc375 to
0fff825
Compare
gut0to
left a comment
There was a problem hiding this comment.
AI-assisted review (GPT-6): I traced the timeout predicate through the completed-wait pruning and dump generation.
| .cells | ||
| .values() | ||
| .any(|c| c.armed_waits.iter().any(|aw| aw.armed_at.elapsed() >= GPU_WAIT_WATCHDOG_TIMEOUT)); | ||
| if expiring && once(&DUMPS, 4) { |
There was a problem hiding this comment.
Could completed waits be pruned before computing expiring? A wait can cross the threshold and then complete before this scan; expiring still consumes one of the four DUMPS slots, while prune_completed_waits removes the wait before sync_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.
|
Test report: 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: Sequence:
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 Separate finding, not this PR: with 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. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
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