Linux: Cult of the Lamb (PPSA06464) faults at process start in UnifyPS5Plugin.prx, a needed library started with a null arguments block #5621
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 fma-rc on 2026-10-14T01:27:11Z.
Cult of the Lamb (PPSA06464, Unity) faults at 1 s on Linux before its first log line, in the start of its own
UnifyPS5Plugin.prx. This is the case split out of #4225 when it was closed.Setup:
maind1670009f, Arch Linux, GCC 16.2.1, NVIDIA RTX 5080. Relinked withrelinker --registry --module-dir Media/Modules --module-dir Media/Plugins.Both of two runs end with exit 139 and an empty log:
app.elflistsUnifyPS5Plugin.prx.guest.prxamong its 65 needed libraries (withIl2cppUserAssemblies,PS5Util,SavedGamesandlibfmod), so the dynamic loader runs itsDT_INIT(0x10ea0, which calls the start at +0x500) at process start, before the title has calledsceKernelLoadStartModule. At +0x19a the start readsargp[0]before it comparesargswith 16, andargpis null. The start then expects a block of{0x10, 0x200, ptr}or{0x58, 0x103}.I do not know what a PS5 passes to the start of a module that the executable imports from.
Imported from boykopovar/AnyPS5. Originally posted by socket1001 on 2026-10-16T19:56:42Z.
Independent reproduction: produced and filed by an autonomous AI agent working on its owner's behalf, with his approval. Every line quoted below is verbatim tool output from this run.
Confirms the same shape on a different Unity title, distro and GPU vendor, so it does not look NVIDIA- or title-specific.
Environment: Ubuntu 24.04.5, kernel 7.0.0-38-generic, Ryzen 5 7600X, AMD RX 6700 XT (RADV NAVI22), glibc 2.39, relinker
v0.1.2tagged release (notmain). Title: Double Dragon (PPSA16018), Unity, folder-format install.Repro
python3 tools/unwrap_self.py <in> <out>on the executable and on every module the install ships (these arrive as SELF containers).relinker-v0.1.2 --module-dir Media/Modules --module-dir Media/Plugins app0/eboot.bin app.elfchmod +x app.elf && DRI_PRIME=1 ./app.elf18 modules convert, all 69
DT_NEEDEDentries ofapp.elfresolve, two of the Unity plugin modules run their start and print, then the process dies ~2 s in with exit 139 and nothing further on stdout/stderr:kernel:
gdb, same build:
at the faulting instruction:
Same mechanism as described: the start of a needed guest module is reached with a null arguments block and reads
argp[0]before comparing anything - here probing the0x103variant throughcmp $0x48,%rax/cmpl $0x103,0x4(%rax)instead of0x58.NativePluginPS5Example.prxis 11,789 bytes and was not loaded by the title withsceKernelLoadStartModulebefore the fault, so only the executable's startup path reaches it: as small a reproducer as this is likely to get.Ruled out in this run: GPU vendor (AMD RADV, not NVIDIA), title (different Unity title and plugin set), missing dependencies (all 69 resolve - the fault is inside converted output), and
--registry(import-audit output only; not passed here).Happy to rebuild and re-run against
mainif a current build is more useful than this release-binary data point.Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-17T09:30:16Z.
With PR #6149 on current
main(6d6e33d63) Cult of the Lamb gets past theUnifyPS5Plugin.prxfault and stops at 1.5 s instead, inIl2cppUserAssemblies.prxfreeing a block through the game's malloc replacement, which aborts because the block belongs to another heap.I logged every direct-memory map with a backtrace. The game's replacement allocator is initialized twice and builds two 256 MiB heaps from the same function (
eboot+0x14c8c56):sce_module/libc.prx(_malloc_init, NIDz8GPiQwaAEY) during its init. This one also happens onmainwithout #6149, before the plugin fault.ApplicationHeap.cpp, the replacement table's init entry), later.Blocks handed out before the second init are freed against the second heap, which is the abort. So with a bundled
libc.prxthe replacement init needs one owner. I am working on a change for that and will link it here.Update: open PR #6610 does this (the bundled libc keeps the init). With #6149 and #6610 on
mainbf2053816only the first heap is created and the abort is gone. The game then shows its studio logo and stays on the loading screen with the spinner: frames keep coming at 60 fps for 150 s, the music bank is reopened about every 50 s, and the log shows no file opens afterresources.assetsandunity_builtin_extra. The same happens withAPS5_PIPELINED_DRAWS=0. In a core taken at 60 s the busiest thread sits inIl2cppUserAssemblies.prx(+0x21e2955) in a loop that walks a list, tests each entry and callssched_yieldwhen none is ready; I have not identified what it waits for.Imported from boykopovar/AnyPS5. Originally posted by socket1001 on 2026-10-17T14:49:43Z.
AI-agent report. This account is a human's; the builds, runs and disassembly below were done by an autonomous agent on copies of three titles we own, per the repo's AI-assisted-contribution rule. Tested:
bf20538+ #6149 + #6610, built locally.Two build notes that cost us time
bf20538(conflicts in the shared files). Cherry-picking their commits ontobf20538applies clean:git cherry-pick cb68b5029 0cd9877c6 72a2fc673.cmake --build buildyields the relinker and a single.prxunderbuild/core/libs/libs/unpatched/; the 127 NID-patched libraries come from a separatecmake --build build --target libs. Without that step the relinked executable fails at launch withlibSceNetCtl.prx: cannot open shared object file.#6149 does take effect on a second title (PPSA16018)
This title stops during plugin initialisation both before and after the PRs, but not at the same instruction:
mainbf20538+ #6149 + #6610NativePluginPS5Example.prx+0x23arax=0 rdi=0 rsi=0rax=0 rdi=0 rsi=0x10The module's executable segment maps at file offset
0x4000, so the module-relative0x23aabove is the same site as the+0x423afile offset quoted in our earlier report on this issue.Our copy of the module carries two argument-block predicates. The one this plugin actually runs on this path accepts
{size = 0x10, version = 0x200}:A second predicate elsewhere in the module (
+0x24b) tests{0x48, 0x103}instead. It is not reached on this path, so it is not an alternative acceptance branch for this title.Where both plain
mainand the fix stack die:What the default arguments block actually does (live gdb; breakpoints on both predicates and on the fault):
kDefaultModuleArgsand the memory reads{0x10, 0x200, nullptr}. The predicate passes - size and version both match. So #6149 is doing exactly what it intends here, and the claim in our previous report that this title's block fails a0x48/0x103check was mistaken - retracted.0x…2960 in gExpDefaultContext () from libs/libkernel.prx), i.e. the module executes the value it was given. Left asnullptr, the call faults at the module's own+0x3a9withrax = rdi = 0.+0x3a9withrax = 0(the accessor at0x3d0returns NULL). So a stub is not sufficient: whatever that field points at is expected to supply or initialise the module's context object.On this title the remaining gap is therefore neither the size/version pair nor the presence of the fallback block. It is that the DT_INIT fallback has nothing real to call and no module context behind it.
The other two titles on the same stack
main.main(Vulkan ready plus texture loading, wheremaindied ~18 s in) and stops on the engine's own assertResourceContext.cpp:155thenGfx file not found [data/prein/effects/gfx/ui_effect_temp_1.jpx].On the spinner stall (
Il2CppUserAssemblies.prx+0x21e2955) - nothing conclusive; our titles stop earlier, so we cannot reproduce it. One negative result: on this line the loader-side primitives such a loop would normally sit on are all implemented in-tree (15sceKernelAio*entries including submit/wait, and the equeue / eventflag / semaphore / sync-on-address paths show no stub markers), so a missing syscall is not an obvious explanation. The cheapest discriminator on the core you already have is whether the game's producer threads exist at all, and where they sit.What the fallback block has to contain - measured, not guessed. Disassembling our copy of the module and tracing it live shows the block is not only validated, it is consumed:
The accessor that later resolves the module's context calls whatever lands in that global:
and the caller then uses that result as a C++ object:
So field
+8(or+0x40in the larger format) has to be a loader-supplied getter of shapeint (*)(int id, void **out): return 0, write the module's context object to*out. #6149's fallback sets it tonullptr, and that - not the size/version pair - is what this title walks into at+0x3a9.Locally we tried it:
contextset to a stub getter that returns 0 and hands back an object with a callable vtable slot, and the plugin's init completes on this title. It is the first build in which this title reaches Vulkan at all - device ready,Swapchain created extent=2224x1251 images=3, assets and 4096x4096 textures loading, shader disk cache writing: a 24 KB log where every previous build produced 374 bytes and died. What it then does, measured: with that field supplied - a correct-signature getter plus an object whose virtual slot is a no-op - the title does not merely get through init, it runs: Vulkan device created, swapchain 2224x1251 with 3 images, texture uploads, and then thousands of presented frames at 59.94 FPS, stepping through its prologue, character select and mission select as keyboard input is delivered, and into the first stage of the game, which runs with its HUD live at 45-60 FPS (frame counter climbing the whole time). So for this title the fallback value of that field cannot be null, and a callable stub is already enough to bring the title up and into gameplay.Correction to an earlier version of this comment. I previously described the title as going quiet about ten seconds in and stalling. That was wrong: it was the emulator's log that went quiet, not the title - the frame counter kept climbing the whole time. What the running process actually looks like at that point: ~100 threads, 19 of them inside
sceKernelWaitSema, and the shared objects behind those waits are namedUnity EventFlagandBaselib_SystemSemaphore- the engine's own job workers idling while it presents frames, which is what a title parked on its intro screen looks like from outside. The stub still only proves the shape of the field (a getter that returns 0 and writes an object to*out, whose[vtable+0x10]is called with(object, <module static +0xc028>)as arguments, the module having registered its callback table in +0xc028); whether the returned object's own methods matter deeper into the title is untested. What the loader is expected to hand back is a working context object, not a placeholder - and that part is real work on the loader side, not a one-line default. So:nullptris definitely wrong for this title, and a callable stub is already enough to play it - what more a real context object buys is untested.Re-checked on current
main. To confirm none of this is an artifact of the base we happened to build on, the same three commits were cherry-picked ontomainas of13d07428a(2026-10-17) - they apply clean, no conflicts - the 127 runtime libraries rebuilt, and all three titles re-run, followed by the gdb work above. Result: identical. PPSA16018 faults at the same instruction with the same registers (+0x3a9,rax=0 rdi=0 rsi=0x10), PPSA14299 is unchanged (Vulkan device + 2224x1251 swapchain, no faults), and PPSA21564 stops at the sameui_effect_temp_1.jpxasset assert. The newer commits on that line do not move any of these three endpoints.Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-10-21T14:34:49Z.
The same fault happens on Windows, and #6149 would not cover it there.
Setup: Windows 11 Pro 26200, Ryzen 7 5800X3D, RX 9070 XT, AMD driver 32.0.32015.7029.
main3e91c8edf. Cult of the Lamb PPSA06464 (US, 01.000.034), relinked with--windows --registry --module-dir Media/Modules --module-dir Media/Plugins. 17 modules, 0 absent imports.Fault: 21 of 21 runs (on
main, and with an unrelatedlibSceAgcDriver.prxchange) die at start on the main thread,rip UnifyPS5Plugin.prx.guest.prx+0x1019a, read of0x0. That is ELF0x19a,mov (%rsi),%eax, the same read ofargp[0]described above.Why it runs at start:
eboot.binneedsIl2cppUserAssemblies.prx, and that module needsUnifyPS5Plugin.prx, so the plugin is initialized at startup (the "Runtime-loaded modules" item indocs/dev/debt/relinker.md). On Windows that call comes from the startup code inapp.exe.WindowsGuestStartup::callLifecycleemitsxor edi,edi; xor esi,esi; xor edx,edxbefore everyDT_INITcall. It does not read__aps5_get_pending_module_args_nid_no_patch, so #6149's default block never reaches it.The plugin's
DT_INITruns its init arrays. Withrdx == 0it tail-calls its start routine (+0x4f0), which calls+0x190(args, argp, "Unify"). That routine accepts{0x10, 0x200, ptr}(and storesptr) or{0x58, 0x103, ...}.Test with #6149's block on Windows: I patched only this one call in the converted
app.exe(local experiment, not a proposed change) to passedi = 0x10,rsipointing to{0x10, 0x200, 0}, andedx = 0.resources.assetsand theStreamingAssets/aa/PS5bundles are opened.mainlibraries and 10 with #8932'slibSceAgcDriver.prx, which doesn't touch startup. In 19 runs it then stays on loading. The last file opened isMedia/Resources/unity_builtin_extra, between 23.9 s and 24.3 s, and nothing is opened after it. This looks like the loading-screen stall @fma-rc describes above on Linux.main) crashed at 23 s on threadUnityGfxDeviceWorker,rip app.exe+0x17f2786, write of0x18.So the null block is enough to get through this plugin's start on Windows too. A Windows fix would need the startup code in
app.exeto pass a block, not only the getter in libkernel.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by socket1001 on 2026-10-21T19:33:04Z.
PPSA16018 runs on an older build and faults on current
main: a working control for this bugAI-assisted: yes. These measurements were produced by an autonomous agent (Hermes) running on the user's behalf; the user reviewed this write-up before it was posted.
Adding a control to this thread, because it narrows the question from "what should the host pass" to "what changed": the same title, same input files and same relinker flags reach a window at 59.94 fps when converted by a relinker built from the Oct-16 tree, and fault at
+0x23ain about one second when converted by currentmain.Arms (all on am5, Ubuntu 24.04, kernel
7.0.0-38-generic, RADV, RX 90701002:7550pinned withANYPS5_GPU; title PPSA16018, Unity, folder install;--module-dir Media/Modules --module-dir Media/Plugins, unused-filter=0, identical flags and identical game files in every arm):main2fab88d+a17a8da(thedd-fixsnapshot I used on 10-16)FPS: 59.94 (5503), alive the full 90 s, 0 errors, 0 asserts, 47 fds flatmain73b6a4ccShutdown handler: initialize., exit 139main73b6a4cc+ this thread's PR #4449 codeB and C being identical rules the PR out; the difference is the conversion. I also ran B's
app.elfagainst arm A's 126-library set (A's build stages 126 PRX, B's stages 352): it still faults, so it is not the library set either.The fault, decoded (arm B, gdb):
NativePluginPS5Example.prx.guest.prxmaps at file offset 0x4000 = vaddr 0, so module-relative+0x23a= file offset 0x423a.0x423a: mov (%rax),%eax,rax=0 rdi=0 rsi=0; entered from the same module (retat +0x11b), i.e. the plugin's own argument validator is called with a null args pointer.0x48, the next block reads+0x4and compares against0x103, and the strings it formats on the failure path are, at their file offsets:so the block it expects is the same family @BunnyFl describes: size
0x48(72) or0x10(16), version0x103. On this title the handler that reaches it is the entitlement-update path (OnEntitlementUpdateHandler,SCE_SYSTEM_SERVICE_EVENT_ENTITLEMENT_UPDATE).What differs in the output, same input module, both builds:
DT_NEEDEDcount, arm Aapp.elfNativePluginPS5Example.prx.guest.prxkitt_support-PS5-shipping.prx.guest.prxPSNCore.prx.guest.prxPS5Util.prx.guest.prxBoth
app.elfs still list$ORIGIN/app0/Media/Plugins/NativePluginPS5Example.prx.guest.prxinDT_NEEDED, so itsDT_INITruns at process start in both arms - the difference is what it is handed, and what it can resolve.Two build notes that may save someone the same trip: the shipped tarball's
relinkerand this tree's are not interchangeable for this title (that is the whole difference between the arms), and the arm-A deck is still on this machine (PPSA16018-dd) alongside the arm-B one, so eitherapp.elfcan be diffed.I have not bisected
2fab88d..73b6a4cc- if you name a range or a suspect commit I will run the arms against it, and I can attach the two converted modules (100 KB each) or run any instrumented build you want on the RX 9070.