Demon Slayer -Kimetsu no Yaiba- The Hinokami Chronicles (PPSA03490 v01.000.000) on Windows: start-up needs seven sceRudp* imports that no library exports; with them it runs until the packed pixel ancillary error (#2548) #3073

Closed
opened 2026-10-10 21:39:13 +00:00 by xXPBSXx · 8 comments
xXPBSXx commented 2026-10-10 21:39:13 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T21:39:13Z.


Demon Slayer -Kimetsu no Yaiba- The Hinokami Chronicles (PPSA03490 v01.000.000) on Windows: start-up needs seven sceRudp* imports that no library exports; with them it runs until the packed pixel ancillary error (#2548)

1. Seven missing imports

The import audit (executable and its six modules, all registries, libraries built from main at 262c0316) shows 2358 unique imports, 880 implemented, 34 stubs and 7 absent, all in libSceRudp:

sceRudpNetFlush, sceRudpProcessEvents, sceRudpGetNumberOfPacketsToRead, sceRudpGetSizeWritable, sceRudpGetSizeReadable, sceRudpNetReceived, sceRudpGetMaxSegmentSize.

None of these names is in the code or in a pull request. libSceRudp exists and implements an offline reliable-UDP library; these seven are missing from it.

2. What the title does with them. It calls them from a thread named ccs P2PService Client Thread. I traced the call sites with gdb on the running process:

  • sceRudpGetMaxSegmentSize: passes a pointer to a 16-bit value it has set to 0, and treats a nonzero result as failure (it cleans up). On success it reads the 16-bit value.
  • sceRudpProcessEvents(0) followed by sceRudpNetFlush() in one pump function. The result of the first call is ignored.
  • The other four were not reached in a 90 second run.

Fix: one commit on my fork, based on main at 262c0316:
https://github.com/xXPBSXx/AnyPS5/tree/fix/rudp-exports-ppsa03490

sceRudpGetMaxSegmentSize, sceRudpProcessEvents and sceRudpNetFlush are implemented for the offline library from the way the title calls them: success after sceRudpInit, RUDP_ERROR_NOT_INITIALIZED before it, RUDP_ERROR_INVALID_ARGUMENT for a null size pointer. The real maximum segment size is unknown, so nothing is written and the title keeps its 0 (listed in TechnicalDebt, with the shadPS4 stubs that return OK as the precedent). The other four are declared without parameters and throw NotImplemented. guest_offline_imports is extended (before and after sceRudpInit, null pointer, the size is not written) and guest_rudp_unimplemented checks the four throwing ones. tools/check_conventions.py and the test registration check pass.

3. What happens next. With these in place the title opens its /app0/apk/... files, creates its threads, registers shaders and aborts after about 34 seconds:

what():  ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?)

after 5 refused pixel shaders of the same kind. That is #2548 (see my comment there). There are also 6 lines has unsupported registered shader type 8; it is not prepared at registration that I have not looked into.

Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. The executable and modules were relinked from ELF files rebuilt from the dump's containers. Dump from my own digital copy; no game files shared. AI-assisted.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5795509181 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3073). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-10T21:39:13Z. --- **Demon Slayer -Kimetsu no Yaiba- The Hinokami Chronicles (PPSA03490 v01.000.000) on Windows: start-up needs seven `sceRudp*` imports that no library exports; with them it runs until the packed pixel ancillary error (#2548)** **1. Seven missing imports** The import audit (executable and its six modules, all registries, libraries built from `main` at `262c0316`) shows 2358 unique imports, 880 implemented, 34 stubs and 7 absent, all in `libSceRudp`: `sceRudpNetFlush`, `sceRudpProcessEvents`, `sceRudpGetNumberOfPacketsToRead`, `sceRudpGetSizeWritable`, `sceRudpGetSizeReadable`, `sceRudpNetReceived`, `sceRudpGetMaxSegmentSize`. None of these names is in the code or in a pull request. `libSceRudp` exists and implements an offline reliable-UDP library; these seven are missing from it. **2. What the title does with them.** It calls them from a thread named `ccs P2PService Client Thread`. I traced the call sites with gdb on the running process: - `sceRudpGetMaxSegmentSize`: passes a pointer to a 16-bit value it has set to 0, and treats a nonzero result as failure (it cleans up). On success it reads the 16-bit value. - `sceRudpProcessEvents(0)` followed by `sceRudpNetFlush()` in one pump function. The result of the first call is ignored. - The other four were not reached in a 90 second run. **Fix:** one commit on my fork, based on `main` at `262c0316`: https://github.com/xXPBSXx/AnyPS5/tree/fix/rudp-exports-ppsa03490 `sceRudpGetMaxSegmentSize`, `sceRudpProcessEvents` and `sceRudpNetFlush` are implemented for the offline library from the way the title calls them: success after `sceRudpInit`, `RUDP_ERROR_NOT_INITIALIZED` before it, `RUDP_ERROR_INVALID_ARGUMENT` for a null size pointer. The real maximum segment size is unknown, so nothing is written and the title keeps its 0 (listed in TechnicalDebt, with the shadPS4 stubs that return OK as the precedent). The other four are declared without parameters and throw `NotImplemented`. `guest_offline_imports` is extended (before and after `sceRudpInit`, null pointer, the size is not written) and `guest_rudp_unimplemented` checks the four throwing ones. `tools/check_conventions.py` and the test registration check pass. **3. What happens next.** With these in place the title opens its `/app0/apk/...` files, creates its threads, registers shaders and aborts after about 34 seconds: ``` what(): ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?) ``` after 5 refused pixel shaders of the same kind. That is #2548 (see my comment there). There are also 6 lines `has unsupported registered shader type 8; it is not prepared at registration` that I have not looked into. Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. The executable and modules were relinked from ELF files rebuilt from the dump's containers. Dump from my own digital copy; no game files shared. AI-assisted.
hugodearaujo commented 2026-10-11 00:54:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-11T00:54:03Z.


Measured on a PS5 (firmware 13.60), with a payload that calls the system's libSceRudp, for the values left open here:

Call Before sceRudpInit After
sceRudpGetMaxSegmentSize(&v) 0x80770001, v untouched 0, v = 1410 (0x582), also when v starts at 0
sceRudpGetMaxSegmentSize(NULL) 0x80770001 0x80770004
sceRudpProcessEvents(0), (1000) 0x80770001 0
sceRudpNetFlush() 0x80770001 0

After sceRudpEnd() all three return 0x80770001 again.

I called the per-context queries with one int context id. An unknown id returns 0x80770003 (INVALID_CONTEXT_ID), so the first argument is the id:

Call Context created, not connected Unknown id 12345 -1
sceRudpGetNumberOfPacketsToRead 0 0x80770003 0x80770004
sceRudpGetSizeWritable 0x80770011 0x80770003 0x80770004
sceRudpGetSizeReadable 0x80770011 0x80770003 0x80770004

0x80770011 is NOT_ACCEPTABLE in the PS3 numbering, which matches the other codes (RPCS3).

Two differences from the fork commit: the console checks initialization before the null pointer, so GetMaxSegmentSize(NULL) before sceRudpInit returns NOT_INITIALIZED, and it writes 1410.

Heads-up: I'm preparing a change to sceRudpInit and sceRudpGetStatus in the same file, also measured on the console. It changes two lines of GuestOfflineImports.cpp, so our branches may conflict there.

AI-assisted.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103948589 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3073#issuecomment-6103948589). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-10-11T00:54:03Z. --- Measured on a PS5 (firmware 13.60), with a payload that calls the system's `libSceRudp`, for the values left open here: | Call | Before `sceRudpInit` | After | |---|---|---| | `sceRudpGetMaxSegmentSize(&v)` | `0x80770001`, `v` untouched | 0, `v` = 1410 (`0x582`), also when `v` starts at 0 | | `sceRudpGetMaxSegmentSize(NULL)` | `0x80770001` | `0x80770004` | | `sceRudpProcessEvents(0)`, `(1000)` | `0x80770001` | 0 | | `sceRudpNetFlush()` | `0x80770001` | 0 | After `sceRudpEnd()` all three return `0x80770001` again. I called the per-context queries with one `int` context id. An unknown id returns `0x80770003` (`INVALID_CONTEXT_ID`), so the first argument is the id: | Call | Context created, not connected | Unknown id 12345 | -1 | |---|---|---|---| | `sceRudpGetNumberOfPacketsToRead` | 0 | `0x80770003` | `0x80770004` | | `sceRudpGetSizeWritable` | `0x80770011` | `0x80770003` | `0x80770004` | | `sceRudpGetSizeReadable` | `0x80770011` | `0x80770003` | `0x80770004` | `0x80770011` is `NOT_ACCEPTABLE` in the PS3 numbering, which matches the other codes ([RPCS3](https://github.com/RPCS3/rpcs3/blob/master/rpcs3/Emu/Cell/Modules/cellRudp.h)). Two differences from the fork commit: the console checks initialization before the null pointer, so `GetMaxSegmentSize(NULL)` before `sceRudpInit` returns `NOT_INITIALIZED`, and it writes 1410. Heads-up: I'm preparing a change to `sceRudpInit` and `sceRudpGetStatus` in the same file, also measured on the console. It changes two lines of `GuestOfflineImports.cpp`, so our branches may conflict there. AI-assisted.
danzaio commented 2026-10-11 01:36:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by danzaio on 2026-10-11T01:36:33Z.


Windows validation for this branch.

Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), Ninja, Release, BUILD_TESTING=ON, branch 5766b3963: guest_offline_imports and guest_rudp_unimplemented pass 2/2.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104254058 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3073#issuecomment-6104254058). Originally posted by [danzaio](https://github.com/danzaio) on 2026-10-11T01:36:33Z. --- Windows validation for this branch. Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), Ninja, Release, BUILD_TESTING=ON, branch 5766b3963: guest_offline_imports and guest_rudp_unimplemented pass 2/2. AI-assisted: yes.
xXPBSXx commented 2026-10-11 08:27:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T08:27:26Z.


Refreshed the Demon Slayer Rudp branch on current main (1be0a7ce): https://github.com/xXPBSXx/AnyPS5/tree/fix/rudp-exports-ppsa03490-v2 (one commit; sceRudpGetMaxSegmentSize, sceRudpProcessEvents and sceRudpNetFlush answer by the library's initialised state like the other calls, four more imports are declared-only; I adapted the offline-imports test to the new sceRudpInit with a pool; guest_rudp_unimplemented, guest_offline_imports and the conventions check pass). All seven functions are still absent from main.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6107125222 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3073#issuecomment-6107125222). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T08:27:26Z. --- Refreshed the Demon Slayer Rudp branch on current `main` (1be0a7ce): https://github.com/xXPBSXx/AnyPS5/tree/fix/rudp-exports-ppsa03490-v2 (one commit; `sceRudpGetMaxSegmentSize`, `sceRudpProcessEvents` and `sceRudpNetFlush` answer by the library's initialised state like the other calls, four more imports are declared-only; I adapted the offline-imports test to the new `sceRudpInit` with a pool; `guest_rudp_unimplemented`, `guest_offline_imports` and the conventions check pass). All seven functions are still absent from `main`. AI-assisted (Claude Code).
adriadam10 commented 2026-10-11 11:51:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T11:51:14Z.


#3467 implements sceRudpGetNumberOfPacketsToRead, sceRudpGetSizeWritable and sceRudpGetSizeReadable with the measured disconnected-context results, covered by guest_rudp_context_queries; the other four imports are still open.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108722126 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3073#issuecomment-6108722126). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T11:51:14Z. --- #3467 implements `sceRudpGetNumberOfPacketsToRead`, `sceRudpGetSizeWritable` and `sceRudpGetSizeReadable` with the measured disconnected-context results, covered by `guest_rudp_context_queries`; the other four imports are still open.
xXPBSXx commented 2026-10-11 14:37:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T14:37:55Z.


Update: main now implements sceRudpGetNumberOfPacketsToRead, sceRudpGetSizeWritable and sceRudpGetSizeReadable itself (Rudp context queries), so my earlier -v2 branch conflicts with it. Rebuilt on current main with only what is still missing: https://github.com/xXPBSXx/AnyPS5/tree/fix/rudp-exports-ppsa03490-v3 (one commit: sceRudpProcessEvents, sceRudpNetFlush and sceRudpGetMaxSegmentSize answer by the library's initialised state, sceRudpNetReceived is declared and throws; new test guest_rudp_pump, the rudp ctest targets and the conventions check pass). Please use this one, not -v2.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110139292 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3073#issuecomment-6110139292). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T14:37:55Z. --- Update: `main` now implements `sceRudpGetNumberOfPacketsToRead`, `sceRudpGetSizeWritable` and `sceRudpGetSizeReadable` itself (Rudp context queries), so my earlier `-v2` branch conflicts with it. Rebuilt on current `main` with only what is still missing: https://github.com/xXPBSXx/AnyPS5/tree/fix/rudp-exports-ppsa03490-v3 (one commit: `sceRudpProcessEvents`, `sceRudpNetFlush` and `sceRudpGetMaxSegmentSize` answer by the library's initialised state, `sceRudpNetReceived` is declared and throws; new test `guest_rudp_pump`, the `rudp` ctest targets and the conventions check pass). Please use this one, not `-v2`. AI-assisted (Claude Code).
oneandonlydean commented 2026-10-11 23:26:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:26:13Z.


Closing: all seven sceRudp* imports are on main (#3467, #3823). The End/Terminate swap is in #3973.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115090485 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3073#issuecomment-6115090485). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T23:26:13Z. --- Closing: all seven sceRudp* imports are on main (#3467, #3823). The End/Terminate swap is in #3973.
xXPBSXx commented 2026-10-11 23:33:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T23:33:30Z.


Partly fixed. The seven missing sceRudp* imports are on main now (#3467 for the three context queries and #3823 for the rest, both merged): on main f9905068b the import audit of Demon Slayer's relinked executable and its six modules has 0 absent imports (2358 unique imports). I could not confirm the second part (running up to the packed pixel ancillary error), because on main the title now stops earlier in Unreal's start-up: PS5 Out of Memory ... UsedPhysical 9278849024, AvailablePhysical 4902027264, then LowLevelFatalError ... Ran out of memory allocating 5565054976 bytes with alignment 65536 and a fault in the title's libc.prx (+0x141b0), 4 of 4 runs of 90 s. Sifu (PPSA03001) shows the same allocation size on the same build, and with the libraries of main a11c8f7f7 and of ca4ab0d5d as well (Demon Slayer's runs with those two library sets were silent in my 90 s runs, so I cannot say for them). This is not caused by #3292: with a local revert of it Demon Slayer still stops the same way (2 of 2 runs). Leaving the issue open for it.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115149188 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3073#issuecomment-6115149188). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T23:33:30Z. --- Partly fixed. The seven missing `sceRudp*` imports are on `main` now (#3467 for the three context queries and #3823 for the rest, both merged): on `main` f9905068b the import audit of Demon Slayer's relinked executable and its six modules has 0 absent imports (2358 unique imports). I could not confirm the second part (running up to the packed pixel ancillary error), because on `main` the title now stops earlier in Unreal's start-up: `PS5 Out of Memory ... UsedPhysical 9278849024, AvailablePhysical 4902027264`, then `LowLevelFatalError ... Ran out of memory allocating 5565054976 bytes with alignment 65536` and a fault in the title's `libc.prx` (`+0x141b0`), 4 of 4 runs of 90 s. Sifu (PPSA03001) shows the same allocation size on the same build, and with the libraries of `main` a11c8f7f7 and of ca4ab0d5d as well (Demon Slayer's runs with those two library sets were silent in my 90 s runs, so I cannot say for them). This is not caused by #3292: with a local revert of it Demon Slayer still stops the same way (2 of 2 runs). Leaving the issue open for it. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-12 02:05:34 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T02:05:34Z.


Demon Slayer (PPSA03490) on current main d371ed307, relinked with the current relinker (6 modules, 0 absent imports), with the old PlayGo chunk check restored locally (the same one-line change as for Sifu in #3209, not committed):

  • The earlier silent runs of my comparison failed in the loader, not in the title: FAIL: unresolved ELF import vfrL8gPlm2Y from libSceRudp.prx (sceRudpGetMaxSegmentSize) with libraries older than the Rudp merges. With libraries of main they start.
  • With the old chunk check there is no Ran out of memory any more (same mechanism as Sifu: the title enumerates PlayGo chunk ids and #3238 makes every id valid). The title then mounts its pak directories (28 opens) and aborts: what(): sceRudpGetMaxSegmentSize not implemented, FATAL: abort(), in the title's own libc.prx. That function throws on purpose since the review of #3823 (the real maximum segment size is unknown and the title passes a pointer to a 16-bit value it set to 0 and treats a nonzero result as failure); no emulator source I found documents its value (shadPS4, Vita3K and RPCSX only stub it).

So Demon Slayer still stops on main: first on the PlayGo allocation (with #3238's change), then on sceRudpGetMaxSegmentSize. This issue's first part (the imports) is fixed; I did not reach the packed pixel ancillary error mentioned in the title.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6116459967 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3073#issuecomment-6116459967). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-12T02:05:34Z. --- Demon Slayer (PPSA03490) on current `main` d371ed307, relinked with the current relinker (6 modules, 0 absent imports), with the old PlayGo chunk check restored locally (the same one-line change as for Sifu in #3209, not committed): - The earlier silent runs of my comparison failed in the loader, not in the title: `FAIL: unresolved ELF import vfrL8gPlm2Y from libSceRudp.prx` (`sceRudpGetMaxSegmentSize`) with libraries older than the Rudp merges. With libraries of `main` they start. - With the old chunk check there is no `Ran out of memory` any more (same mechanism as Sifu: the title enumerates PlayGo chunk ids and #3238 makes every id valid). The title then mounts its pak directories (28 opens) and aborts: `what(): sceRudpGetMaxSegmentSize not implemented`, `FATAL: abort()`, in the title's own `libc.prx`. That function throws on purpose since the review of #3823 (the real maximum segment size is unknown and the title passes a pointer to a 16-bit value it set to 0 and treats a nonzero result as failure); no emulator source I found documents its value (shadPS4, Vita3K and RPCSX only stub it). So Demon Slayer still stops on `main`: first on the PlayGo allocation (with #3238's change), then on `sceRudpGetMaxSegmentSize`. This issue's first part (the imports) is fixed; I did not reach the packed pixel ancillary error mentioned in the title. AI-assisted (Claude Code).
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#3073
No description provided.