xcl run: the sync-state dump names the list behind a Wait64 cell #2718

Open
github-bot wants to merge 4 commits from github-bot/gh-2718 into main AGit
Owner

@⁠Kalmarv on GitHub · 2026-11-26 08:17 UTC · original
Kalmarv:sync-dump-recording-list → main · +223 −3 · 3 files · 4 commits · open

Stacked on #2244; only the top commit belongs here.

#2244's sync-state dump shows a Wait64BitValueX cell recorded and never submitted (rec 0x619, sub 0x0@qNone in #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 list was later executed, reset or released, with each as its time after the recording:

0x70417fe08: mem 0x0 done 0x0 sub 0x0@qNone rec 0x619 by 0x1e2c4a0 41250 ms ago (executed no, reset no, released no) cpu 0x0 armed []

That tells apart the ways a recorded Write64 goes missing:

  • reset or released with no execute: the recording was thrown away; a release here can also be #2691's case, where a new list at a freed list's address loses its state;
  • executed: the write went out, and the miss is on the submit side;
  • none of the three: the list is still open or closed and waiting, so the title holds it.

#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 set recorded_max). WRITE64_LISTS holds the last execute, Reset and Release of each list that recorded a Write64; it is filled in by signal_write64_fences, the KickoffX submit, reset_pc, clear_segment_state and on_release. cells_behind_summary prints them (try_lock, as for the graph).
  • Test the_cells_behind_summary_names_the_recording_list_and_what_came_to_it.

Tested

  • NVIDIA GeForce RTX 5070 Ti, driver 610.74; AMD Ryzen 9 9950X; Windows 11 (10.0.26200.9711); Rust 1.99.0, debug
  • cargo test --workspace --no-fail-fast -- --test-threads=4 at 590fb10f (on #2244's 97e22f64, main 72f848ca): 1415 passed, 0 failed, 46 ignored
  • SKIPPED (142): 117 validator 1.7 < 1.8 (validation step only), 21 no wave64, 3 wave32 per-lane form refused (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32), heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows
  • The new test checks the entry of a cell recorded on a list: by <list> … (executed no, reset no, released no), then reset +… ms and released +… ms after a Reset and a Release.

Regression run
main (b49be18):

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1183 (PresentX 1184)
presents per 2 s (last 3): 1 10 14
device removals: 0
crashes: 0
peak commit: 25007 MB

this PR (590fb10):

xcl-smoke v1
commit: 590fb10fcccaa382bc102d5bd6fb045989b10be8
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1209 (PresentX 1210)
presents per 2 s (last 3): 8 22 43
device removals: 0
crashes: 0
peak commit: 25131 MB

Not tested

  • A run that shows a stuck cell (the reporter's card and route); the smoke runs do not set XCL_THREAD_DUMP_AT, so no dump is logged in them
  • AMD and Intel GPUs

AI use

  • Claude Code, Claude Opus 5.5: wrote the change, the test and this description.

🤖 Generated with Claude Code

**@⁠Kalmarv** on GitHub · 2026-11-26 08:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/2718) `Kalmarv:sync-dump-recording-list` → `main` · +223 −3 · 3 files · 4 commits · open Stacked on #2244; only the top commit belongs here. #2244's sync-state dump shows a `Wait64BitValueX` cell recorded and never submitted (`rec 0x619`, `sub 0x0@qNone` in https://git.gtahub.st/github/xcl-dev--xcl/issues/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 list was later executed, reset or released, with each as its time after the recording: ``` 0x70417fe08: mem 0x0 done 0x0 sub 0x0@qNone rec 0x619 by 0x1e2c4a0 41250 ms ago (executed no, reset no, released no) cpu 0x0 armed [] ``` That tells apart the ways a recorded Write64 goes missing: - reset or released with no execute: the recording was thrown away; a release here can also be #2691's case, where a new list at a freed list's address loses its state; - executed: the write went out, and the miss is on the submit side; - none of the three: the list is still open or closed and waiting, so the title holds it. #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 set `recorded_max`). `WRITE64_LISTS` holds the last execute, Reset and Release of each list that recorded a Write64; it is filled in by `signal_write64_fences`, the KickoffX submit, `reset_pc`, `clear_segment_state` and `on_release`. `cells_behind_summary` prints them (`try_lock`, as for the graph). - Test `the_cells_behind_summary_names_the_recording_list_and_what_came_to_it`. **Tested** - NVIDIA GeForce RTX 5070 Ti, driver 610.74; AMD Ryzen 9 9950X; Windows 11 (10.0.26200.9711); Rust 1.99.0, debug - `cargo test --workspace --no-fail-fast -- --test-threads=4` at `590fb10f` (on #2244's `97e22f64`, `main` `72f848ca`): 1415 passed, 0 failed, 46 ignored - SKIPPED (142): 117 validator 1.7 < 1.8 (validation step only), 21 no wave64, 3 wave32 per-lane form refused (`V_MUL_F16`, `V_PK_MUL_F16`, `V_CVT_F16_F32`), `heap_window_out_of_memory_falls_back_to_the_switch_form`: no heap windows - The new test checks the entry of a cell recorded on a list: `by <list> … (executed no, reset no, released no)`, then `reset +… ms` and `released +… ms` after a Reset and a Release. **Regression run** main (`b49be18`): ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1183 (PresentX 1184) presents per 2 s (last 3): 1 10 14 device removals: 0 crashes: 0 peak commit: 25007 MB ``` this PR (`590fb10`): ``` xcl-smoke v1 commit: 590fb10fcccaa382bc102d5bd6fb045989b10be8 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1209 (PresentX 1210) presents per 2 s (last 3): 8 22 43 device removals: 0 crashes: 0 peak commit: 25131 MB ``` **Not tested** - A run that shows a stuck cell (the reporter's card and route); the smoke runs do not set `XCL_THREAD_DUMP_AT`, so no dump is logged in them - AMD and Intel GPUs **AI use** - Claude Code, Claude Opus 5.5: wrote the change, the test and this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A retail title's world load can stop with no GPU-wait time-out: presents,
submits and DirectStorage requests go to 0 and every thread waits. The
watchdog's summaries of pending title fences and of XCL's own unmet queue
waits are only logged at a time-out, so such a stop did not say whether
a fence or a queue was behind.

At each XCL_THREAD_DUMP_AT dump XCL now logs the two summaries and the
number of armed GPU waits, on a thread of its own so that a lock the
stall holds cannot hold up the next dump. On #2057's tree this showed
every fence and queue caught up at 135, 200 and 300 s after a stop at
110 s (https://github.com/xcl-dev/xcl/pull/2057#issuecomment-7160090884).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XZrhsCAiLU1tTuEBwPLaRW
The three lines of the first commit read "none / none / 0" in runs where
the title had stopped after its first #101: no fence and no queue was
behind, yet nothing was presented. What showed the stop was a SYNC_GRAPH
cell whose recorded value is above what was submitted and completed,
with no GPU wait armed: a list that writes the value was recorded and
never submitted, so the submitting thread is held (GreemSC's runs, RX
7900 XT; the thread dump then named that thread).

cells_behind_summary lists such cells, and those with armed waits:
memory, completed, submitted (and on which queue), recorded and CPU
values, and the armed waits with their age. It takes the graph with
try_lock, since a dump can come while a submitting thread holds it.
The cell is read with ReadProcessMemory (dstorage::read_own), since
the title can decommit its page at any time; an unreadable cell shows
"mem unreadable" (bmjask's review).
The function is GreemSC's, from the review of this PR.

Co-authored-by: GreemSC <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XZrhsCAiLU1tTuEBwPLaRW
A cell recorded and never submitted (#1452: rec 0x619, sub 0x0@qNone)
did not say which list recorded the value or what became of that list.
Each cell now keeps the PC list and time of the recording that set its
recorded_max, and each list that recorded a Write64 keeps its last
execute, Reset and Release (signal_write64_fences, the KickoffX submit,
reset_pc, clear_segment_state, on_release). The cell entry in
cells_behind_summary prints them as their time after the recording, or
"no": reset or released with no execute is a recording thrown away
(#2691's address reuse shows as a release), executed is a miss on the
submit side, and none of the three a list the title still holds.

Part of #1452.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:20:28 +00:00
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 08:36 UTC · original · reviewed

At exact head 590fb10 (stacked on 97e22f6, current main b49be18), 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_by saves only the raw PC-list address and a timestamp, while WRITE64_LISTS has 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_pc notes Reset, but the later signal_write64_fences/KickoffX updates executed on the same trace. recording_trace accepts that later timestamp, so the old cell reports executed +… 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 after on_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_it with Reset, an unrelated new recording, and Execute should leave the old cell at executed 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.

**@⁠luckyteagirl** on GitHub · 2026-11-26 08:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/2718#pullrequestreview-6070800102) · **reviewed** At exact head `590fb10` (stacked on `97e22f6`, current main `b49be18`), 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_by` saves only the raw PC-list address and a timestamp, while `WRITE64_LISTS` has 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_pc` notes Reset, but the later `signal_write64_fences`/KickoffX updates `executed` on the same trace. `recording_trace` accepts that later timestamp, so the old cell reports `executed +…` 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 after `on_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_it` with Reset, an unrelated new recording, and Execute should leave the old cell at `executed 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.
The trace was kept per list address: after a Reset, or a Release and a
new list at the same address, a later execute of another recording
showed on the old cell as "executed", though its write was thrown away.
Each recording that records a Write64 now has a trace of its own, which
the cells it recorded hold; a Reset or Release ends it, and what comes
to the list after belongs to the next one.

The test adds both cases: Reset, an unrelated recording and its execute
leave the old cell at "executed no", and so do a Release and a list at
the same address that records and is executed.

Part of #1452.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2718/head:github-bot/gh-2718'
git switch 'github-bot/gh-2718'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2718'
git switch 'github-bot/gh-2718'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2718'
git switch 'github-bot/gh-2718'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2718'
git switch 'main'
git merge --squash 'github-bot/gh-2718'
git switch 'main'
git merge --ff-only 'github-bot/gh-2718'
git switch 'main'
git merge 'github-bot/gh-2718'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.