feat(libSceJobManager): add the library with throwing exports #2924

Closed
fma-rc wants to merge 2 commits from upstream-pr/2924 into main
fma-rc commented 2026-10-10 18:31:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-10T18:31:09Z.


Superseded: #3186 contains everything in this PR and in #3170 (the real implementation, CPU and compute). Only that one needs reading.

What

Adds libSceJobManager with the 11 exports the library is known to have, each calling NotImplemented_nid_no_patch. Fixes #2476: a title that imports the library and does not ship it can now load, and stops with the export's name if it ever calls one.

Astro's Playroom (PPSA01325) imports seven of them and has no libSceJobManager.prx in its sce_module, so nothing resolved them and the loader failed. I have no title that ships its own copy, so that case is not run; tools/import_audit.py classes an import whose library is a bundled module as module whatever the built libraries export, as it does for this title's own libc.prx.

The exports are all members of sce::Job::JobManager: both constructor and destructor variants, calculateRequiredMemorySize, the 7- and 5-argument initialize, setPersistentThreadCount, getSequenceFactoryInterface, getUnifiedSequenceFactoryInterface and shutdown. Every name was resolved from its NID with tools/nid_names.py (all rename-ready).

They throw instead of doing anything because I found no source for the behaviour. The jobs themselves must run through whatever getSequenceFactoryInterface returns, and none of the 11 exports submits or waits for one. In Astro's Playroom the seven imports have eight call sites, all in two adjacent functions at 0x1b040a0 and 0x1b043f0 (disassembly of the executable, not a trace); the run below did not reach them.

The assumed parts are recorded in TechnicalDebt: parameter types follow the mangled names, return types are assumed except the 64-bit result of calculateRequiredMemorySize and the int of the 7-argument initialize, which the title uses that way.

Tested

Arch Linux 7.2.9, GCC 16.2.1, Release, main 57f96fd2, RTX 5080 (NVIDIA 615.78.08). Astro's Playroom PPSA01325 v01.905.000, relinker and libraries from the same build.

main this PR
tools/import_audit.py 691 implemented, 8 stub, 7 absent 691 implemented, 15 stub, 0 absent
Launch error while loading shared libraries: libSceJobManager.prx loads and runs; no libSceJobManager export is called; stops later at sceLibcInternalHeapErrorReportForGame_nid_postfix not implemented

cmake --build build --target libs builds the library; python3 tools/check_conventions.py --base origin/main passes. No test added: the exports only throw.

Not tested: Windows, macOS, any other title.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4813504636 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2924). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-10T18:31:09Z. --- Superseded: #3186 contains everything in this PR and in #3170 (the real implementation, CPU and compute). Only that one needs reading. ### What Adds `libSceJobManager` with the 11 exports the library is known to have, each calling `NotImplemented_nid_no_patch`. Fixes #2476: a title that imports the library and does not ship it can now load, and stops with the export's name if it ever calls one. Astro's Playroom (PPSA01325) imports seven of them and has no `libSceJobManager.prx` in its `sce_module`, so nothing resolved them and the loader failed. I have no title that ships its own copy, so that case is not run; `tools/import_audit.py` classes an import whose library is a bundled module as `module` whatever the built libraries export, as it does for this title's own `libc.prx`. The exports are all members of `sce::Job::JobManager`: both constructor and destructor variants, `calculateRequiredMemorySize`, the 7- and 5-argument `initialize`, `setPersistentThreadCount`, `getSequenceFactoryInterface`, `getUnifiedSequenceFactoryInterface` and `shutdown`. Every name was resolved from its NID with `tools/nid_names.py` (all `rename-ready`). They throw instead of doing anything because I found no source for the behaviour. The jobs themselves must run through whatever `getSequenceFactoryInterface` returns, and none of the 11 exports submits or waits for one. In Astro's Playroom the seven imports have eight call sites, all in two adjacent functions at `0x1b040a0` and `0x1b043f0` (disassembly of the executable, not a trace); the run below did not reach them. The assumed parts are recorded in TechnicalDebt: parameter types follow the mangled names, return types are assumed except the 64-bit result of `calculateRequiredMemorySize` and the `int` of the 7-argument `initialize`, which the title uses that way. ### Tested Arch Linux 7.2.9, GCC 16.2.1, Release, `main` 57f96fd2, RTX 5080 (NVIDIA 615.78.08). Astro's Playroom PPSA01325 v01.905.000, relinker and libraries from the same build. | | `main` | this PR | |---|---|---| | `tools/import_audit.py` | 691 implemented, 8 stub, 7 absent | 691 implemented, 15 stub, 0 absent | | Launch | `error while loading shared libraries: libSceJobManager.prx` | loads and runs; no `libSceJobManager` export is called; stops later at `sceLibcInternalHeapErrorReportForGame_nid_postfix not implemented` | `cmake --build build --target libs` builds the library; `python3 tools/check_conventions.py --base origin/main` passes. No test added: the exports only throw. Not tested: Windows, macOS, any other title. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-10 18:40:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T18:40:43Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6100902133 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2924#issuecomment-6100902133). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T18:40:43Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

Pull request closed

Sign in to join this conversation.
No reviewers
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!2924
No description provided.