AGC: PPSA38500 boots die racily of a non-resolving WAIT_REG_MEM progress-counter wait #28859

Open
opened 2026-12-04 08:41:18 +00:00 by akkadbakkad89 · 0 comments
akkadbakkad89 commented 2026-12-04 08:41:18 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-12-04T08:41:18Z.


What

On PPSA38500, boots die racily of a WAIT_REG_MEM that never resolves. Most memory waits on this title resolve — slowly but they resolve — yet across many boots, sooner or later one wait never completes, the GPU goes quiet with the wait at the head of the ring, and the hang watchdog (APS5_HANG_DUMP_SECS=1800) aborts the process with 0xC0000409. It has struck at wall-clock depths from ~8 minutes to ~31 minutes into a boot, on two different build generations, with no reproducible trigger. This is the single remaining killer of otherwise healthy boots on our host — everything else (device loss, memory walls) has been either fixed or configured away.

How it differs from #6558

#6558 tracks waits that time out with the awaited word holding an address-like value (function 3, ref 0x1) — a label-corruption signature. Ours looks like a different animal: the ring dump operand layout reads as a progress-counter wait — ref 0x00001970 under mask 0xffffffff, which is a count-style target, not a 0/1 label. The transient version of this wait resolves in ~1.6 s; the fatal one never does, consistent with the producer side of a producer/consumer fence never completing rather than the label word being corrupt. I am not certain the root causes are disjoint, but the signatures differ enough that I am filing separately — please redirect if you judge them the same.

Evidence

Host: RTX 3070 8 GB, driver 617.42, i7-10700, 32 GB RAM, Windows 11. Boot env: jassycliq's published compile-wall settings (8 GB-adapted), slabs off, APS5_DUMP_DEVICE_FAULT active — ring dumps preserved.

Ring dump tail at the fatal hang (perf(agc) head 4848022013, the wait sitting at the head behind ACQUIRE_MEM):

[pm4 ring]   +0x0004 WAIT_REG_MEM 00000015 04278860 00000010 00001970 ffffffff 00000019
[pm4 ring]   +0x0012 WAIT_REG_MEM 00000015 04278800 00000010 00001970 ffffffff 00000019

Steady-state wait cost while boots are healthy — these resolve, but slowly (10 s observation windows):

[packets] queue 0x20 1 submissions, time by packet (10 s): DISPATCH_DIRECT x3 8654ms WAIT_REG_MEM x1 1628ms SET_SH_REG x...
[packets] queue 0x40 1 submissions, time by packet (10 s): DISPATCH_DIRECT x1 8653ms WAIT_REG_MEM x1 1628ms SET_SH_REG x...

Frequency data across the current campaign (compile-wall tree, both 5d3586347a and 4848022013):

boot outcome fatal signature
chain b1 deepest run of campaign at the time, ended by device loss (slabs still on) —
chain b2 hang at ~t≈1000, watchdog abort at 1800 s non-resolving WAIT_REG_MEM behind ACQUIRE_MEM
chain b3 died at 8 min device loss (slabs on)
slabs-free chain, 4 boots zero device losses; boots died only of this wait pattern or ran deep racy WAIT_REG_MEM
4848022013 b3 ran to extreme depth (millions of game-time units, full free-run), then died at 31 min wall same ring signature, WAIT_REG_MEM head-of-ring

Transient waits that resolve: ~45–175 waited for GPU work warnings per boot, worst single wait observed 520 ms at the host-write level — the waits are a constant presence on this title, not a corner case.

One correlation worth flagging: [gpu] guest snapshot differs from registered memory diagnostics appear in the logs of affected boots. Whether the tracking divergence is cause, effect, or coincidence I cannot tell from outside.

What I have ruled out

  • Not device loss: zero VK_ERROR_DEVICE_LOST in the fatal boots (and slabs are off — device loss has not recurred since).
  • Not a wall: same boots traverse the same depth cleanly on retry — depth of death is random, content-independent.
  • Not the compile storm: fatal waits occur both during storm phases and in calm free-running phases.

What I cannot do from here, and a proposed direction

Root-causing sits inside the GPU runtime's memory-writeback visibility machinery, which I cannot responsibly patch blind. If it helps focus the search, my reading of the evidence points at one of: (a) a producer write-back that is dropped or reordered under memory pressure — the 8 GB host pages hard, and the pressure correlation may explain why this does not appear in 24 GB reports; (b) ordering between the producer dispatch's completion writeback and the consumer's wait when ACQUIRE_MEM intervenes — the wait consistently sits directly behind one in the dumps; (c) the host-side snapshot/registration tracking losing coherence for the waited page, per the diagnostics above.

Cheap instrumentation that would discriminate: if #27808 (configurable ring-dump depth) lands, the next death captures enough of the producer side to tell whether the producing dispatch even made it into the ring. I can also run controlled frequency experiments (memory-pressure relief vs wait-hang rate) if a maintainer sketches what knob isolation would be most informative — happy to be the test host; this title currently boots deep enough on this machine to make the measurement cheap.

Logs, ring dumps, and the full boot environment are preserved on disk and I can attach any slice of them on request.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6788265489 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/28859). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-12-04T08:41:18Z. --- ### What On PPSA38500, boots die racily of a `WAIT_REG_MEM` that never resolves. Most memory waits on this title resolve — slowly but they resolve — yet across many boots, sooner or later one wait never completes, the GPU goes quiet with the wait at the head of the ring, and the hang watchdog (`APS5_HANG_DUMP_SECS=1800`) aborts the process with `0xC0000409`. It has struck at wall-clock depths from ~8 minutes to ~31 minutes into a boot, on two different build generations, with no reproducible trigger. This is the single remaining killer of otherwise healthy boots on our host — everything else (device loss, memory walls) has been either fixed or configured away. ### How it differs from #6558 #6558 tracks waits that time out with the awaited word holding an *address-like* value (function 3, ref 0x1) — a label-corruption signature. Ours looks like a different animal: the ring dump operand layout reads as a progress-counter wait — ref `0x00001970` under mask `0xffffffff`, which is a count-style target, not a 0/1 label. The transient version of this wait resolves in ~1.6 s; the fatal one never does, consistent with the producer side of a producer/consumer fence never completing rather than the label word being corrupt. I am not certain the root causes are disjoint, but the signatures differ enough that I am filing separately — please redirect if you judge them the same. ### Evidence Host: RTX 3070 8 GB, driver 617.42, i7-10700, 32 GB RAM, Windows 11. Boot env: jassycliq's published compile-wall settings (8 GB-adapted), slabs off, `APS5_DUMP_DEVICE_FAULT` active — ring dumps preserved. Ring dump tail at the fatal hang (`perf(agc)` head `4848022013`, the wait sitting at the head behind `ACQUIRE_MEM`): ``` [pm4 ring] +0x0004 WAIT_REG_MEM 00000015 04278860 00000010 00001970 ffffffff 00000019 [pm4 ring] +0x0012 WAIT_REG_MEM 00000015 04278800 00000010 00001970 ffffffff 00000019 ``` Steady-state wait cost while boots are healthy — these resolve, but slowly (10 s observation windows): ``` [packets] queue 0x20 1 submissions, time by packet (10 s): DISPATCH_DIRECT x3 8654ms WAIT_REG_MEM x1 1628ms SET_SH_REG x... [packets] queue 0x40 1 submissions, time by packet (10 s): DISPATCH_DIRECT x1 8653ms WAIT_REG_MEM x1 1628ms SET_SH_REG x... ``` Frequency data across the current campaign (compile-wall tree, both `5d3586347a` and `4848022013`): | boot | outcome | fatal signature | |---|---|---| | chain b1 | deepest run of campaign at the time, ended by device loss (slabs still on) | — | | chain b2 | hang at ~t≈1000, watchdog abort at 1800 s | non-resolving `WAIT_REG_MEM` behind `ACQUIRE_MEM` | | chain b3 | died at 8 min | device loss (slabs on) | | slabs-free chain, 4 boots | zero device losses; boots died only of this wait pattern or ran deep | racy `WAIT_REG_MEM` | | `4848022013` b3 | ran to extreme depth (millions of game-time units, full free-run), then died at 31 min wall | same ring signature, `WAIT_REG_MEM` head-of-ring | Transient waits that resolve: ~45–175 `waited for GPU work` warnings per boot, worst single wait observed 520 ms at the host-write level — the waits are a constant presence on this title, not a corner case. One correlation worth flagging: `[gpu] guest snapshot differs from registered memory` diagnostics appear in the logs of affected boots. Whether the tracking divergence is cause, effect, or coincidence I cannot tell from outside. ### What I have ruled out - **Not device loss**: zero `VK_ERROR_DEVICE_LOST` in the fatal boots (and slabs are off — device loss has not recurred since). - **Not a wall**: same boots traverse the same depth cleanly on retry — depth of death is random, content-independent. - **Not the compile storm**: fatal waits occur both during storm phases and in calm free-running phases. ### What I cannot do from here, and a proposed direction Root-causing sits inside the GPU runtime's memory-writeback visibility machinery, which I cannot responsibly patch blind. If it helps focus the search, my reading of the evidence points at one of: (a) a producer write-back that is dropped or reordered under memory pressure — the 8 GB host pages hard, and the pressure correlation may explain why this does not appear in 24 GB reports; (b) ordering between the producer dispatch's completion writeback and the consumer's wait when `ACQUIRE_MEM` intervenes — the wait consistently sits directly behind one in the dumps; (c) the host-side snapshot/registration tracking losing coherence for the waited page, per the diagnostics above. Cheap instrumentation that would discriminate: if #27808 (configurable ring-dump depth) lands, the next death captures enough of the producer side to tell whether the producing dispatch even made it into the ring. I can also run controlled frequency experiments (memory-pressure relief vs wait-hang rate) if a maintainer sketches what knob isolation would be most informative — happy to be the test host; this title currently boots deep enough on this machine to make the measurement cheap. Logs, ring dumps, and the full boot environment are preserved on disk and I can attach any slice of them on request. AI-assisted: yes.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#28859
No description provided.