PPSA38500: title stops submitting during story loading — all guest threads parked, queue starves, then CLWB #UD in the death path (all-thread capture inside the frozen window) #27914

Open
opened 2026-11-27 20:13:34 +00:00 by akkadbakkad89 · 0 comments
akkadbakkad89 commented 2026-11-27 20:13:34 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-11-27T20:13:34Z.


Summary

In PPSA38500 the title eventually stops submitting GPU work while every guest thread is parked in a kernel wait — no thread executing title code anywhere. Presents then collapse over ~40 s as the queue starves (never jams — final state is idle queue=0x0), and the process dies shortly after. Host-side instrumentation shows no stuck queue, no WAIT_REG_MEM wedge, no failed dispatch: the GPU starvation is a downstream symptom. The cause is upstream in the title's own thread synchronization. This is the "title stops submitting" stall shape, split out of #27759 at @oneandonlydean's request — distinct from the reporter's queue-stuck-in-dispatch shape there.

Frozen-window anatomy (all-thread capture)

Captured on a build with symbols using the crash handler's all-thread report (98+ threads; module+offsets, host frames resolved). The capture is from inside the frozen window: presents had already fallen from 82 to 28 per 10 s when the process died.

Every guest-visible thread is parked in a TimedWait::Condition chain. Not one thread is executing title work. The occupancy map, deduplicated by first guest frame:

  • the bulk of the pool parked through the title's app.exe+0x8491d3e / app.exe+0x848c640 wrappers (the same wrappers that sit behind sceKernelWaitEventFlag in earlier captures) — idle workers, no work offered
  • threads parked through app.exe+0x8bccfef, app.exe+0x8ad99b9, app.exe+0xbfbabe and other wrappers of the same title sync primitives — the job system's various waiters
  • in captures of the same freeze on earlier builds: exactly one thread in sceKernelWaitSema through the title's app.exe+0x848d99d wrapper (the shape Flamingo-Socks identified as the main thread waiting on the never-answered semaphore), one in sceKernelWaitEqueue through app.exe+0x852e267, one in a sceKernelUsleep polling chain

Nothing holds a lock in an unusual state that we can see; nothing is spinning. The shape is a job system with no jobs in flight: the chain that should produce the work (or signal the completion) never fires. This is the lost-wakeup / missing-submission shape rather than a circular wait — a circular wait would show at least one thread blocked on a primitive held by another blocked thread, while here the workers are simply idle.

Death-sequence timing (this capture, gpu clock)

gpu-t event
162-435 s sustained healthy loading, presents 71-83 per 10 s
~435 s freeze onsets — presents 82 → 62 → 55 → 54 → 28 per 10 s over 40 s
461.9 / 463.9 / 472.8 s first idle queue=0x0 events — starvation in progress
480.2 s final submissions trickle out (serials 5948-5952, dwindling dword counts), done serial=5949, nothing after
480.3 s process dies — see below

The submission stream stops before the process dies, and the queue goes idle rather than wedging — consistent across every capture we have of this stall (6+ boots).

The death is the title killing itself — and the mechanism moved

On pre-shader-fix builds the death was the title watchdog's default path: write of 0 at app.exe+0x848c55a (the mov dword [0], imm hook), matching what Flamingo-Socks, GiannisG1 and Ling-Mo-han decoded. On this build — with the sampler-table fixes in and shader failures eliminated — the death is different and it is informative:

FATAL: unhandled exception 0xc000001d (STATUS_ILLEGAL_INSTRUCTION) on thread 8092
rip app.exe+0x5063b0   bytes 66 0f ae 32 48 83 c2 40

66 0f ae 32 decodes as CLWB [rdx] — cache-line write-back, 66 0F AE /6 memory form — followed by add rdx, 0x40 (one cache line): a loop writing back a memory region line by line. It is not one of the SSE4a bit-field instructions (extrq/insertq, 0F 78/79) the libc emulation layer covers, and it is the first time the instruction appears in the whole run (0 emulated — the SSE4a path never triggered). CLWB exists on the PS5's Zen 2; on a host without it, this is #UD. Reading it together with the watchdog-hook decode (test handler qword; if present, call it instead of the null write): the earlier builds died before the title installed its crash handler (default null-write path), while this healthier build gets far enough that the handler exists, gets invoked when things go wrong, and itself dies executing the flush-your-crash-dump path. Frame chain of the crashing thread: app.exe+0x51e90b4 ← app.exe+0x5220b4d ← app.exe+0x18f469b.

If the crash-reporter reading is right, there is a host-side feature gap independent of the freeze itself: the title's crash reporter is unexecutable on such hosts (CLWB could simply be emulated as a no-op or a plain store fence — x86 cache coherence makes it advisory), which also means we will never see the title's own crash diagnostics — exactly when they would be most useful.

What the shader-fix exoneration established first

With #27779 + 00ace24e46 in the build, GetSamplerResource/GetImageResource refusal lines went from 308 distinct shaders to zero (third hardware confirmation, RTX 3070 driver 617.42), with genuine compile activity in the same run. The freeze still happens at the same progression point with the same shapes — it is not compile-caused, compile-fed, or compile-timed. Notably the healthy phase is longer with shaders fixed (4.5+ minutes at full present rate vs. ~2-3 before), since compile throughput no longer delays progression.

Last ~60 s of log before the death

Interleaving aside, the final minute is dominated by normal queue-0 activity decaying into the starvation trickle quoted in the timeline. Nothing host-side complains: no Vulkan errors, no device-lost, no ring reports, no memory pressure events. Representative tail lines available on request (the raw err.log is large); the sampler's collapsed queue-0 stacks for the whole run also available.

Reproduction

Boot PPSA38500 on Windows with the community stack (#27590 #27821 #27648 #27872 #27684 #27779 + 00ace24e46 — note the fixed driver requires ninja libs, plain ninja never refreshes the patched .prx outputs), proceed through the menus into story loading. The freeze onsets during loading every time we have captured it; wall-clock timing varies with cache warmth (gpu-t ~435 s this run). APS5_HANG_DUMP_SECS or the crash handler's report captures the thread state inside the window.

Open questions the capture raises

  1. The thread that should answer the main thread's semaphore is one of the parked waiters — but which one, and what upstream event should have unblocked it? The static end-state can't name the lost wakeup; if the title's job system events are visible through sceKernelWaitEqueue/sceKernelWaitEventFlag arguments, capturing the wait arguments (event flag bits, equeue ids) in the report would discriminate.
  2. Is the CLWB death really the title's crash reporter? If yes, emulating CLWB (a no-op or sfence is sufficient on x86) might let the title produce its own crash dump, which could answer question 1 from the title's side. Before writing that PR I'd want a second confirmation of the path — does anyone with the title disassembly recognize the app.exe+0x5063b0 neighborhood as the crash/abort reporter?
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6653808596 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/27914). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-11-27T20:13:34Z. --- ### Summary In PPSA38500 the title eventually stops submitting GPU work while every guest thread is parked in a kernel wait — no thread executing title code anywhere. Presents then collapse over ~40 s as the queue starves (never jams — final state is `idle queue=0x0`), and the process dies shortly after. Host-side instrumentation shows no stuck queue, no `WAIT_REG_MEM` wedge, no failed dispatch: the GPU starvation is a downstream symptom. The cause is upstream in the title's own thread synchronization. This is the "title stops submitting" stall shape, split out of #27759 at @oneandonlydean's request — distinct from the reporter's queue-stuck-in-dispatch shape there. ### Frozen-window anatomy (all-thread capture) Captured on a build with symbols using the crash handler's all-thread report (98+ threads; module+offsets, host frames resolved). The capture is from inside the frozen window: presents had already fallen from 82 to 28 per 10 s when the process died. **Every guest-visible thread is parked in a `TimedWait::Condition` chain. Not one thread is executing title work.** The occupancy map, deduplicated by first guest frame: - the bulk of the pool parked through the title's `app.exe+0x8491d3e` / `app.exe+0x848c640` wrappers (the same wrappers that sit behind `sceKernelWaitEventFlag` in earlier captures) — idle workers, no work offered - threads parked through `app.exe+0x8bccfef`, `app.exe+0x8ad99b9`, `app.exe+0xbfbabe` and other wrappers of the same title sync primitives — the job system's various waiters - in captures of the same freeze on earlier builds: exactly one thread in `sceKernelWaitSema` through the title's `app.exe+0x848d99d` wrapper (the shape Flamingo-Socks identified as the main thread waiting on the never-answered semaphore), one in `sceKernelWaitEqueue` through `app.exe+0x852e267`, one in a `sceKernelUsleep` polling chain Nothing holds a lock in an unusual state that we can see; nothing is spinning. The shape is a job system with no jobs in flight: the chain that should produce the work (or signal the completion) never fires. This is the lost-wakeup / missing-submission shape rather than a circular wait — a circular wait would show at least one thread blocked on a primitive held by another blocked thread, while here the workers are simply idle. ### Death-sequence timing (this capture, gpu clock) | gpu-t | event | |---|---| | 162-435 s | sustained healthy loading, presents 71-83 per 10 s | | ~435 s | freeze onsets — presents 82 → 62 → 55 → 54 → 28 per 10 s over 40 s | | 461.9 / 463.9 / 472.8 s | first `idle queue=0x0` events — starvation in progress | | 480.2 s | final submissions trickle out (serials 5948-5952, dwindling dword counts), `done serial=5949`, nothing after | | 480.3 s | process dies — see below | The submission stream stops *before* the process dies, and the queue goes idle rather than wedging — consistent across every capture we have of this stall (6+ boots). ### The death is the title killing itself — and the mechanism moved On pre-shader-fix builds the death was the title watchdog's default path: write of 0 at `app.exe+0x848c55a` (the `mov dword [0], imm` hook), matching what Flamingo-Socks, GiannisG1 and Ling-Mo-han decoded. On this build — with the sampler-table fixes in and shader failures eliminated — the death is different and it is informative: ``` FATAL: unhandled exception 0xc000001d (STATUS_ILLEGAL_INSTRUCTION) on thread 8092 rip app.exe+0x5063b0 bytes 66 0f ae 32 48 83 c2 40 ``` `66 0f ae 32` decodes as **CLWB [rdx]** — cache-line write-back, `66 0F AE /6` memory form — followed by `add rdx, 0x40` (one cache line): a loop writing back a memory region line by line. It is not one of the SSE4a bit-field instructions (`extrq`/`insertq`, `0F 78/79`) the libc emulation layer covers, and it is the first time the instruction appears in the whole run (0 emulated — the SSE4a path never triggered). CLWB exists on the PS5's Zen 2; on a host without it, this is #UD. Reading it together with the watchdog-hook decode (test handler qword; if present, call it instead of the null write): the earlier builds died before the title installed its crash handler (default null-write path), while this healthier build gets far enough that the handler exists, gets invoked when things go wrong, and itself dies executing the flush-your-crash-dump path. Frame chain of the crashing thread: `app.exe+0x51e90b4 ← app.exe+0x5220b4d ← app.exe+0x18f469b`. If the crash-reporter reading is right, there is a host-side feature gap independent of the freeze itself: the title's crash reporter is unexecutable on such hosts (CLWB could simply be emulated as a no-op or a plain store fence — x86 cache coherence makes it advisory), which also means we will never see the title's own crash diagnostics — exactly when they would be most useful. ### What the shader-fix exoneration established first With #27779 + `00ace24e46` in the build, `GetSamplerResource`/`GetImageResource` refusal lines went from 308 distinct shaders to **zero** (third hardware confirmation, RTX 3070 driver 617.42), with genuine compile activity in the same run. The freeze still happens at the same progression point with the same shapes — it is not compile-caused, compile-fed, or compile-timed. Notably the healthy phase is *longer* with shaders fixed (4.5+ minutes at full present rate vs. ~2-3 before), since compile throughput no longer delays progression. ### Last ~60 s of log before the death Interleaving aside, the final minute is dominated by normal queue-0 activity decaying into the starvation trickle quoted in the timeline. Nothing host-side complains: no Vulkan errors, no device-lost, no ring reports, no memory pressure events. Representative tail lines available on request (the raw err.log is large); the sampler's collapsed queue-0 stacks for the whole run also available. ### Reproduction Boot PPSA38500 on Windows with the community stack (#27590 #27821 #27648 #27872 #27684 #27779 + `00ace24e46` — note the fixed driver requires `ninja libs`, plain `ninja` never refreshes the patched `.prx` outputs), proceed through the menus into story loading. The freeze onsets during loading every time we have captured it; wall-clock timing varies with cache warmth (gpu-t ~435 s this run). `APS5_HANG_DUMP_SECS` or the crash handler's report captures the thread state inside the window. ### Open questions the capture raises 1. The thread that should answer the main thread's semaphore is one of the parked waiters — but which one, and what upstream event should have unblocked *it*? The static end-state can't name the lost wakeup; if the title's job system events are visible through `sceKernelWaitEqueue`/`sceKernelWaitEventFlag` arguments, capturing the wait arguments (event flag bits, equeue ids) in the report would discriminate. 2. Is the CLWB death really the title's crash reporter? If yes, emulating CLWB (a no-op or sfence is sufficient on x86) might let the title produce its own crash dump, which could answer question 1 from the title's side. Before writing that PR I'd want a second confirmation of the path — does anyone with the title disassembly recognize the `app.exe+0x5063b0` neighborhood as the crash/abort reporter?
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#27914
No description provided.