xcl run: the sync-state dump names the list behind a Wait64 cell #2718
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2718
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2718"
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?
@Kalmarv on GitHub · 2026-11-26 08:17 UTC · original
Kalmarv:sync-dump-recording-list→main· +223 −3 · 3 files · 4 commits · openStacked on #2244; only the top two commits belong here (
590fb10, andceb7bc2from luckyteagirl's review).#2244's sync-state dump shows a
Wait64BitValueXcell recorded and never submitted (rec 0x619,sub 0x0@qNonein #1452), but not which list recorded the value or what became of that list. Each such cell entry now names the PC list that recorded its highest value, and says whether that recording was later executed, or ended by a Reset or a Release, with each as its time after the recording:That tells apart the ways a recorded Write64 goes missing:
#2717 (a mid-list split that cannot make its next segment no longer closes the list) is one fix for the first case. Part of #1452.
What is in it
crates/xcl/src/hle/d3d12x/list_x.rs:SyncCell::recorded_by(list and time of the recording that setrecorded_max, and that recording's trace). Each recording that records a Write64 has a trace of its last execute and the Reset or Release that ended it, held by the cells it recorded;WRITE64_LISTSmaps each list to the recording it has open. They are filled in bysignal_write64_fences, the KickoffX submit,reset_pc,clear_segment_stateandon_release.cells_behind_summaryprints them (try_lock, as for the graph).ceb7bc2(review): the trace was kept per list address, so after a Reset, or a Release and a new list at the same address, another recording's execute showed on the old cell asexecuted. A Reset or Release now ends the recording, and what comes to the list after is the next one's.the_cells_behind_summary_names_the_recording_list_and_what_came_to_it.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4atceb7bc24(on #2244's97e22f64,main72f848ca): 1415 passed, 0 failed, 46 ignoredV_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32),heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windowsby <list> … (executed no, reset no, released no), thenreset +… msafter a Reset. Then the review's two cases: a Reset, an unrelated recording on the list and its execute; and a Release, then a list at the same address that records and is executed. In both the old cell stays atexecuted noand the new recording's cell readsexecuted +…. With590fb10's trace the first case fails: the reset cell readsexecuted +0 ms.ceb7bc2on an AMD Radeon RX 9060 XT (driver 32.0.31044.16), #2718: 1413 passed, 2 failed (fuzz_validate_and_gpu_1and_3, which fail on unmodifiedmainon that card, per the report), 46 ignored; boththe_cells_behind_summary_*tests passed; a 60 s smoke of another title: 1600 frames againstmain's 1603, no device removal, no crash.97e22f6andceb7bc2on another branch (nvidia-devaf2cecc), RTX 3090 Ti, driver 621.40. Boththe_cells_behind_summary_*tests passed. In a title run at 105.056 s, q3 waited on a cell for0x5e4, recorded up to0x5e5, with nothing submitted. Its line named the recording list withexecuted no, reset no, released no: a recorded producer that was never seen submitted, not a recording thrown away by a Reset or Release. The run does not show that this wait caused the q2 stall they saw later (146.6 to 152.6 s).Regression run
main (
b49be18):this PR (
ceb7bc2):Not tested
XCL_THREAD_DUMP_AT, so no dump is logged in themAI use
🤖 Generated with Claude Code
@luckyteagirl on GitHub · 2026-11-26 08:36 UTC · original · reviewed
At exact head
590fb10(stacked on97e22f6, current mainb49be18), the new trace can label a discarded Write64 as executed. This is a source-derived review; I did not run a title reproduction.SyncCell::recorded_bysaves only the raw PC-list address and a timestamp, whileWRITE64_LISTShas one mutable trace per address. For example, record a Write64 for a cell, Reset that list before submission, then record an unrelated Write64 and execute the new recording on the same list.reset_pcnotes Reset, but the latersignal_write64_fences/KickoffX updatesexecutedon the same trace.recording_traceaccepts that later timestamp, so the old cell reportsexecuted +…even though its recording was discarded. This conflicts with the PR's interpretation that “executed” means the write went out. Releasing the original list and reusing its address for a different list can produce the same attribution, since the address entry remains afteron_release.Could the trace be tied to a recording lifetime, so a Reset/Release closes the old recording and a later execution on the same address belongs to a new one? Extending
the_cells_behind_summary_names_the_recording_list_and_what_came_to_itwith Reset, an unrelated new recording, and Execute should leave the old cell atexecuted no; a release/address-reuse case would cover the other path.AI assistance: GPT-6.2 Sol agents independently found the Reset and address-reuse cases; GPT-6.2 Astra verified the exact-head source and combined the report.
@emirduran707 on GitHub · 2026-11-26 10:32 UTC · original
Independent AMD RDNA4 (native wave64) verification of exact PR head
ceb7bc24288c46453ae3819b4b85378daf9184e1on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC1.9.2602.17).Tested
cargo build --workspace(debug): passed (0errors).cargo test --workspace --no-fail-fast -- --test-threads=4:1413 passed, 2 failed, 46 ignored(8 SKIPPED: 6 per-lane DXIL forms refused by host adapter/driver, 1heap_window_out_of_memory_falls_back_to_the_switch_formno heap windows, 1pso_measurement_compiles_an_exact_synthetic_recordWindows Developer Mode off).hle::d3d12x::list_x::tests::the_cells_behind_summary_names_the_recording_list_and_what_came_to_ithle::d3d12x::list_x::tests::the_cells_behind_summary_reads_a_decommitted_or_protected_cell_without_faultinggpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3) are pre-existing on unmodifiedmainon this RX 9060 XT / driver32.0.31044.16.cargo build --release -p xcl+ 60 s retail-title smoke test (scripts/smoke.ps1, offline):(Compare against
mainb49be183on this machine:1603 frames, 18576 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@Kalmarv on GitHub · 2026-11-26 11:07 UTC · original
@luckyteagirl Thanks, confirmed and fixed in
ceb7bc2, a commit on top of590fb10, so that commit is the whole change since your review. Each recording that records a Write64 now has a trace of its own, held by the cells it recorded. A Reset or a Release ends it, and what comes to the list, or to a list at its address, after that belongs to the next recording.the_cells_behind_summary_names_the_recording_list_and_what_came_to_itnow has both your cases: a Reset, an unrelated recording and its Execute; and a Release, then a list at the same address that records and is executed. In both the old cell stays atexecuted no. With590fb10's trace the Reset case fails (the cell readsexecuted +0 ms). Suite atceb7bc2on an RTX 5070 Ti: 1415 passed, 0 failed, 46 ignored. The new smoke pair is in the description.Thanks @emirduran707 for the RX 9060 XT run of
ceb7bc2(suite, boththe_cells_behind_summary_*tests, and a smoke); it is in Tested now.AI use: Claude Code, Claude Opus 5.5 wrote the fix, the test and this reply.
@GodlyBDS on GitHub · 2026-11-26 11:18 UTC · original · edited 2026-11-26 11:30 UTC
Independent Ampere run with the #2244/#2718 diagnostics
RTX 3090 Ti 24 GiB, driver 621.40, Windows 10, 32 GiB RAM. Release
nvidia-dev af2cecc40886a8682ecf3267f5328c6dc4b66ad7, with local Agility/XG startup adapters, #2697 memory diagnostics and the NVIDIA #2549 backport. Ports of #224497e22f64and #2718ceb7bc24adapt list-state tracking to the NVIDIA branch. Same starting 11,721 native PSOs, level pages enabled, app-only 1 GiB shader-heap reserve, no fixed timeout. Bothcells_behind_summaryregressions passed (2 passes, 0 failures or skips).At 105.056 s, q3 had an unmet Wait64 at value
0x5e4. The cell's last recorded value was0x5e5; CPU-backed memory, fence completion, and submitted value were all zero. The reported recording list had executed no, reset no, released no. The diagnostic distinguishes a recorded producer without an observed submission from a list discarded by a Reset or Release. This is consistent with the missing-producer state discussed in #2719, with a different integration branch.The later allocator-level samples from 146.573 to 152.594 s showed q2 submitted 19, completed 18, with the four other tracked queues caught up. That is a distinct interval and queue. This run does not establish that the q3 wait caused the later q2 stall. The external RAM guard ended the run at 378 MiB available physical RAM and 11.12 GiB commit headroom, with no DXGI removal logged before the stop.
Recording-time PSO wait follow-up. The only deliberate scheduling change was to let pending compute Dispatch and ExecuteIndirect calls use the existing recording-time PSO wait rather than enqueue a deferred segment. The application kept its original synchronization and required pipeline waits. The manifest matched all 11,721 starting native PSOs, and the effective environment differed only by the opt-in switch and run paths. In one run, submissions and streaming resumed. All five tracked allocator queues were caught up at 295.229 s, and two had one pending submit each at 297.237 s. Presentation had resumed at least once by 265.092 s. The device was then removed at 298.847 s (0x887a0005), with 12,011 MiB system commit headroom, local usage 17,631 MiB against a 23,541 MiB budget in the last sample, and no 4101/153 in the matching Windows event window. DRED had no breadcrumbs and no allocation for VA zero. This supports separating the earlier submit-time Reset stall from the later device removal. It does not establish which GPU workload caused the removal or prove stable rendering.
AI use: Codex (GPT-6) adapted the diagnostics, ran the tests and compared the logs.
@Kalmarv on GitHub · 2026-11-26 12:14 UTC · original
Thanks @GodlyBDS for the RTX 3090 Ti run with #2244 and this PR ported to nvidia-dev
af2cecc. Both tests passed. At 105.056 s the q3 cell's line readexecuted no, reset no, released no: a recorded producer that was never seen submitted, not a recording thrown away by a Reset or Release. As you say, the run does not show that this wait caused the later q2 stall. That part is in Tested now. Your recording-time PSO wait follow-up is your own opt-in switch, not this PR's code, so I've left it out of this PR's description.AI use: Claude Code, Claude Opus 5.5 wrote this reply.
@Decodere on GitHub · 2026-11-26 14:18 UTC · original
Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2718 at
ceb7bc24288c46453ae3819b4b85378daf9184e1(parent590fb10fcccaa382bc102d5bd6fb045989b10be8; merge-base72f848cabfa588201554c1c01c9406a73fe7e964,MERGEABLEagainstorigin/mainb49be183). Measurements and targeted test results only; not a full source review.Setup
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)title: 29640639viascripts/smoke.ps1 -Seconds 60(XCL_NETWORK=0 XCL_ACTIVITY=1, default flags, no input)Targeted Win11 / RTX 4060 release unit tests (
ceb7bc24)cargo test --release -p xcl --lib the_cells_behind_summary_reads_a_decommitted_or_protected_cell_without_faulting -- --nocapture: 1 passed, 0 failed, 0 ignored (0.00 s, exit0).cargo test --release -p xcl --lib the_cells_behind_summary_names_the_recording_list_and_what_came_to_it -- --nocapture: 1 passed, 0 failed, 0 ignored (0.00 s, exit0).cargo test --release -p xcl --lib hle::d3d12x::list_x:: -- --test-threads=4: 40 passed, 0 failed, 0 ignored (0.51 s,0skipped, exit0).cargo test --release -p xcl --lib hle::dstorage:: -- --test-threads=4: 31 passed, 0 failed, 0 ignored (0.11 s,0skipped, exit0).Observations
the_cells_behind_summary_reads_a_decommitted_or_protected_cell_without_faultingandthe_cells_behind_summary_names_the_recording_list_and_what_came_to_it) plus all 71 targetedlist_x::anddstorage::tests passed cleanly in--releaseon native Windows 11 / RTX 4060 with0skips.exit: 0x0,1562frames shown,60 60 60steady-state presents per 2 s,0device removals,0crashes,13969 MBpeak commit vs referenceorigin/mainb49be183's14018 MB/1518frames).Paired 60 s RTX 4060 smoke (
b49be183vsceb7bc24)Reference
origin/main(b49be183):PR #2718 head (
ceb7bc24):Limits of coverage
ceb7bc24(only targetedhle::d3d12x::list_x::andhle::dstorage::release tests plus paired quiet 60 s smoke).ceb7bc24(whose merge-base72f848casits below currentorigin/mainb49be183), without triggering a liveWait64BitValueXhang/sync-state dump during the 60 s retail smoke (sync-cell summary formatting and protected-cell safety are covered by the two unit tests above).26200) / discrete RTX 4060 only; no AMD, Intel, or Wine/Linux run on this host.AI use
Ran the targeted release unit tests and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts and smoke blocks were taken directly from
cargo testandscripts/smoke.ps1outputs.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.