Repository navigation
Queue 0x20 WAIT_REG_MEM on a label times out while the label holds an address-like value (Kena PPSA01746, Coral Island PPSA17226, Stray PPSA02100) #6558
Description
What
Three titles log [gpu] queue 0x20 WAIT_REG_MEM at <label> timed out after 1000ms (function 3 ref 0x1 mask 0xffffffff value <v>), where the current value <v> of the awaited word is neither 0 nor 1 but looks like an address close to the label (the log prints the word's current value). #2832 (closed) added the timeout and this line as the diagnosis; what is new here is the value. All three runs are without picture verification.
| Title | Log | timed out after 1000ms lines |
What the log shows |
|---|---|---|---|
| Kena: Bridge of Spirits (PPSA01746) | PPSA01746_rX/run_103338.err |
117, 136, 145 | labels 0x1020f77440 (value 0x20f74fe0), 0x1021061340 (0x21061380), 0x1021060440 (0x21060460); lines 146-147: earlier write by queue 0x0 opcode 0x50 and opcode 0x49 at 0x1021060440+0x4. The window title (send_keys_menu4_PPSA01746.log) shows FPS: 58.97 (8599), then 15.62 (8691), and the last 0.01 (8693); the process hangs without an exception line |
| Coral Island (PPSA17226) | PPSA17226_rE1/run_212941.err |
151, 160, 176 | labels 0x10214f7c60 (value 0x214f6f00), 0x10214f6e00 (0x214f0500; lines 161-166: three pairs of earlier write by queue 0x0 opcode 0x50 / 0x49 at 0x10214f6e00+0x4), 0x1021813080 (0x21811c40); no abort line in the 201 lines |
| Stray (PPSA02100) | PPSA02100_rC/run_075438.err (12 October, older main) |
407 | one timeout; FATAL: unhandled exception 0xc0000005 follows nine lines later (line 416); a connection between the two is not established |
A second Kena run (run_111548.err, local traceLabel change that prints the packets near these addresses) had no timed out line, but its window title (send_keys_kenalabel.log) shows FPS: 59.76 (568) falling to 2.33 (4005).
Observations (the interpretation of packet words is mine):
- In the Kena label trace of that second run, queue 0x20 issues
DMA_DATA 0x1021061280: 46306000 00000000 00000000 21061280 00000010 00000004(line 741) followed byRELEASE_MEM 0x1021061280: 0600c528 20010000 21061280 00000010 00000001 ...(line 743), which I read as a 4-byte write of 0 and then a write of data 1 to the label. Queue 0x0 does the same for0x1021060460and0x1021061380and then waits on them withWAIT_REG_MEM 00000113 <label> 00000010 00000001 ffffffff 00000019(lines 191-193 and 206-208). - Those two addresses are the same as the address-like values in the first Kena run (
0x21060460,0x21061380). The two runs are different runs on different trees (maindb81992c5and0afa6a607, both with fix(agc): bind a V# past the range limit by the memory behind it #5778), so this match is an observation, not proof that the label was overwritten with that address; the third value (0x20f74fe0) matches no traced label. - In Coral Island the same four packets precede every timed-out wait (lines 153-157, 168-172, 178-182):
SET_SH_REG 00000240 209d9000 c4700000 000fc00f a1b00fac 0000003f 00700000 006b0000, twoRELEASE_MEM 06000528 60010000 <address> 00000020 ...,SET_UCONFIG_REG 00000342 c8010010 <label>, then theWAIT_REG_MEM.
I do not know what overwrites the label and make no claim about a cause. From my reading of Driver::storedSince (core/libs/prx/libSceAgcDriver/Execution/src/Driver/Synchronization/LabelHistory.cpp, line 28 on main: if (store.stamp <= received) continue;), a store counts for a wait only when it is newer than the stamp at which the wait packet was received; a 1 that was stored and overwritten before then would never satisfy the wait. Whether that is what happens here is untested.
Related
- AGC: WAIT_REG_MEM gives up after 1 s while the awaited label is still pending on another queue, so gated work reads too early #2832 (closed): the timeout and the diagnostic line itself.
- AGC: XPSemu's GPU probe times out: label writes after a dispatch never satisfy a WAIT_REG_MEM in the same submission, then its geometry draw is rejected (PPSA97358) #5437 (open), part 1: label writes that never satisfy a
WAIT_REG_MEMin the same submission (XPSemu); there the value stays 1/0, here it holds another value. - fix(agc): abandon WAIT_REG_MEM after timeout under skip-failed #6252 (open PR): abandon the wait after the timeout under skip-failed; feat(agc): keep the last submissions per queue and dump them on a stall or crash #4855 (open PR): dump the last submissions per queue on a stall, which would be the tool for the next step.
- ASTRO BOT (PPSA21564) on Windows / AMD RX 6600 XT: GPU hang in the first 3D frames after the start-up logos (TDR, vkQueueSubmit -4) #6284 (open): Astro Bot hang, different symptom. A search for
queue 0x20/timed out afteralso finds AGC: a compute dispatch is captured before the title has written its tables when a cross-queue wait passes on a recorded label #1787 and AGC: a storage image the CPU polls is never stored back, so a title that waits for it deadlocks (Ratchet & Clank: Rift Apart, frame 456) #3272 (both closed, different cause).
Tested
Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, my Kena runs on main db81992c554f1b395b4c04987cfbdc316a03d69b + #5778 with a local PlayGo answer (BAD_CHUNK_ID) and scripted key presses to the window (PostMessage, every 17 s). The Coral Island run was done by another session (tree, relinker and input not recorded in my notes); the Stray run is from an older main. No fix attempted.
AI-assisted (Claude Code).
Activity
xXPBSXx commentedon Oct 15, 2026
A fourth title with the same line, with a different value: Sifu (PPSA03001),
main03c4cb5e7+ #6236 (APS5_PLAYGO_UNLISTED_CHUNKS=absent; without that setting the title stops earlier atscePlayGo), Windows 10, RTX 4080 SUPER.PPSA03001_rV/run_214415.err(687 lines), line 38:Here the awaited word holds
0x0, not an address-like value, so the two cases may differ. Line 39 (recorder: table miss (refusal 0), open batch writes it 0, snapshot write overlaps 0, pending completion labels 0, write-back completions 0) and lines 40-44 show the packets before the wait:SET_SH_REG, twoRELEASE_MEMto other addresses (0578f910,0578f8c0),SET_UCONFIG_REG c8010010 214a3820,WAIT_REG_MEM 00000013 214a3820 .... Line 49 isFATAL: unhandled exception 0xc0000005(the title's own abort); whether it follows from the timeout is not established. The same queue 0x20 wait is described in #5983 (Lies of P, loading screen).Not verified: the picture, and what writes this label. No fix attempted.
AI-assisted (Claude Code).
MarcZX10 commentedon Oct 16, 2026
Thanks, the Sifu trace adds useful evidence that the timeout line is not limited to the address-like sampled values: this wait has
value 0x0, a recorder table miss, and no overlapping recorder/open-snapshot write at the timeout. That is a distinct observed state from the Kena/Coral Island examples. I still cannot infer a cause or safely change WAIT_REG_MEM behavior from this single run; could you add Sifu as a fourth row in the issue body, and, if available, capture a repeat withAPS5_TRACE_LABEL=<label>plus the following store/wait packets? That should show whether a write targeting this label is missing or simply never issued. The current log alone does not show an earlier write to0x10214a3820.MarcZX10 commentedon Oct 18, 2026
Follow-up now that #4855 is merged: the current
mainhas a way to capture both sides of this wait in one reproduction. For Sifu, please try a current-main build withAPS5_PM4_RING=256,APS5_STALL_WATCHDOG_SECS=2, andAPS5_TRACE_LABEL=10214a3820(the label address from your log). The label trace recordsRELEASE_MEMpackets targeting it; if the wait stalls, the watchdog prints recent submissions from each queue, including the producer queue if it submitted one. Please include the lines for the label and the ring dump aroundWAIT_REG_MEM, and add Sifu as the fourth title row if you rerun it. This should distinguish a missing label write from a write that was submitted but not observed; no change to wait semantics is implied yet.xXPBSXx commentedon Oct 19, 2026
Rerun as requested on 18 October (Windows 10.0.19045, NVIDIA GeForce RTX 4080 SUPER, driver 610.74 per
nvidia-smi;main4ffb0cd12, Release; 560 s with pad input from a file;APS5_PM4_RING=256,APS5_STALL_WATCHDOG_SECS=2). Only counts, addresses and packet types below; the picture was not judged.Sifu (PPSA03001),
PPSA03001_rNT/run_113244.err(43561 lines):queue 0x20 WAIT_REG_MEM ... timed out after 1000mslines (183, 219, 305), allfunction 3 ref 0x1 mask 0xffffffff. The awaited word holds0x21285020(label0x102129d080),0x2155a480(label0x1021558ca0) and0x2148d3e0(label0x102148d380).DMA_DATA ... <addr> 00000010 00000004followed byRELEASE_MEM ... <addr> 00000010 00000001, in queue 0x20 submissions: lines 20972-20973 (#3 serial 1672), 21191-21192 (#7 serial 7685) and 21574-21575 (#14 serial 7730).0x2148d3e0is also the target of a queue 0WAIT_REG_MEM(lines 20521-20522,#3906 serial 7743). So the awaited word did not hold a stale 0 or 1 but the address of another slot of the same label area, as in the Kena and Coral Island rows above.WAIT_REG_MEMof queue 0x20#14 serial 7730(t=160098.7 ms; lines 21545, 21550, 21555, 21560, 21579). Wait 4 (0x21433340) has its producer (DMA_DATA+RELEASE_MEM) in queue 0serial 7729(t=160098.4 ms, 0.3 ms earlier); wait 5 (0x21432d20) is produced byDMA_DATA+RELEASE_MEMin the same submission (lines 21576-21577); waits 1-3 (0x2148d380,0x21433020,0x214330c0) have no producer in the dump. The dump holds 256 queue 0 submissions (t=78258-160330 ms) and 14 queue 0x20 submissions. I did not check whether earlier queue 0x20 submissions had the same shape.serial 7748at t=160329.7 ms, 231 ms after the stalled submission; the title's ownGameThread timed out waiting for RenderThread after 120.00 secsabort follows (line 21634).APS5_TRACE_LABELwas not set for Sifu: the label10214a3820asked for on 18 October does not occur in this run (0 matches), the addresses change from run to run, so the label to trace is not known before the stall.PRAGMATA (PPSA02530),
PPSA02530_rNT/run_114013.err(APS5_TRACE_LABEL=210c81bcc0set): a different signature, not the state of this issue. The timeouts areWAIT_REG_MEM_64withref 0x63and a small word value (0x1,0x2), and the producer exists (queue 0WRITE_DATA 00100200 <label> 00000021 00000063 00000000, e.g. line 285) but is submitted about 64 s after the wait (queue 0x20serial 2at t=18477 ms, first queue 0 submissionserial 3at t=82235 ms). It is listed only to avoid mixing the two cases.Not shown by these logs: what writes the address into the awaited word in the Sifu case (guest CPU or the emulator), and why waits 1-3 have no producer in the 256-submission window. I make no claim about the cause and propose no change to the wait semantics.
AI-assisted (Claude Code).
EagleBearerYS commentedon Oct 22, 2026
@xXPBSXx, if you have time for one more run of Sifu (PPSA03001) or Kena: Bridge of Spirits (PPSA01746): there's now a build that says why one of these waits wasn't satisfied.
Branch
fix/agc-label-wait-timeout-reasonon EagleBearerYS/AnyPS5 (cf5462c,maina6dcea9 plus two commits). After eachqueue 0x20 WAIT_REG_MEM ... timed out after 1000msline it prints one more line, once per label:<decision>says whether the wait's value was checked when the wait was submitted, and if not, why: for examplenot checked at submission (queue 0x20 serial N writes it).RELEASE_MEM, 0x50 isDMA_DATA), and the stamp at the time of the timeout.The environment of your 19 October run is fine, and no extra variables are needed. Each new
label … wait submittedline, with thetimed outline above it, is all we need.@MarcZX10, this complements the label trace from #4855: it needs no address in advance, and it shows the decision made at submission.
MarcZX10 commentedon Oct 22, 2026
This newer diagnostic is a good fit for the Sifu signature: the reported waited value matches other label addresses, and the earlier 256-submission dump left waits 1–3 without a visible producer. The branch says it can explain the submission-time decision and recent stores without a preselected address. If you rerun Sifu or Kena, could you attach each
WAIT_REG_MEM ... timed outline together with its immediately followinglabel ... wait submittedline from this build? Please include the tested branch commit/base and whether those new lines identify any producer or only earlier stores. That should clarify whether these waits are rejected at submission or later overwritten; I’m not proposing a wait-semantic change from the current evidence.dantdmdarealguy commentedon Oct 22, 2026
Stray (PPSA02100) 01.002.000 on current
maind6eafa54d, Windows 11 Pro, Intel Core i9-14900K, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), Release,relinker --windows,APS5_PLAYGO_UNLISTED_CHUNKS=installed.The Stray row's signature still occurs, but rarely and without stopping the title: 8 timeouts in 1 of 18 runs (the first run, cold shader cache), 0 in the other 17 (60-900 s each, one of them cold again). In that run the title kept presenting after every timeout and reached the menu and controllable gameplay. The
FATALthat followed the timeout in the 12 October row did not occur.The other seven waited labels held
0x21041ca0,0x210037a0,0x20fae620,0x20f99940,0x2105c980,0x2105f0e0and0x21048c20. The first and last are a label's own address ±0x20 or ±0x180; the others point further away in the same0x1020f.....-0x10210.....area. The preceding packets have the same shape as the Coral Island row (SET_SH_REG 0x240with a... a1b00fac ...T#, twoRELEASE_MEMto other addresses,SET_UCONFIG_REG 0x342,WAIT_REG_MEM 0x13).Label addresses repeat across Stray runs, so
APS5_TRACE_LABEL=102103dc20(withAPS5_PM4_RING=256 APS5_STALL_WATCHDOG_SECS=2 APS5_LOG_SYNC=1) picks up the same slots in a later run. In those runs (7 warm 60 s runs and one 420 s cold run) no wait timed out. The trace shows the slot pool at a 0x20 stride (0x102103db40,...db60, ...,...dc20). On it, queue 0 writes each slot withDMA_DATA c6306000 00000000 00000000 <slot> 00000010 00000004followed byRELEASE_MEM 0600e52d 20010000 <slot> 00000010 00000001, and then waits on it itself (WAIT_REG_MEM 00000113). Queue 0x20 waits on the same slots (WAIT_REG_MEM 00000013) and also produces some itself (DMA_DATA 46306000 ...,RELEASE_MEM 0600c528 ...). In the cold 420 s run, the 7 queue 0x20 waits in the traced window were all received before queue 0'sDMA_DATA+RELEASE_MEMfor that slot, 140-249 ms (median 173 ms) earlier, and all completed. A slot whose producer comes 140-249 ms after the wait is close to the 1000 ms timeout once a cold start slows queue 0 down. That fits the timeouts showing up only in the cold first run, but I have not traced a run that timed out, so this is not established.Not shown: what writes the address-like value into the slot (it looks like a free-list link from the CPU, but no CPU store was traced), and whether the wait in the timed-out run was received before or after its slot's last
RELEASE_MEM. No change proposed.