fix(libkernel): log resolved paths for failed opens #6132
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6132"
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 MarcZX10 on 2026-10-14T23:01:06Z.
What
When
sceKernelOpenfails after path resolution, its existing log shows only the guest path and flags. This made a missing file under/app0look like a successful lookup in #6006. Log the resolved host path and returned guest error for native-open failures; log the resolution error and returned guest error when path resolution itself fails. The syscall's return behavior is unchanged.GuestFilesystemnow captures the failure log for a missing.pakfile and checks the guest path, resolved path andENOENTresult.Tested
guest_filesystem_testsbuilds.ctest -R '^guest_filesystem$'cannot reach the test body on this host: startup rejects the Xeon E5-1620 v2 because it lacks LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA.python3 tools/check_conventions.py --base upstream/mainpasses.git diff --checkpasses.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:15:16Z.
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.
core/libs/prx/libkernel/File/src/Open.cppcore/libs/tests/GuestFilesystem.cppcore/libs/tests/GuestFilesystem.cppcore/libs/prx/libkernel/File/src/Open.cppcore/libs/prx/libkernel/File/src/Open.cppcore/libs/prx/libkernel/File/src/Open.cppcore/libs/prx/libkernel/File/src/Open.cppcore/libs/tests/GuestFilesystem.cppImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T05:35:14Z.
Rebased onto current
main(5d9dcc42d) as59704b5ed. I resolved theOpen.cppconflict by retaining the current module-awareResolvePathError_nid_no_patchcall and layering the PR’s failure diagnostics around it. The diff remains limited to the existing open-failure logging and its regression test.git diff --checkandtools/check_conventions.py --base upstream/mainpass; the updated hosted checks have not reported yet.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T20:19:33Z.
Rebased onto current main
a7f108030as2b8e37ae0. I resolved theOpen.cppoverlap by retaining main’s archived-path resolution (ResolvePathError_nid_no_patch(..., module, true)) and the PR’s path/error logging. The commit remains authored by MarcZX100.git diff --checkandtools/check_conventions.py --base upstream/mainpass. I could not run the focused build here: the isolated worktree lacks its SDL2 submodule, and CMake stops because SDL has no XRandR support in this environment.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T23:42:12Z.
Checked the build,
guest_filesystem(passes with the change, fails withOpen.cppreverted) and the scoped ctest on Linux; the Windows path ofCaptureStderrgoes through the full Build before merging. Return values ofsceKernelOpenare unchanged; merging.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T23:49:58Z.
Thanks for checking the Linux build and the
guest_filesystempositive/revert control. I checked the hosted checks on the current head: the Windows Build job is skipped, so that does not validate the WindowsCaptureStderrpath. I will keep the PR open pending a full Build that actually exercises that path.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T23:51:06Z.
I checked whether I could start the workflow’s manual full Build for this PR, but GitHub rejected the dispatch with
403: Must have admin rights to Repository. The automatic Windows job is still skipped. Could a maintainer trigger the configured full Build on this head when convenient? Until it runs, the WindowsCaptureStderrpath remains unverified.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T23:56:14Z.
Clarification after checking the completed workflow eligibility logs: the two concurrent full Build runs are for #6814 and #6892, not #6132. They do not exercise this PR’s Windows
CaptureStderrpath; its Windows validation remains pending.Imported from boykopovar/AnyPS5. Originally posted by cadenasynyster on 2026-10-18T00:45:34Z.
Windows run of the
CaptureStderrpath, since the Windows Build job was skipped on this head.Windows 11 10.0.26200.9711, WinLibs GCC 15.2.0 r7 (UCRT), Release, BUILD_TESTING=ON, Developer Mode on. Head
2b8e37ae0merged onto mainb51c65dd1with no conflicts, no new build errors.ctest -R "^guest_filesystem$" -j1: passes 3 of 3 (0.12-0.16 s).core/libs/prx/libkernel/File/src/Open.cpprestored from main.guest_filesystemfails withFilesystem check failed at line 258 (guest errno 2, Win32 error 2). In the merged file, line 258 isRequire(openLog.find("path=" + missing) != std::string::npos);.So on Windows the
_dup/_dup2redirect intotmpfile()captures the stderr log, the new assertions pass with this change and fail without it, and the open still returns 0x80020002.Not checked: a title run, and the rest of the suite with this change.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T02:01:05Z.
Thanks for the Windows control run. This confirms
CaptureStderrcaptures the resolved-path diagnostic on WinLibs/UCRT and that the focusedguest_filesystemassertions distinguish the PR from main. The Linux result plus this Windows comparison provide useful coverage across both implementations; I have no further review request on this path.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-18T18:24:02Z.
Merged while @adriadam10 is away: the review passed and full CI is green on this head.