AGC: Jedi Survivor (PPSA07783) device-loss — compute dispatches stall 30-80s in BDA address-binding host prep (AcquireRegistered/AddSnapshot) #25019

Open
opened 2026-11-21 15:05:20 +00:00 by tablefrogpillow · 0 comments
tablefrogpillow commented 2026-11-21 15:05:20 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by tablefrogpillow on 2026-11-21T15:05:20Z.


What happens

Star Wars Jedi: Survivor (PPSA07783) loses the device (VK_ERROR_DEVICE_LOST) on AMD RADV at ~73 s into the first scene load, reproducibly on two architectures (Vega GCN5 / RADV VEGA10, and the RDNA2 iGPU / RADV RAPHAEL_MENDOCINO). The cause is BDA-using compute dispatches stalling tens of seconds in host-side address-binding preparation, far past amdgpu's GPU-hang timeout.

Evidence

  • A BDA-using compute dispatch (e.g. 333x1x1, 22975 words) spends 31–79 s in the resources: address bindings (bda) phase while resources: A locked (bda) is only ~3 ms — so the time is in the unlocked AcquireRegistered() + AddSnapshot loop of ShaderResources::prepareAddressBindings (Graphics/src/ShaderAddressResources.cpp → Graphics/src/GuestBufferMemory.cpp), not the lock acquisition. Representative line:
    [dispatch] 333x1x1 22975 words: resources=79653.32ms ... resources: A locked (bda)=3.14ms resources: address bindings (bda)=79644.94ms
  • perf-sampling the stalled process captured ~0 CPU → the stall is a wait (lock/sync contention), not a slow algorithm.
  • APS5_NO_SNAPSHOT_CHECK=1 does not remove the stall (so it is not the snapshot live-compare memcmp). With the compare off the title crawls (6 draws, still 79 s stalls) rather than losing the device — slow but alive.
  • Jedi's guest arena is ~1 TB (0x10000+0xfbffff0000) and the write-watch / memory-tracking threads are very active during the stall (tracker waits 275 / 14912).

The 79 s wait ≫ amdgpu's ~10 s hang timeout → radv/amdgpu: The CS has been cancelled because the context is lost (soft recovery) → VK_ERROR_DEVICE_LOST.

Hypothesis (unconfirmed)

The GPU-dispatch BDA address-binding prep appears to serialize against the guest-memory write-watch/tracking over the huge arena. I could not pin the exact lock from a clean stalled-thread backtrace; sharing in case the GuestBufferMemory owners can see it immediately.

Not a duplicate

Distinct from #22372 (that is the GPU-side note_bda_write per-store overhead); this is the CPU-side host address-binding prep. Distinct from #24525 (table-call cold-compile watchdog) — Jedi hits this device-loss before building the large compute modules, so it never reaches that scenario.

System

Relinked on Linux; run on AMD Vega 56 (RADV VEGA10) and AMD RDNA2 iGPU (RADV RAPHAEL_MENDOCINO), Mesa 26.2.6. AnyPS5 main b2777a78de.

Reproduce

Relink Jedi Survivor (PPSA07783), run with APS5_PROFILE_DRAW=1, reach the first scene (~70 s); the [dispatch] ... resources: address bindings (bda)=NNNNN ms lines climb into the tens of seconds and the device is lost shortly after.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6530493916 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/25019). Originally posted by [tablefrogpillow](https://github.com/tablefrogpillow) on 2026-11-21T15:05:20Z. --- ### What happens Star Wars Jedi: Survivor (PPSA07783) loses the device (`VK_ERROR_DEVICE_LOST`) on AMD RADV at ~73 s into the first scene load, reproducibly on two architectures (Vega GCN5 / RADV VEGA10, and the RDNA2 iGPU / RADV RAPHAEL_MENDOCINO). The cause is BDA-using compute dispatches stalling tens of seconds in host-side address-binding preparation, far past amdgpu's GPU-hang timeout. ### Evidence - A BDA-using compute dispatch (e.g. `333x1x1, 22975 words`) spends **31–79 s** in the `resources: address bindings (bda)` phase while `resources: A locked (bda)` is only ~3 ms — so the time is in the *unlocked* `AcquireRegistered()` + `AddSnapshot` loop of `ShaderResources::prepareAddressBindings` (`Graphics/src/ShaderAddressResources.cpp` → `Graphics/src/GuestBufferMemory.cpp`), not the lock acquisition. Representative line: `[dispatch] 333x1x1 22975 words: resources=79653.32ms ... resources: A locked (bda)=3.14ms resources: address bindings (bda)=79644.94ms` - perf-sampling the stalled process captured ~0 CPU → the stall is a **wait** (lock/sync contention), not a slow algorithm. - `APS5_NO_SNAPSHOT_CHECK=1` does **not** remove the stall (so it is not the snapshot live-compare memcmp). With the compare off the title crawls (6 draws, still 79 s stalls) rather than losing the device — slow but alive. - Jedi's guest arena is ~1 TB (`0x10000+0xfbffff0000`) and the write-watch / memory-tracking threads are very active during the stall (`tracker waits 275 / 14912`). The 79 s wait ≫ amdgpu's ~10 s hang timeout → `radv/amdgpu: The CS has been cancelled because the context is lost` (soft recovery) → `VK_ERROR_DEVICE_LOST`. ### Hypothesis (unconfirmed) The GPU-dispatch BDA address-binding prep appears to serialize against the guest-memory write-watch/tracking over the huge arena. I could not pin the exact lock from a clean stalled-thread backtrace; sharing in case the `GuestBufferMemory` owners can see it immediately. ### Not a duplicate Distinct from #22372 (that is the GPU-side `note_bda_write` per-store overhead); this is the CPU-side host address-binding prep. Distinct from #24525 (table-call cold-compile watchdog) — Jedi hits this device-loss *before* building the large compute modules, so it never reaches that scenario. ### System Relinked on Linux; run on AMD Vega 56 (RADV VEGA10) and AMD RDNA2 iGPU (RADV RAPHAEL_MENDOCINO), Mesa 26.2.6. AnyPS5 `main` b2777a78deb. ### Reproduce Relink Jedi Survivor (PPSA07783), run with `APS5_PROFILE_DRAW=1`, reach the first scene (~70 s); the `[dispatch] ... resources: address bindings (bda)=NNNNN ms` lines climb into the tens of seconds and the device is lost shortly after. 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#25019
No description provided.