fix(libkernel): report failed APR read commands through the wait of their submission #22070
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22070"
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 nicolasabosch on 2026-11-17T03:55:05Z.
What
A read command that cannot complete no longer throws: an unknown file id or a missing file fails with
ENOENT, an unwritable destination withEFAULT, and an unreadable file, an unseekable offset or a read that stops short before the end of the file withEIO. The rest of the buffer still runs and the first failure becomes the status of the submission, whichsceKernelAprWaitCommandBufferreturns, kept for the last 4096 failures. TheresultofsceKernelAprSubmitCommandBufferAndGetResultis still written before the buffer runs, so it stays 0. Other malformed commands and AMM failures still throw. The codes and the continuation after a failed read are not measured on a console; the debt fragment records this. This is a consistency fix; no failure was observed.Overlap: #21585 changes the resolver lines of
Apr.cppright above_readFile(L175-177 onmain); the conflict is textual, and whichever PR merges second will be rebased.Tested
Windows 11, MinGW (GCC, Release), no title.
ctest -R '^(guest_apr_read.*|guest_ampr_markers)$'passed (12/12): the elevenguest_apr_read_*cases, which cover missing files, invalid ids, unseekable offsets, read-only destinations and a failing read in the middle of a buffer, andguest_ampr_markers.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T03:59:40Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
cdd2816c7a:tools/check_conventions.pypassed.guest_ampr_tests,guest_apr_read_testsbuilt cleanly.guest_ampr_markers,guest_apr_read_host,guest_apr_read_direct,guest_apr_read_eof,guest_apr_read_errors,guest_apr_read_streams,guest_apr_read_priorities,guest_apr_read_order,guest_apr_read_queries):core/libs/prx/libkernel/Apr/src/Apr.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me