feat(libkernel): cancel blocked POSIX writes with partial progress #12700
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12700"
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 Felipebmaitan on 2026-10-29T02:59:22Z.
What
Head
6b8ca980e58f287cb042abf8c09f78f53298aa36merges published #12688978a8bef6c118f57242b96cee5c6f8cdf493e5d8, including #126827887e7a03da0e8aeed2557f4ba43a6aa777494b9and main4f5777f2f320111b156ed5db843a6d5f67968923.Compose #24382's buffer checks with write cancellation. The Windows send path runs main's source check, which already prepares the guest range for host reads. Other hosts keep explicit preparation. The send retry keeps progress and per-call chunking. The retained receive retry keeps the writable-prefix probe, datagram discard rules, and cancellation and shutdown rechecks.
Tested
Release builds and focused tests on this PC at
6b8ca980e58f287cb042abf8c09f78f53298aa36:recvassertion on predecessore3138d7ceaac42bf00138e2d7d65e49217f916abwithECONNABORTED. The same diagnostic fixture and the repository'sguest_udppass on this head, including the expectedEFAULTand stream/datagram boundary cases. The UDP fixture and 8 Windows prefix cancellation/shutdown cases passed five consecutive runs each.ENOTCONNprobe, four large-write interruption probes, and three host fstat probes passed.The hosted Windows job passed on this head. GitHub reports 22 successful checks and one skipped Linux job. Main subsequently introduced a shared signal include conflict through #19463. The reads and transport prerequisites are integrating timer-signal support before the next composed build. Upstream review and bench validation remain pending. Local runs cover focused host fixtures. Title, console, macOS and GPU execution are outside this validation.
Previous pending-connect integration and CI evidence at
e3138d7ceaWhat
Head
e3138d7ceaac42bf00138e2d7d65e49217f916abmerges published transport #12688 ata57cf356306256d779487ad2e27695ae76f99ea6, including main8ab98849d5ddf19f9e8758a5205b6159318ea10cand #24939. Linuxsend,writeand addresslesssendtoreturnENOTCONNwhile a TCP connection is pending. Windows retains blocking connect retry after refusal. The write layer retains partial progress, synchronous-write error propagation and the patched forwarding ABI.Tested
Release builds and focused tests on this PC at
e3138d7ceaac42bf00138e2d7d65e49217f916ab:guest_tcp. A disposable diagnostic variant of main's TCP fixture returnedEAGAINon preceding headc76cc791de9fd7f0e68f0d53676879d25ebef470andENOTCONNon this head for all three guest APIs.The hosted eligibility check rejected this head because main advanced with #24382's socket buffer checks. The Windows and Linux build jobs were skipped. The reads and transport prerequisites are resolving the shared conflict before the next composed build. Upstream review and bench validation remain pending. Local runs cover focused host fixtures. Title, console, macOS and GPU execution are outside this validation.
Previous LibreSSL fixture repair, CI and overlap evidence at
c76cc791deWhat
Head
c76cc791de9fd7f0e68f0d53676879d25ebef470merges the LibreSSL fixture repair from published #12688 at59991e7d5e186a075c78bd7b55718ce6bb63b59f. The fixture injects the requested interruption, then uses the retained socket owner's transfer callback to preserve guest blocking behavior on a nonblocking host socket. The strict next-call handshake and interruption assertions remain. This merge changes only the shared LibreSSL test helper and retains the published write cancellation and Windows loader fixes.Tested
Release builds and focused tests on this PC at
c76cc791de9fd7f0e68f0d53676879d25ebef470:GitHub reports 22 successful checks and one skipped Linux job at this head. The hosted Windows job passed after the LibreSSL fixture repair. The local Linux results above are from a separate run. Both prerequisite PRs remain open, and upstream review and bench validation remain pending. Local runs cover focused host fixtures. Title, console, macOS and GPU execution are outside this validation.
Rechecked all 71 distinct PR refs in the overlap report against its base
b8271ad76c97526637d1bcdd4dff3009c6c14350and this head. Fifty-one refs already conflicted with the base, and 17 more conflicted when composed with this stack. The three textually clean combinations are #24322 and its follow-ups #24910 and #24917. Their build files replace the original socket and file sources with separate compilation units. If that refactor lands, carry the cancellation and descriptor changes into the compiled units for libkernel and libSceNet, including the patch-preserved C entries. Preserve #24382's buffer checks and #24065's close and abort wakeups when composing those independent fixes. The duplicaterecvfromandsendtonotices refer to existing exports: main and this head each have one definition and one canonical declaration. The dependency order remains #12682, then #12688, then #12700. These are source and merge checks.Previous Windows loader fix and CI evidence at
8637b820ccWhat
Fix the Windows loader error for the forwarded POSIX write path. Head
8637b820cc5e03d2e658f4eed8af5f2de779862bmerges published #12688 at7935169d1605d995040076bee0b6128df94a690con top of the existing writes branch. It keeps the integrated upstream main at5e97fdf3415656bef6c786487517982d0a0920e6.Native registration for forwarded send and sendto lives in libkernel, which holds it through the libSceNet callback. libSceNet uses the three C entries preserved by the NID patcher for active state, interruption and restart control. This preserves partial send progress, socket timeout handling and the captured Winsock error. The composition includes the corresponding receive fix and main's archive-backed pread error translation.
Tested
Release builds and focused runtime tests on this PC at
8637b820cc5e03d2e658f4eed8af5f2de779862b:bf7939216ab7b00a77633b222f5b036713bfde08, patched libSceNet failed to load with Windows error 127. PE inspection found five C++ ThreadCancel imports absent from patched libkernel. At the current head, patched libSceNet imports the three C entries and patched libkernel exports all three. The staged loader check loaded 9 patched modules, and all 7 scoped patched tests passed, including the loader, Net socket options and LibreSSL/LibreSSL3 NID checks.The hosted Windows job reported one failing fixture,
guest_libressl_ssl_io_transport(0xc0000409). Local reproduction at this exact head hit the retry-handshake assertion inGuestLibreSslSslIo.cppat line 1161. The handshake, data and shutdown groups passed locally. The same fixture failed in #12688. The transport prerequisite is correcting the fixture so the test double uses the backing socket callbacks while keeping the interruption assertions.Hosted Windows validation, the open prerequisites and upstream validation remain pending. The local results cover focused host fixtures. Title, console, macOS and GPU execution are outside this validation. Earlier source reviews and test runs below are pinned to their respective heads.
Previous archive integration evidence at
bf7939216aWhat
Integrate main's archive-backed file mapping (#11625) through the published transport prerequisite. Head
bf7939216ab7b00a77633b222f5b036713bfde08merges #12688 atdd3e4aa0de0548d820b4aa85a5c6c61ce3ae3683and upstream main through5e97fdf3415656bef6c786487517982d0a0920e6. The merge preserves main's POSIX archive error translation inside thepreadcancellation point and descriptor admission. The existing writes still preserve partial progress on interruption and finalize synchronous writes once per transfer.Tested
Release builds and focused tests on this PC at
bf7939216ab7b00a77633b222f5b036713bfde08:fstaterror probes passed again against the rebuilt libraries.The libkernel progress scan still reports the same eleven exports against the integrated main. A scanner-only control isolates the inherited Windows blocking-stream receive guard, as documented in the previous-head evidence below.
The two prerequisite PRs, exact-head CI, and upstream review and bench remain pending. Marc's focused source review covers the previous large-file integration head. These runs cover focused host cases. Title, console, macOS and GPU execution are outside this validation.
Previous large-file integration evidence at
c567dd9678What
Resolve the large-file integration after main's #24076. Head
c567dd9678d10713bc7047d421acc9406671d02ccarries the previously published write history, #12688 at804d854d2bdacb49116521eb6a7c0cba5e45c1d7, and main through05349cacbabe201178ea4999e0dba1076d3b5f15. Compare the refreshed transport and write heads.Each native chunk of a large regular-file write can now be interrupted. The write returns the bytes completed before interruption, positioned transfers preserve the descriptor offset, and synchronous completion runs once for the aggregate write. The published reads and transport changes carry the read accumulation, retained-socket shutdown wake, and checked accept composition.
Tested
Release builds and focused CTest on this PC at
c567dd9678d10713bc7047d421acc9406671d02c:fstaterrors with seccomp. They confirmed that a pending guest interruption plus hostEINTRpreserves completed bytes, and that otherwise unrelated host metadata failures propagate.write,pwrite,writev, andpwritevwith hostSIGINTimmediately after the first 1 GiB chunk. Each API returned exactly 1 GiB, delivered one deferred signal, and issued no second host transfer. File size and positioned and unpositioned descriptor offsets matched the bytes written.The progress report for
4387b62→c567dd9counts libkernel at 719/758 before and 708/758 after. Reproduced both counts in the scanner. A temporary source copy changing only the marker for the inherited Windows blocking-streamMSG_PEEK | MSG_WAITALLreceive gap restored exactly the eleven flagged exports. The scanner follows the sharedTransferhelper across platform, direction, and flag guards, including through forwarding aliases. The gap applies to the guarded receive combination. Sends passsend=true, and accept passes zero flags. This is a scanner control. The production marker and debt remain in the transport prerequisite.Exact-head CI, the two open prerequisites, and maintainer review and bench remain pending. Title, console, macOS, and GPU execution are outside this validation.
Previous write integration and independent review at
caeb7f4984What
Head
caeb7f4984210b6b4aa715cf0d20acdf4a7eb55epreserves the previously published write commits. It merges the published reads and transport layers through #12688 and upstream maincb734a9eb84a35717372d1101fa946b68ebe3374. Compare transport to this head.POSIX writes retain completed byte counts across deferred cancellation, including partial pipe and stream-socket transfers. The composition keeps the transport's retained-socket shutdown wake and
TransferKind::Accept, main's checked socket addresses and vector copies, and libSceNet forwarding.sendmsgholds one descriptor admission from socket lookup through the final send. Windows writes validate the native handle before CRT I/O.The independent review of
fbee14dc27bed22957213358c868617ecde78f86found a blocked forwarded-send cancellation and close path and a flush-error classification bug. Forwarded POSIX sends now register for interruption, preserve partial progress, and retain the original Winsock error on the nonblocking path. Direct SCE and libSceNet writes retain their behavior. The synchronous-write path distinguishes a flush interruption from an unrelated failure, even when a guest signal is pending.Tested
Release builds and focused CTest on this PC at
caeb7f4984210b6b4aa715cf0d20acdf4a7eb55e:sceKernelRdupfixture, descriptor access, stream close, and SSL transport.sendto. The fixture rejected the earlier Windows candidate. Five new interrupted flush cases also failed against that candidate by losing the returnedEIO; the five uninterrupted controls passed. All ten flush cases and the forwarded-socket fixture pass on the final head. The forwarded-socket fixture also passed five consecutive Windows runs.EINTRwith a pending guest interruption preserved completed bytes and skipped the flush. HostEINTRwithout a guest interruption and hostEIOwith one propagated their original exceptions. The probes ran from a disposable test executable.These are focused runtime selections. Console, title, macOS, and GPU execution were outside this run. Cancellation overhead is still unmeasured. The prerequisite PRs, exact-head CI, maintainer bench, and maintainer review remain pending.
Historical evidence and previous description at
bf740fcd27What
Published head
bf740fcd275bc7e9c8a78cbfce94da554e0e78b0preserves November writes6076fc5ca39d40aad6e69b27a41a50f4af3bc836, exact published transport8f34999f2fad40fcf704765c3dedcafe5d157fa7and reads32121ca48d0abf5e1c11e7c601636d10ec8cb77dthrough ordinary merge history. The refreshed stack includes fetched main4138defef7c468835190768e5143e411bce92d6a; previously declared landed prerequisites retain their authorship/history.Address Dean's inherited shutdown integration request by composing the reviewed reads/transport repair. Preserve all three receive-wrapper post-wait ReceiveShut checks and receiver arguments, the retained-socket shutdown wake, actual-cancellation separation and transport's explicit TransferKind::Accept. The write-specific sendto merge keeps main's paired Unix-socket checks before GuestArena host-read preparation. No accept-owner branch was edited and no new milestone behavior is introduced.
Address the outstanding SyncWrites exception finding. Catch only a distinct InterruptedFstat emitted for actual host fstat errnoEINTR. Handle a metadata-hook reported EINTR explicitly when an I/O interruption is active. Unsupported classifications and other metadata/flush runtime exceptions now propagate instead of being converted to an interrupted flush or ordinary write result. Positive completed progress and the existing SCE boundary remain unchanged. The missing MSG_DONTWAIT FreeBSD citation is restored in the owning transport prerequisite; its production blocking PEEK|WAITALL throw/debt and implemented nonblocking tests remain.
Dependency order is reads #12682 -> transport #12688 -> writes #12700. Write increment over exact transport prerequisite. This updates the existing write topic; the PRs remain open for maintainer review.
Tested
Fresh exact-head Release validation on this PC, CPU builds capped at two jobs:
abcontent, no replay, released descriptor admission, once cleanup/TSD and correct signal count.c8e26536e858da234f071beafadd62f4e291fc3bplus the new fixture fails 10/20, all interrupted cases losing the exception; all ten no-interruption cases pass (1.50 s total). The repaired candidate passes the 20 cases and the complete 82-case selection; Linux's final 927-case run includes them. This executes real library/cancellation paths, not an extracted SyncWrites harness. Actual kernel fstat(EINTR) was not fault-injected; that narrowly tagged path was inspected statically, while native-interrupted metadata hooks are exercised.bf740fcd275bc7e9c8a78cbfce94da554e0e78b0: no confirmed new must-fix defect. Both inspected production wrappers/lifetimes/positive progress and composition, not only the new tests; neither ran binaries. The transport prerequisite separately records its initial P2 accept finding, failing production counterexample, operation-kind fix, two fresh re-reviews and shutdown-notification removal controls.Known limits remain explicit: original FreeType submodule state preserved; WSL userfaultfd protection unavailable with the runtime's memory-comparison fallback. No fresh PS5, title, macOS, GPU, allocation-failure or paired same-scene trace_digest qualification, and no performance claim. Per-call allocation/signal-mask/handle cost and cancelling-caller spin remain unmeasured nonblocking follow-ups. Unix retained SSL polling, macOS unconnected-datagram/ancillary races, separately established address-waking intermittency and the historical Windows22621 sigjump cause are not repaired by these passing tests. Maintainer scene/bench, new-head CI and maintainer review remain separate gates. Earlier approvals and results below are historical, not approval/execution of this head.
Historical evidence and status at earlier heads (superseded where stated above)
What
Head
6076fc5ca39d40aad6e69b27a41a50f4af3bc836, integrated maind23df92b3805fea21493a73cbed8835c9e8548d0through ordinary merge history, preserving every previously published head and maintainer commit.Implement POSIX write cancellation above transport, preserving synchronous completion, partial progress, deterministic stream-close controls, the main-owned #9019 shared PosixPwrite provider and the separate SCE behavior. Inherit the maintainer-requested removal of blocking PEEK|WAITALL throw assertions from transport. Keep the production gap marker/debt, implemented nonblocking coverage and delayed partial-buffer tests.
#12149 merged November 4 at 05:34 UTC and #9019 merged November 4 at 17:34 UTC; both are satisfied in main. #10552/#10817/#10755 are also merged. All four Apple empty-iovec guards, general context restoration, synchronous writes and deterministic stream-close hooks/comparisons remain. No archive #11625 work or unrelated owner branch was changed.
Current source comparison:
git diff 95ce5937f26f90a44448271a17fb3d105be6128c 6076fc5ca39d40aad6e69b27a41a50f4af3bc836spans 17 files. The maintainer merged main separately into the published branches; the current lower head is not an ancestor of this head. This is a direct tree comparison; the main-based Files view remains cumulative. No retarget or history replacement was performed.Consolidated maintainer response and evidence.
Tested
Historical contributor AMD evidence: TechLevelZero, 2026-11-05 13:14 UTC, tested parent writes
2572b7019dmerged onto maine772fb25cc. RX 6300/RADV NAVI24, Mesa 25.2.8-0ubuntu0.24.04.4/Vulkan 1.4.318; Ubuntu 26.04.1/kernel 7.0.0-42/container ubuntu:24.04, Release. The contributor reports 4,681 passed / 15 failed / 71 skipped, with ten failures also on main and five unstable on main, zero reported new failures. Validation/no-cache was enabled; 1,409 tests ran on the GPU, with no reported new IDs and four IDs already on main. guest_job_manager_worker_spin was validated but not compared with main; agc_graphics_profile_draw timed out in parallel and passed the 360-second retry. Long-running tests and baseline failures/skips remain recorded, not an all-green claim.The displayed 4,767-of-4,074 selection count differs from the linked 07-select.log's 4,730/4,804; no unique whole-suite coverage ratio is inferred. This is contributor-reported evidence, not our GPU execution or an independent audit of every linked log. Compared the tested parent to current
6076fc5ca3: the changes are MainThreadMacOs.cpp, GuestMainStackMove.cpp, GuestNpCommonRuntime.cpp and kernel debt; the I/O implementation and requested socket fixtures are unchanged. That source comparison does not turn the old head/main run into blanket current-head qualification. Native Windows/current-head results are separately recorded below; the report does not resolve Windows 22621 or the old accept macOS timeout, qualify unpublished runtime candidates, or supply title performance/paired trace_digest evidence. No new I/O fix or source push follows from this report.Current writes bot-report audit at
6076fc5ca3: the live progress report compares maind23df92b38with this head. Reproduced libkernel main 703 done / 55 todo and head 696 / 62. A temporary scanner-only copy replacing only Transfer's required blocking-stream receive PEEK|WAITALL marker with a generic throw restores 703 / 55 and precisely accept/recv/recvfrom/recvmsg/send/sendfile/sendto. Helper-name propagation does not evaluate platform/direction/flag guards. Send paths cannot enter the receive-only guard and accept passes no peek/waitall flags; receive paths retain the documented Windows gap. This classification control supplies no runtime qualification. The production marker/debt and scanner remain unchanged, as do the maintainer-requested test removals; no unconditional seven-function stub replacement or new source fix is established.The overlap snapshot updated 2026-11-05 12:56:22 UTC has 21 compared / 84 uncomparable branches, against that same main. #15698 is confirmed merged and satisfied in the stack; other removed rows are not presumed merged or cleared. Re-read all 21 compared live heads: 20 match the latest accept selected-source scan. #14085 advanced to fd8e70930fdfba76e3326ac19149b42478cc0543; inspected its delta from 4e67d63a85551ed560845b3abc7766a1eab89ff6. Process.cpp, SSL debt and libc debt are unchanged, and the kernel-debt change carries main's macOS process-start-block retention already present in writes. Preserve that lifetime description alongside deferred POSIX I/O delivery when later composed; no new helper dependency or joint-owner runtime pass is inferred.
The earlier selected-source composition requirements remain, including checked-copy/error ordering, stream-close and retained descriptor ownership, socket address/SCM_RIGHTS behavior and opaque context identity. All 84 uncomparable branches remain uncleared. Depends on stays #12682, #12688; #12149/#9019 are satisfied in main. Archive #11625 is untouched. The current Windows success and remaining macOS/Windows 22621 limits are recorded below. No source push, retarget or repeated overlap comment accompanies this audit.
Current-head Windows verification: native Windows job succeeds at
6076fc5ca39d40aad6e69b27a41a50f4af3bc836. The earlier manual dispatch HTTP 403 remains historical; dispatch is no longer a blocker for this head's Windows execution. This success is read from GitHub job status; no per-fixture totals are inferred here. The sibling transport log supplies direct execution evidence for its requested socket tests, and the accept log supplies direct evidence for its installation/disposal cases. Other checks remain incomplete with no observed current failures. Reads/transport/writes approvals remain pinned to earlier parent heads; no new review is inferred. The old accept macOS x86-64 timeout remains unexplained, and accept stays draft for the unresolved Windows 22621 hang.Main-integration follow-up: authoritative head
6076fc5ca39d40aad6e69b27a41a50f4af3bc836, maind23df92b3805fea21493a73cbed8835c9e8548d0. During the reads overlap audit the bot refreshed to 12 compared / 81 uncomparable branches at 2026-11-05 12:56:19 UTC. #15698 is confirmed merged; its removed row is satisfied by main. The other removed rows are not treated as merged or cleared merely because they disappeared. The remaining compared heads match the selected-source audits; no new implementation dependency. The existing-main recvfrom notice was checked: one implementation definition and one canonical declaration in main and reads, with no duplicate registration to remove.The pre-push fetch caught maintainer commits
a564d53d8f(reads),95ce5937f2(transport) and6076fc5ca3(writes). Those published commits were adopted unchanged; only accept needed a new ordinary merge of the maintainer's writes head, producing82eaaf7766. Main's macOS process-start-block pages stay mapped, and the debt still states that POSIX read/receive waits wake and defer delivery until ownership guards are released. No maintainer source resolution was overwritten.All four authoritative heads pass required conventions and whitespace checks (the existing SSL warning remains on the upper layers). The changed MainThreadMacOs.cpp passes host macOS x86-64 syntax checking. Linux I/O production sources and the selected I/O fixtures are unchanged from the earlier composed 93-test run; guest_socket_dontwait passes again against those unchanged Linux binaries (1.93 s; 2.07 s CTest total). This is not execution of the macOS stack-move fixture or a fresh full-suite run. The refreshed coordinated overlap scan covers 1,831 PRs and fails closed for 84 uncomparable branches at the top accept tree; the reads report's 81 count has different scope and remains uncleared. No repeated no-change overlap comment is posted. New integration-head checks/reviews remain pending; earlier runtime results and approvals below are historical at the heads they name. The earlier manual dispatch was denied HTTP 403; current Windows jobs are recorded above, so dispatch is no longer a blocker for these heads; the intermittent Windows 22621 hang and old accept macOS x86-64 timeout remain unresolved. Accept stays draft.
Writes overlap refresh 2026-11-05 12:00:00 UTC at this head: 22 compared / 94 uncomparable branches, main
e772fb25cc. Re-read all 22 live heads. Nineteen match the selected new/changed source patches recorded in the transport description at40ca3c447b. Preserve the recorded checked-copy/error ordering, host-log/FILE-before-descriptor locking and stream-close controls, Windows address/zero-port/SourceFaults ordering, Native cancellation scopes, received-socket/SCM_RIGHTS ownership, context layout/copy bounds plus opaque mc_spare identity, macOS stack-region lifetime, and SSL handshake error classification with retained transport ownership when later composed. No whole-branch or joint-runtime clearance is inferred from those selected-source reviews.The three additional compared rows retain their prior audited heads: #8463
f4b87cbb57(checked sendmsg input/control copying and failure order), #14043 3714f2a16accc46133ffee29d41ba45f7d0f3a9e (connected socketpair sendto address/EISCONN behavior), and #15219bf4f7b7239(affinity input-size handling and explicit unsupported ranges/debt). Later composition must preserve their independent coverage/error ordering alongside write admission and partial-progress behavior; they introduce no helper this write implementation requires.The 94 uncomparable PR numbers match the transport report, but writes adds Stdio.cpp or descriptor-control shared files to #5021/#7121/#9566. These rows remain unverified, not cleared by the transport audit or the focused tests. The coordinated pre-push scan reported 100 uncomparable branches at the top accept tree; the counts have different scope. The existing-main sendto name/NID notice was checked: main and this writes head each retain exactly one implementation definition and canonical declaration, with _sendto forwarding to the existing export; no additional registration is warranted.
Depends on remains #12682, #12688; #12149/#9019 are satisfied in main. No new source push, retarget, import, order agreement or combined-owner runtime pass follows from this refresh. All 94 uncomparable branches remain uncleared; archive #11625 stays untouched. No repeated overlap comment posted; the existing consolidated response and runtime/Windows/macOS limits remain applicable.
Progress-report audit at this head: the e772fb2 → 2572b70 report labels seven socket exports reverted. Reproduced with the current scanner: libkernel main 703 done / 55 todo, this head 696 / 62. In a temporary scanner-only copy, replacing only Transfer's required blocking-stream receive PEEK|WAITALL NotImplemented marker with a generic throw restores 703 / 55 and exactly accept/recv/recvfrom/recvmsg/send/sendfile/sendto. The helper-name propagation does not evaluate platform, send/receive or flag guards. Send paths cannot take that receive-only guard, and accept passes no PEEK|WAITALL flags; receive paths retain the documented unsupported Windows combination alongside their implemented behavior. This is classification evidence, not runtime qualification. The production marker, debt and scanner are unchanged, consistent with the maintainer request to remove tests requiring the missing feature. No unconditional seven-function stub replacement or new source fix follows from this report.
Composed accept tree
6db995790dbe9193ee44028e327ad907faaa5cbawith maine772fb25cc72ee5faf77847f06bbc69533016e82: Ubuntu 24.04.5/GCC 13.3 Release, x86-64 Docker through Apple Silicon translation. Rebuilt libc/libkernel/libSceLibcInternal/libkernel_sys and focused fixtures. 30/30 selected socket/UDP/context/accept tests pass (4.60 s): guest_socket_dontwait 1.78 s, guest_udp 1.59 s, all 15 accept cases including both installation failures and cancel/jump handoff disposal. 63/63 selected synchronous-write/stream-close tests pass (3.13 s). These are composed-stack focused results, not a full suite or independent runtime runs of every layer. Both requested test removals are present; implemented nonblocking/peek and delayed partial-buffer cases remain.Required
python3 tools/check_conventions.py --base origin/mainchecks pass for all four final heads, using an isolated Git context whose origin/main is the actual fetched upstream main above. Reads has no findings; upper layers retain only the existing SSL debt-length warning. Whitespace, preserved-parent and bottom-up ancestor checks pass. The coordinated stack overlap scan covers 1,811 open PRs and fails closed for 100 uncomparable branches; no whole-branch overlap clearance or owner-order agreement is claimed. Latest main and all four remote heads were fetched before the atomic fast-forward-only push. GitHub reports all four branches merge cleanly.Earlier Windows verification status, superseded by the current results above: After the earlier publication, ordered Build dispatch
12682 12688 12700 12965was rejected with HTTP 403, “Must have admin rights to Repository.” At that point a collaborator/admin dispatch was requested for guest_socket_dontwait plus native Windows guest_socket_transfer_progress; current runs above now supply execution. The available MinGW 13 cross-syntax attempt stops at newer main's_fflush_nolockdeclaration; no native Windows execution is inferred. The previous published heads' Windows jobs passed, but do not qualify these updates. New-head CI/review requires refresh.Prior XairRrR approvals are historical: reads
32169af1dc, transport70120f1b86, writesfbd44d3326. Accept's prior review is COMMENTED and it remains draft. No new approval is inferred.The old accept macOS x86-64 job126136729127 remains failed at attempt 1; refreshed status/log reads 668 passed and guest_none_relocations timed out at 20.12 s, 354.88 s total. Its cause and a fix are unestablished; there is no fresh full macOS runtime qualification. The intermittent Windows 22621 sigjump hang remains unresolved; these Linux passes do not resolve it. Retained SSL waits, per-call I/O overhead and the cancelling-caller indefinite spin retain their debt/limits. Unpublished signal-registry/cancellation-request and SyncWrites-exception candidates are excluded. No new title/console, GPU or paired same-scene trace_digest run; no performance claim. Maintainer title-scene bench remains external.
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)Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:50:56Z.
Review: COMMENTED
The diff is cumulative (+7.5k) over #12682 and #12688, so the Files tab cannot be reviewed as the write step alone; the same remarks as on #12682 apply to the shared layer. In particular,
GuestDescriptorAccess::Get(int)takes a global static mutex and runserase_ifacross the whole descriptor map on each call, so every write, send, read and recv pays an O(open descriptors) scan under one process-wide lock. The close path polls withwait_for(1ms).Unblocks: noneagain sits next to the PPSA02429 evidence. If a title needs write cancellation with partial progress, please name it and show the log line that reaches it onmain; otherwise this is 7.5k lines with no consumer. And for the write path, which a networked title calls on every frame,tools/trace_digest.pysummaries ofmainversus the change from one machine and scene would settle the cost question.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T17:46:38Z.
Review: APPROVED
Reviewed — approved
The write-cancellation layer builds on
mainand its focused tests pass. A mutation ofThreadCancel::IoWritemakes the cancel, partial, close and signal tests fail, and I found nothing blocking.What I ran
Head
49b52e23db6b683dffe07daee2b2fdda6c8194ce,main1e658521a0a599872612bb91949311e2956b5283, merged with--no-ffinto a clean worktree (Release, GCC 14.2.0, Ninja, Debian 13 VM, 32 vCPU).The prepared full run (4551 tests) was also available; its results are in the table below.
Results
git diff --checkcheck_conventions.pydocs/dev/debt/libSceSsl.mddebt-length warning, which the author already mentions)main.guest_net_ctlis an unexpected skip, also onmainguest_io_write_*,guest_kernel_sys_pwrite*,pwrite_sys__*)--repeat until-fail:3guest_io_write_loopback__send__raceat 8.5 s (limit 15 s); none near the 30 s ruleNegative control
libkernel_sys only. Restoring
core/libs/prx/libkernel_sys/{Export.cpp,Export.Discovery.cpp,include/Api.hpp}frommainstops the new test executables from compiling, because they use the newpwrite_nid_postfix(int, const void*, size_t, int64_t)signature. That proves the tests depend on the new export, but it is not a runtime failure.Mutation of the write wrapper. I replaced
ThreadCancel::IoWriteincore/libs/prx/libkernel/Pthread/include/Cancel.hpp:143with{ Check(); return call(); }. This keeps the pre-call check but removes theIoPointinterruption and the post-call cancellation and restart logic. I rebuilt libkernel, libkernel_sys and the four write test executables. 20 of 30 selected tests then failed:write/writevin thecancel,partialandclosescenarioswrite/pwrite_sysin thecancelandsignalscenarioswrite/pwrite_sysin thecancelandclosescenariosThe
zeroandcompletecases and the plainguest_kernel_sys_pwrite*tests still passed, as expected for that mutation. I then restored the merged file from1411454abb41ef6b4047d02d51d6576e0950ccd0, rebuilt, and all 402 write tests passed.git status --porcelainis empty.Findings
Blocking
None.
Non-blocking
runtime_errorcan becomeEINTRduring an interrupted synchronous write. Seecore/libs/prx/libkernel/File/src/DescriptorControl.cpp:681-695(head).SyncWritescatches everystd::runtime_errorthrown insideThreadCancel::Nativeand turns it intoEINTRwheneverIoActive() && IoInterrupted().Classifythrowsstd::runtime_errorfor real gaps too, such asUnsupported(...)and the "unknown Windows file type" error (lines 148-163).EINTR. That breaks the "unimplemented paths throw" rule for that window.fstaterrno beingEINTR, and rethrow everything else.core/libs/prx/libkernel/Pthread/src/NativeIo.cpp:97-99allocates aStatewithnewon every native call.pthread_sigmaskcalls plussigpending; on Windows it callsDuplicateHandle/CloseHandle.Depends online.IoWrite/Io, thePosixPwrite_nid_no_patchandwrite/_writewrappers,SyncWrites,NativeIo, thescePthreadCancelwake loop and theSignals.cppdispatch changes.MSG_DONTWAITentry indocs/dev/debt/libkernel.md:281no longer cites FreeBSD 11.4'ssoreceive_genericfor theEWOULDBLOCKbehaviour, and the old note about a blockingsendlarger than the socket buffer was removed. If that gap is really closed, removing the note is correct; the citation for the Unix behaviour is still worth keeping.Not verified
guest_io_context_sigjumphang the author reports and the macOS relinker timeout and fetch failure. This machine is Linux only.guest_io_write_only_pipe_testsand theChangeStatusappend-admission loop: they are not built on Linux.pwritefrom #9019.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T18:26:47Z.
Review: APPROVED
Re-checked — approved
Two commits were added since
49b52e23.085458a70cmoves the Windows partial-writable-bufferrecvfromprobe insideReceiveNative'sTransferoperation and makes Windows blocking streamMSG_PEEK | MSG_WAITALLthrow throughNotImplemented_nid_no_patch.8957ad0b52adds debt entries for the Unix SSL retained-transportpollwait. Checks and focused tests pass, and nothing blocking was found.What changed since my last review
git range-diffshows commits 1–57 unchanged and two new ones. The source delta from49b52e23to022410becovers 5 files:core/libs/prx/libkernel/Socket/src/Udp.cppPendingFits/DropDatagram/EFAULTprobe moved fromReceiveFrominto theTransferlambda (ReceiveNative, L1094-L1104). It runs only whenpartialBuffer && offset == 0.WSAEWOULDBLOCKfrom the probe now goes through the directional wait, cancellation and the singleSO_RCVTIMEOdeadline. Before, the probe ran once afterWaitForTransferand could fail on a datagram that had not arrived yet.PEEK|WAITALLbranch now throws instead of returningWSAEOPNOTSUPP._WIN32. On Unix the new parameter is ignored.GuestUdp.cppgetsCheckDelayedPartialReceive, which runs on every platform.GuestSocketTransferProgress.cppgetsReceivePeekWaitAll. This executable is registered onlyif(WIN32).MSG_DONTWAITandMSG_WAITALLentries indocs/dev/debt/libkernel.mdnow say the combination throws.pollwait are indocs/dev/debt/libkernel.mdanddocs/dev/debt/libSceSsl.md.The author's later comments document the macOS CI failures and their admin-retry status. They contain no reply to my previous findings.
What I ran
Head
022410beb3bbf13d1b984a95d25689f2cde6b90b,main1e658521a0a599872612bb91949311e2956b5283, merged treee23e8a01707afcbeee5b895ae743e8abd3ca67fa, in a clean worktree (Debian 13 VM, GCC 14.2.0, Release, Ninja).git diff --checkcheck_conventions.pylibSceSsl.mddebt-length warning)main;guest_net_ctlunexpected skip, also onmainguest_socket_options_multicastfailed, a knownmainfailureguest_udp×5Negative control
The production change is entirely under
#ifdef _WIN32. I restoredUdp.cppfrom the previously reviewed head and rebuilt.guest_udp, including the newCheckDelayedPartialReceive, still passed, as expected on Linux. So the new case works as a cross-platform behaviour check on Linux but cannot catch a regression here.ReceivePeekWaitAllis built only on Windows. I restored the merged file and rebuilt;git status --porcelainis empty. The control for the Windows fix depends on the Windows CI run.Previous findings
runtime_errorbecomesEINTRduring an interrupted synchronous write — Still open.SyncWritesis unchanged at DescriptorControl.cpp L684-L694. It still catches everystd::runtime_error, including those fromClassify. Non-blocking.new Stateplus signal-mask syscalls inNativeIo— Still open. The code atcore/libs/prx/libkernel/Pthread/src/NativeIo.cpp:97-99is unchanged, and the description still says the cost is unmeasured. Non-blocking.MSG_DONTWAITdebt entry lost the FreeBSDsoreceive_genericcitation — Still open. The entry atdocs/dev/debt/libkernel.md:281was edited again in this push and still cites no source for the UnixEWOULDBLOCKbehaviour. Non-blocking.New findings
Blocking
None.
Non-blocking
pollgap appears at the end ofdocs/dev/debt/libkernel.md(L387-L388) and ofdocs/dev/debt/libSceSsl.md(L22-L23), with nearly the same text.### Functionalsection.core/libs/prx/libSceSsl/Export.cpp, but the barepollit describes is in libkernel'sUdp.cpp:grep pollfinds nothing in thatExport.cpp.libkernel.md, where the wait lives, and cut the libSceSsl entry to one sentence pointing to it. Also remove the blank lines.NativeError().core/libs/prx/libkernel/Socket/src/Udp.cpp:1104,if (error != 0) return -1;hands control back toTransfer, which readsWSAGetLastError()to choose between waiting and failing.NativeError()and theFIONREADpath leave the probe's last error in place.WSASetLastErrorwith the matching native code beforereturn -1would make the contract explicit.Not verified
PEEK|WAITALLthrow, andguest_socket_transfer_progress. This machine is Linux only, and the author reports only MinGW syntax checks for this head.guest_io_context_sigjumphang.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T18:53:42Z.
Review: APPROVED
Re-checked — approved
Since
022410be,70120f1b86changes the WindowsPEEK|WAITALLassertion inGuestSocketDontWait.cppto expect the unsupported throw, and4f897946d2fixes the debt-list placement I raised last time. Checks pass and nothing blocking was found.What changed since my last review
git range-diffshows commits 1–59 unchanged and two new ones. They touch 3 files and no production code.core/libs/tests/GuestSocketDontWait.cpp(commit70120f1b86)#ifdef _WIN32, the old assertion expected-1/EOPNOTSUPPfrom a worker thread.UnsupportedPeekWaitAll, which runs on the test thread and checks three things:Transferpasses toNotImplemented_nid_no_patch(Udp.cpp:168);NotImplementedCalls_nid_no_patch()goes up by exactly one;CheckReadable(true)that follows, and the laterDONTWAITconsume, are kept.Udp.cpp:167-169), so catching it on the test thread leaves the socket usable for the checks that follow.docs/dev/debt/libSceSsl.md/libkernel.md(commit4f897946d2)pollwait.SyncWritesexception fix and thesoreceive_genericcitation exist only in an unpublished local candidate, so they are not in this head.What I ran
Head
fbd44d33266946006afd8ca4acc55e2bbe7d91e6,main1e658521a0a599872612bb91949311e2956b5283, merged tree4e01270d03f87b21e3851edc24d9c51698cca108, in a clean worktree (Debian 13 VM, GCC 14.2.0, Release, Ninja).git diff --checkcheck_conventions.pylibSceSsl.mddebt-length warning)main.guest_net_ctlis an unexpected skip, also onmain.guest_socket_dontwait×3 (Linux)git status --porcelainNegative control
None was possible here. The only changed assertion is inside
#ifdef _WIN32, and no production file changed, so the Linux build compiles the same test logic as before. The Windows CI run of this head is the real check: the author reports that the parent head's Windows job failed on exactly this assertion.Previous findings
runtime_errorbecomesEINTRduring an interrupted synchronous write — Still open.core/libs/prx/libkernel/File/src/DescriptorControl.cpp:684-694still catches everystd::runtime_error. The author reports a fix only in an unpublished local candidate. Non-blocking.new Stateplus signal-mask syscalls inNativeIo— Still open.core/libs/prx/libkernel/Pthread/src/NativeIo.cpp:97-99is unchanged, and the cost is still unmeasured. Non-blocking.MSG_DONTWAITdebt entry lost the FreeBSDsoreceive_genericcitation — Still open. The fix is in the author's unpublished candidate, not in this head. Non-blocking.docs/dev/debt/libkernel.md:387keeps the full entry, and the blank line before it is gone.docs/dev/debt/libSceSsl.md:22is now a one-sentence pointer to the libkernel debt, and the blank line before it is gone.NativeError()— Still open.core/libs/prx/libkernel/Socket/src/Udp.cpp:1104is unchanged. Non-blocking, and still unverifiable on Linux.New findings
Blocking
None.
Non-blocking
None.
Not verified
Transferthrow path: this machine is Linux only. The author reports syntax checks and an isolated harness only, and says the exact-head Windows build was cancelled before CTest ran.guest_io_context_sigjumphang.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T08:50:43Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
bf740fcd275bc7e9c8a78cbfce94da554e0e78b0usingrepo_read.pyto inspect the prepared description, manifest, diff, and selected changed hunks. I did not run builds or tests; the validation totals in the description are author-reported.Results
Findings
Blocking
None identified in the inspected hunks.
Non-blocking
fstatreturningEINTR; the description says this narrowly tagged path was inspected statically, while metadata-hook interruptions are exercised.Not verified
This was a partial review, so a formal approval is not justified. I read
description.md,commits.md,manifest.json, and selected hunks indiff.patch; I did not read every changed file listed in the manifest.files.jsonand the full included file texts were not inspected. I did not independently verify the reported Windows/Linux test runs, conventions audit, or adversarial reviews. No tests or builds were run.To get this to a good state
Nothing is required. The optional follow-ups are listed above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T23:28:48Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing in the inspected large-file transfer changes blocks merging; the PR description reports focused tests, but I did not run them.
What I ran
Inspected the prepared diff at head
c567dd9678d10713bc7047d421acc9406671d02cand read the large-file transfer implementation and fixture. No build or tests were run.Results
Findings
Blocking
None in the inspected code.
Non-blocking
None.
Not verified
The PR changes 70 repository files; I read only
core/libs/prx/libkernel/File/src/Stdio.cppandcore/libs/tests/GuestFileVector.cppfrom the changed files, plus the prepared description, commit list, diff, manifest and review README. The remaining changed files and broader cancellation, signal, descriptor, socket, SSL, context, and test changes were not read. I therefore cannot make a complete-review or approval determination. The description's reported Windows/Linux tests, probes, and audits were not run by me.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T03:08:25Z.
Review: COMMENTED
Reviewed — comments
The prepared bundle describes POSIX read and write cancellation composed with archive-backed reads; I reviewed selected changed code at head
bf7939216ab7b00a77633b222f5b036713bfde08, but not the complete change, so a formal merge decision is not justified.What I ran
No commands or tests were run. I read the prepared description, commit list, manifest, and selected diff hunks using the review reader. The description reports Windows and Linux test runs; these are author-reported, not runs performed in this review.
Results
Findings
Blocking
None confirmed in the code inspected.
Non-blocking
None.
Not verified
The review bundle lists 70 changed files, all marked included. I read selected hunks from
core/libs/prx/libc/src/DescriptorAccess.cpp,core/libs/prx/libc/src/FileAndHeap.cpp, andcore/libs/prx/libSceNet/Export.cpp's diff, but did not read all changed files or inspect the corresponding full source and callers. Other changed files, tests, archive error mapping, and most cancellation paths remain unverified.files.jsonwas not present in the reader listing, so excluded-by-rule files were not checked.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T04:47:13Z.
Review: COMMENTED
Reviewed — no blocking findings
The reviewed diff shows the forwarded-send registration and error-preservation changes, but this review did not cover every changed file, so a formal approval is not justified.
What I ran
8637b820cc5e03d2e658f4eed8af5f2de779862b.Results
Findings
Blocking
None identified in the inspected hunks.
Non-blocking
Not verified
The prepared manifest lists 72 changed files, all marked included. I read the diff and targeted hunks for forwarded socket sends and the SSL send adjustment, but did not read every changed file or audit all changed behavior. The description reports that
docs/dev/debt/changes/posix-socket-blocking-transport.mdwas excluded by rule; no other exclusions were listed in the prepared materials. No tests or builds were run here.To get this to a good state
Nothing is required. Optional: complete a full review of the remaining changed files and independently run the relevant exact-head checks.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T06:24:57Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
c76cc791de9fd7f0e68f0d53676879d25ebef470. I read the prepared description, commit list, manifest, relevant diff hunk, and targeted source forFakeSocket.hpp; I did not run tests or other commands. The description reports focused Windows and Linux tests, but those results were not independently run here.Results
Findings
Blocking
None in the inspected scope.
Non-blocking
None.
Not verified
The manifest lists 83 changed files, all included in the review bundle. I read one changed file in full,
core/libs/prx/libSceLibreSsl/tests/FakeSocket.hpp, plus targeted excerpts from the diff and description. The other 82 changed files were not reviewed, including the broader POSIX I/O cancellation implementation; no conclusion is offered on those changes. Tests, CI, base merge state, and console behavior were not verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T13:40:56Z.
Review: COMMENTED
Reviewed — comments
The review is incomplete, so a formal merge decision is not justified; no verified blocking defect was identified in the excerpts inspected.
What I ran
Reviewed head
e3138d7ceaac42bf00138e2d7d65e49217f916abusing the prepared review documents and repository reader. No executable checks were run.Results
Negative control
Not run; no test was executed.
Findings
Blocking
None verified in the inspected excerpts.
Non-blocking
Nothing blocks this; the points below are optional. Complete inspection of the remaining changed files before treating this review as a merge decision.
Sources
Inspected excerpts from
core/libs/prx/libc/src/DescriptorAccess.cpp,core/libs/prx/libkernel/Pthread/src/IoSignals.cpp,core/libs/prx/libkernel/Socket/src/Udp.cpp,core/libs/prx/libkernel/Pthread/src/NativeIo.cpp, andcore/libs/prx/libc/src/JumpBuffer.cpp, plus selected hunks fromreview/diff.patch.Not verified
Most changed files listed in
review/manifest.jsonwere not read, including most tests and implementation files. The review folder's prepareddescription.md,commits.md,manifest.json, and selecteddiff.patchexcerpts were read; excluded files listed infiles.jsonwere not available through the prepared folder. Test claims in the description were not independently verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T09:07:44Z.
Review: COMMENTED
Reviewed — comments
A full review is incomplete because the change spans 80 files and I inspected only selected cancellation, descriptor, signal, and socket paths; no blocking defect is verified in those paths.
What I ran
No commands or tests were run. I read the prepared description, commit list, manifest, diff, and selected changed source ranges through
repo_read.pyat head6b8ca980e58f287cb042abf8c09f78f53298aa36. The description’s build and test results are author-reported.Results
Findings
Blocking
None verified in the selected paths.
Non-blocking
None.
Not verified
I did not inspect all added lines in the 80 changed files, so this is not a complete review and does not establish that uninspected code is sound. In particular, the broad file I/O, descriptor, signal/context, and socket changes and their full test coverage remain unverified. The repository file list marks all 80 changed files as included; I read only selected ranges of
core/libs/prx/libkernel/Pthread/include/Cancel.hpp,core/libs/prx/libkernel/Pthread/src/IoSignals.cpp,core/libs/prx/libkernel/Pthread/src/NativeIo.cpp,core/libs/prx/libc/src/DescriptorAccess.cpp,core/libs/prx/libkernel/File/src/Stdio.cpp,core/libs/prx/libkernel/Socket/src/Udp.cpp,core/libs/prx/libkernel/System/src/Signals.cpp,core/libs/prx/libc/src/JumpBuffer.cpp, andcore/libs/prx/libkernel/System/src/UserContext.cpp. No excluded changed files were listed.To get this to a good state
Complete the line-by-line review of every changed file and run the relevant checks on this exact head before making a formal merge decision.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:56:25Z.
Review: COMMENTED
The trial merge conflicts across libkernel stdio, socket and signal code. This head also lacks the current #12682 head in its ancestry. Please refresh the stack before testing the combined cancellation changes. The partial-progress tests should still prove that already accepted bytes are returned on interruption and the following call observes its own error state. Please retain the shared-descriptor and Windows pending-I/O cases when resolving the conflicts. Put the new debt entries in fragments.
AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.