Ratchet & Clank: Rift Apart: SIGSEGV since #861, an address-less 64 GiB reservation now takes the addresses the title hints next #2704

Closed
opened 2026-10-10 11:35:58 +00:00 by EdouardSence · 2 comments
EdouardSence commented 2026-10-10 11:35:58 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-10T11:35:58Z.


Title: Ratchet & Clank: Rift Apart (PPSA01474)
Where it stops on main b5f5362d3: SIGSEGV (SEGV_ACCERR) about 11 s after launch, on the main thread, in the guest libc memset(0x12c4e03008, 0xff, 0x1000) called from the eboot. No what(), the process dies on the signal. 3 of 3 runs.

With #861 reverted locally (git revert -m 1 b0cccf20a, nothing else changed), the crash is gone in 2 of 2 runs and the title runs on to the existing #2102 stop (AGC graphics: color views of several array slices are unsupported).

What the memory trace shows

APS5_TRACE_MEMORY=1, plus a local trace line (not pushed) that prints the address the guest passes in to DoMapDirect / DoReserveVirtual before placement:

[memory] map direct request hint=0x12bca00000+0x5c00000 flags=0x400000
[memory] map direct 0x12bca00000+0x5c00000 phys=0x232000000 prot=0x3f2 flags=0x400000 align=0x4000
[memory] reserve request hint=(nil)+0x1000000000 flags=0x0
[memory] reserve 0x12c2600000+0x1000000000 flags=0x0 align=0x200000
[memory] allocate physical 0x237c00000+0xd5200000
[memory] allocate physical 0x30ce00000+0x204000
[memory] map direct request hint=0x12c4600000+0x204000 flags=0x400000
[memory] map direct 0x22c2600000+0x204000 phys=0x30ce00000 prot=0x42 flags=0x400000 align=0x4000
[memory] allocate physical 0x3e3c4000+0x8000
[memory] map direct request hint=0x12c4e00000+0x8000 flags=0x400000
[memory] map direct 0x22c2804000+0x8000 phys=0x3e3c4000 prot=0xc2 flags=0x400000 align=0x4000

then the fault at 0x12c4e03008, which is inside the 8 KiB block's requested address (hint + 0x3008), not inside where it was placed (0x22c2804000).

  1. The title reserves 64 GiB with no address (hint=(nil), flags 0). Since #861 that reservation is placed at the lowest free address of the arena, 0x12c2600000, directly after the title's last mapping.
  2. The title then maps direct memory with an address but without MAP_FIXED (flags 0x400000, no-coalesce only), at 0x12c4600000 and 0x12c4e00000, which are now inside its own 64 GiB reservation, so both are placed above it at 0x22c2600000 and 0x22c2804000.
  3. The title writes to 0x12c4e03008 and faults on the PROT_NONE reservation.

Before #861 the same 64 GiB reservation went to 0x7ef4ffe00000 (host top-down mmap), the hinted maps landed on their hints (map direct 0x12c4600000+0x204000, map direct 0x12c4e00000+0x8000), and the title later fills the reservation with remap fixed 0x7ef4ffe00000+0x30000 ... phys=0x237c00000 and so on.

I have no source for where the PS5 kernel places an address-less reservation, so I am not proposing a placement rule. The data says this title assumes an address-less 64 GiB reservation does not take the addresses it hints next, and it uses the hinted address rather than the returned one (or something derived from it).

Setup

  • CachyOS, kernel 7.2.9, RX 9070 XT (RADV), Release build of b5f5362d3, headless gamescope, APS5_NO_SNAPSHOT_CHECK=1.
  • Fault: si_code=2, si_addr=0x12c4e03008, rdi=0x12c4e03008 rsi=0xff rdx=0x1000, pc in libc.prx.guest.prx. In the core, 0x12c2600000-0x22c2600000 is one 64 GiB segment with no access, and the RW segment before it ends at 0x12c2600000.

Related: #2603 (closed by #2647); this is the next stop on the same title.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5790848774 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2704). Originally posted by [EdouardSence](https://github.com/EdouardSence) on 2026-10-10T11:35:58Z. --- **Title:** Ratchet & Clank: Rift Apart (PPSA01474) **Where it stops on main `b5f5362d3`:** SIGSEGV (`SEGV_ACCERR`) about 11 s after launch, on the main thread, in the guest libc `memset(0x12c4e03008, 0xff, 0x1000)` called from the eboot. No `what()`, the process dies on the signal. 3 of 3 runs. With #861 reverted locally (`git revert -m 1 b0cccf20a`, nothing else changed), the crash is gone in 2 of 2 runs and the title runs on to the existing #2102 stop (`AGC graphics: color views of several array slices are unsupported`). ### What the memory trace shows `APS5_TRACE_MEMORY=1`, plus a local trace line (not pushed) that prints the address the guest passes in to `DoMapDirect` / `DoReserveVirtual` before placement: ``` [memory] map direct request hint=0x12bca00000+0x5c00000 flags=0x400000 [memory] map direct 0x12bca00000+0x5c00000 phys=0x232000000 prot=0x3f2 flags=0x400000 align=0x4000 [memory] reserve request hint=(nil)+0x1000000000 flags=0x0 [memory] reserve 0x12c2600000+0x1000000000 flags=0x0 align=0x200000 [memory] allocate physical 0x237c00000+0xd5200000 [memory] allocate physical 0x30ce00000+0x204000 [memory] map direct request hint=0x12c4600000+0x204000 flags=0x400000 [memory] map direct 0x22c2600000+0x204000 phys=0x30ce00000 prot=0x42 flags=0x400000 align=0x4000 [memory] allocate physical 0x3e3c4000+0x8000 [memory] map direct request hint=0x12c4e00000+0x8000 flags=0x400000 [memory] map direct 0x22c2804000+0x8000 phys=0x3e3c4000 prot=0xc2 flags=0x400000 align=0x4000 ``` then the fault at `0x12c4e03008`, which is inside the 8 KiB block's requested address (`hint + 0x3008`), not inside where it was placed (`0x22c2804000`). 1. The title reserves 64 GiB with no address (`hint=(nil)`, flags 0). Since #861 that reservation is placed at the lowest free address of the arena, `0x12c2600000`, directly after the title's last mapping. 2. The title then maps direct memory with an address but without `MAP_FIXED` (flags `0x400000`, no-coalesce only), at `0x12c4600000` and `0x12c4e00000`, which are now inside its own 64 GiB reservation, so both are placed above it at `0x22c2600000` and `0x22c2804000`. 3. The title writes to `0x12c4e03008` and faults on the `PROT_NONE` reservation. Before #861 the same 64 GiB reservation went to `0x7ef4ffe00000` (host top-down `mmap`), the hinted maps landed on their hints (`map direct 0x12c4600000+0x204000`, `map direct 0x12c4e00000+0x8000`), and the title later fills the reservation with `remap fixed 0x7ef4ffe00000+0x30000 ... phys=0x237c00000` and so on. I have no source for where the PS5 kernel places an address-less reservation, so I am not proposing a placement rule. The data says this title assumes an address-less 64 GiB reservation does not take the addresses it hints next, and it uses the hinted address rather than the returned one (or something derived from it). ### Setup - CachyOS, kernel 7.2.9, RX 9070 XT (RADV), Release build of `b5f5362d3`, headless gamescope, `APS5_NO_SNAPSHOT_CHECK=1`. - Fault: `si_code=2`, `si_addr=0x12c4e03008`, `rdi=0x12c4e03008 rsi=0xff rdx=0x1000`, pc in `libc.prx.guest.prx`. In the core, `0x12c2600000-0x22c2600000` is one 64 GiB segment with no access, and the RW segment before it ends at `0x12c2600000`. Related: #2603 (closed by #2647); this is the next stop on the same title. *Tested and written by Claude (AI assistant) on a contributor's machine.*
fma-rc commented 2026-10-10 14:59:49 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-10T14:59:49Z.


This looks like the same failure as #2687: same title, a hinted non-fixed map inside the 64 GiB reservation is placed above it (0x22c3100000 there, 0x22c2600000 here), and the title then faults at the hinted address. That issue has a fix branch with a guest_memory case; this one has the bisect and the memory trace. I have not reproduced either; this is from reading both reports.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6098824069 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2704#issuecomment-6098824069). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-10T14:59:49Z. --- This looks like the same failure as #2687: same title, a hinted non-fixed map inside the 64 GiB reservation is placed above it (`0x22c3100000` there, `0x22c2600000` here), and the title then faults at the hinted address. That issue has a fix branch with a `guest_memory` case; this one has the bisect and the memory trace. I have not reproduced either; this is from reading both reports.
oneandonlydean commented 2026-10-10 18:08:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T18:08:42Z.


Closing as a duplicate of #2687: the hinted map inside the 64 GiB reservation is placed above it there too, and that issue has a fix branch. The bisect to #861 here is linked from it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6100607824 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2704#issuecomment-6100607824). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-10T18:08:42Z. --- Closing as a duplicate of #2687: the hinted map inside the 64 GiB reservation is placed above it there too, and that issue has a fix branch. The bisect to #861 here is linked from it.
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#2704
No description provided.