Gran Turismo 7 (PPSA01317): deadlock on the garage transition between the idle store (GPU mutex, then guest allocations) and a direct-memory release (guest allocations, then GPU mutex) #28461
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from boykopovar/AnyPS5. Originally posted by humanityBG on 2026-11-30T20:16:15Z.
What happens
Deadlock between the idle store and a direct-memory release.
VulkanDevice::StoreIdleResultstakesGuestMemory::GpuMutex()and then waits for the guest allocations lease, while a title thread insceKernelCheckedReleaseDirectMemoryholds the allocations lock inGuestAllocationsUnmapand waits forGpuMutexthrough the write-watch path of a storage texture kept by the CPU. Every queue then waits behind queue 0 ([pm4 ring] queue 0x.. order behind queue 0 ... has not progressed), the title'sJob#0thread spins waiting for the GPU, and the picture freezes for good. No abort, noFATAL; the log goes silent.Queue worker 0 (
qworker 0x0), no CPU between snapshots 25 min apart:A title thread (
Updat...), releasing direct memory:Title, test or build step
Gran Turismo 7, PPSA01317 01.710.000. Own decrypted dump, every module unwrapped from SELF, relinked with
--windows --to-intel. Run withAPS5_SPLIT_TABLE_CALLS=1(the garage's call table holds 307 targets).AnyPS5 commit
maina0e55122cb+ #24083 + #16935 + #28289 (with #28279, #28280) + #28388; the title needs #24083 and #16935 to reach the garage. Two merge conflicts resolved locally (#24083 inDepthSurface.cpp, #16935 in the sampler cache key), neither in the code above.System
Windows 11, Intel CPU, RTX 2080 Ti, NVIDIA 617.42, WinLibs GCC 15.2.0, Release.
Steps to reproduce
2 of 2 runs with stack snapshots, the same with and without
APS5_ASYNC_DRAW_COMPILE=1(so not #28289). A third run (cold cache) froze at the same point; no snapshot. Earlier trees (mainc75a81520b+ #22767 + #24083 + #16935, 2026-11-25) passed the same transition in 3 of 3 runs.Log
Nothing is logged at the hang. The last game lines before it are
ReportPreparedAtUsefor shader0x120af97800stage 5; the stall watchdog (APS5_STALL_WATCHDOG_SECS=30) reports queues 0x23, 0x2a, 0x2b, 0x4b waiting on queue 0.What was checked
cdb -pvsnapshots, then a full dump of the hung process; resolved withnmon the unpatched prx files and each module's ImageBase. The title thread's chain comes from a raw stack scan (dps @rsp), since its stack does not unwind through title code; the frames are in a consistent calling order.c75a81520banda0e55122cbno commit touchesAccessKeptByCpu,DeferToMirror,watchWritesorGuestArenaReset, so the path is older. The queue 0 side did change: #26450 (5929fdd938) resumes a yielded idle store without a new quiet period, soStoreIdleResultstakesGpuMutexagain within ~2 ms. That is a guess at why the window got wider, not tested.AI-assisted: yes.