Repository navigation
fix(loader): defer Linux runtime module starts until requested - #6586
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Hi @JJenkx, a heads-up on how this interacts with #6684. That PR runs a guest DT_INIT of 0 as the module initializer, for the bundled Merging the two:
I checked this on AI Assisted |
8838a92 to
6c8ff59
Compare
|
Addressed in I extended Windows CI then exposed a test-fixture portability issue (a Windows host path supplied as a Linux guest run path). Fixed in |
|
Temporarily closing this draft to free a slot under the project's 20-open-PR limit for the validated ATRAC9 vibration startup fix. The source branch fix/linux-runtime-module-start is retained at a17a8da for later reopening. The zero-DT_INIT feedback is addressed and its relinker checks pass; the initialization-timing review remains outstanding. |
a17a8da to
f937385
Compare
|
@JJenkx heads-up, since this carries #6684's first commit: with #6112 reverted, I've updated #6684 by merging
I replayed your branch onto AI-assisted: yes (Claude Code) |
f937385 to
85b281b
Compare
|
Updated to main 8a526d4 and carried all three topic commits from #6684 at f77a9ea, preserving authorship and omitting its merge commit. The HasInit dependency check and ASan host-loading option are retained. The deferred zero-initializer fixture now supplies libkernel.prx and checks dependency presence for present/absent DT_INIT. At 85b281b: 149/149 relinker-directory CTests and all four focused loader/initializer tests pass without skips; conventions and whitespace pass. Local ASan execution was not tested. The PR remains draft for lifecycle-timing review. Thanks for identifying the dependency update. |
The browser converter treats sce_module as a runtime directory, so the Windows deferral of runtime modules the executable needs also deferred libc.prx and libSceFios2.prx, which titles never load themselves. Modules in sce_module, sce_modules and prx that the executable needs are started at startup again, as the Linux deferral of boykopovar#6586 keeps them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Windows applicability. The runtime change in Run. Head
Not run on Windows: the Python |
Retain DT_INIT presence when emitting the deferred Linux lifecycle slot. Check zero-valued initializers with and without preinit, native argument forwarding and return status, and the absent-tag case. Addresses the interaction with PR boykopovar#6684 identified in review.
fa3e351 to
2c98914
Compare
|
Refreshed onto main Fresh Linux GCC 16.2.1 Release: rebuilt the relinker and lifecycle fixture; Exact-head receipt and full focused logs. This is synthetic CPU loader/conversion validation; no new native-title, Windows or performance claim, and the existing ABI/lifecycle debt remains. AI-assisted: yes. |
|
Additional native title diagnostic on exact main
Sanitized pinned report, baseline failure excerpt and two reviewed captures. This is one diagnostic pair, not a repeatability or causal claim: the baseline storage-texture stop may be timing-sensitive. It supports further title testing, not gameplay, complete title support, image accuracy or a loading/FPS gain. It complements the synthetic lifecycle tests without replacing them. |
|
Cobra repeat qualification for my previous comment6369913549: the startup difference did not reproduce as a loader-specific improvement. I repeated the same pinned main499/PR2c98914f conversions in reversed order, with empty private writable seeds and the same startup settings/input prefix. This time the loader arm exits134 before20s with the same Across these two diagnostic pairs, each revision has one failure and one success; the first arm fails in each pair. This small sample does not establish the cause or a failure rate. Please treat the original menu/mission captures as an observation only, not evidence that this PR unblocks Cobra. Interactive gameplay and complete title support remain unverified. Reversed-repeat receipts and reviewed stockmain captures. I am continuing the shared startup/rendering issue on newer source separately; the synthetic lifecycle evidence for this PR is unchanged. |
What
Double Dragon Gaiden (PPSA16018, 01.000.013) historically stopped before main when a linked Unity plugin started through Linux
DT_INITwithout engine context. This change keeps explicit runtime-directory modules mapped for bindings and starts each module when the title explicitly loads it, forwarding the caller's exact argument pair, including zero/null.The Linux loader initializes each requested module once, returns the entry result to the load that performs initialization, handles concurrent/reentrant loads, and runs generated finalizers only after initialization completes. Standard SDK folders keep eager initialization, including browser conversions. Present zero-address
DT_INITentries retain their relocation; absent tags leave a null lifecycle slot. No title-specific contexts or default argument blocks are supplied.Rebased onto main
d6eafa54d0464258574fd2f71889754d05a5bc93, headfa3e35112131790755dcddadc54cf2c7b8dea37e. Prerequisite #6684 is merged; this branch contains only the fourteen topic commits, with no merge commits. The rebase preserves the production and test changes; range-diff differences are documentation context. A merge-tree check against newer main7e2ba73e4c8c26b5d632b0d2f46166ffc1b8a29dis clean, and conventions pass against it. Build and test results below apply to the stated d6eafa5 base.Review focus: initialization timing for linked runtime-directory modules and repeated-load result semantics. Uniform Windows deferral was accepted in the #8162 review; that is related design precedent, not a console measurement or approval of this Linux implementation. An additional real-kernel diagnostic on production-source head
cea585242429fe0e20df3a92d670fa51e8a6437dobserved entry result0x5a17for the first load and0for a repeated load, including a concurrent waiter; the entry and init array still ran once. Console repeated-load result semantics are unmeasured, so result retention across subsequent loads is not claimed. Earlier integration runs reached Double Dragon Gaiden character selection; gameplay is not established. Evergate remained black with and without the change. Those title observations are historical and were not rerun on this head.Tested
Current-main refresh, 2026-10-23: head
2c98914fe4d95fc406b585c377412c7b48675bdcis a linear 14-commit rebase onto pinned main4997726a5f6b8cd263461508945a4676647ef482. The only conflict was thedlopenload-failure block: this refresh preserves main'sLoadFailurediagnostics and keeps deferred initialization after a successful load. The existing reentrancy, nested-handle, unload/reload and real condition-wait coverage is retained.Fresh Linux GCC 16.2.1 Release, independent worktree/build with exact submodules:
guest_runtime_lifecyclepasses three consecutive repetitions, andrelinker_conversionpasses three consecutive repetitions, with no skips. The relinker and lifecycle probe are freshly built. Conventions and whitespace checks pass. These are CPU synthetic module/loader and conversion regressions; no new native title, Windows, GPU or performance result is claimed. The existing documented lifecycle/ABI limitations remain.Arch Linux x86-64, GCC 16.2.1, Ryzen 9 7950X. Results below distinguish the public test head from the private runtime integration.
fa3e35112131790755dcddadc54cf2c7b8dea37e, clean-configured and built the relinker, all runtime libraries (libs) andguest_runtime_lifecycle_tests. Passed 239/239 relinker tests and the real-kernel lifecycle wrapper covering all six modes: never-start, start, zero-start, concurrent, reentrant and reload. No failures or skips. The concurrent initializer remains blocked until the second loader thread enterspthread_cond_wait, and the test requires that wait to return. This wrapper is confined to the Linux test executable. Source and artifact hashes were independently checked; conventions and whitespace checks pass. This is not the complete runtime test suite.fcf647f928390b33f0fa21374c136d3ed72f8236687078e80a2d376fdd1cb1cd.PPSA19591) on that pinned private integration passed the narrated opening and prologue selection, rendered the stagecoach scene, and reached the party tutorial. The 573-second run exited 0 after the scheduled ordinary window close at 571 seconds; the temporary kernel limit was restored to 64 MiB. Screenshots at 300/450/550 seconds show those scenes. Combat, overall rendering correctness and performance remain unverified.3bfa3c0f62f8257ef7dd6980c52077b16442c182c4f426954f1abbfd1c3d0b80.624609bfe2: relinker jobs pass on Linux, Windows and both macOS configurations; relinker ASan passes. These do not establish full Windows/macOS runtime or runtime sanitizer coverage. Full Linux/Windows jobs were skipped in the automatic PR workflow. The current upstream workflow runs them on main or via manual workflow dispatch; marking this ready for review does not trigger them. A maintainer-run full build is still requested.Earlier validation at its recorded revisions: 238/238 relinker tests passed; the reentrant negative control deadlocked when only the same-thread reentrancy return was removed; unload/reload coverage confirmed mapping removal and one finalizer sequence per initialized lifetime. Nested-handle regression and negative-control evidence, unload/reload evidence, and earlier full relinker validation.
No full runtime suite, Windows/macOS runtime, runtime sanitizer, GPU-validation or performance result is claimed.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)