Skip to content

feat(libkernel): cancel blocked POSIX writes with partial progress - #12700

Open
Felipebmaitan wants to merge 212 commits into
boykopovar:mainfrom
Felipebmaitan:feat/posix-write-cancellation-core
Open

Felipebmaitan wants to merge 212 commits into
boykopovar:mainfrom
Felipebmaitan:feat/posix-write-cancellation-core

Conversation

@Felipebmaitan

@Felipebmaitan Felipebmaitan commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What

Head 6b8ca980e58f287cb042abf8c09f78f53298aa36 merges published #12688 978a8bef6c118f57242b96cee5c6f8cdf493e5d8, including #12682 7887e7a03da0e8aeed2557f4ba43a6aa777494b9 and main 4f5777f2f320111b156ed5db843a6d5f67968923.

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:

  • Windows 11, WinLibs GCC 15.2.0 r7. 849 focused tests passed, zero failures and zero skips. Seven scoped patched checks passed. The loader opened 9 staged modules, and the three cancellation imports still resolve to patched libkernel.
  • The imported fix(libkernel): check the send and recv buffers as sendto and recvfrom do #24382 fixture aborted at the invalid-buffer recv assertion on predecessor e3138d7ceaac42bf00138e2d7d65e49217f916ab with ECONNABORTED. The same diagnostic fixture and the repository's guest_udp pass on this head, including the expected EFAULT and stream/datagram boundary cases. The UDP fixture and 8 Windows prefix cancellation/shutdown cases passed five consecutive runs each.
  • Debian on WSL2 Linux 6.6.87.2, GCC 14.2.0. 921 focused tests passed, zero failures and zero skips. The pending-connect ENOTCONN probe, four large-write interruption probes, and three host fstat probes passed.
  • Conventions, debt-fold, whitespace and the public-header audit passed. The audit covered 413 libraries and 34,810 exports.

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 e3138d7

What

Head e3138d7ceaac42bf00138e2d7d65e49217f916ab merges published transport #12688 at a57cf356306256d779487ad2e27695ae76f99ea6, including main 8ab98849d5ddf19f9e8758a5205b6159318ea10c and #24939. Linux send, write and addressless sendto return ENOTCONN while 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:

  • Windows 11, WinLibs GCC 15.2.0 r7. 841 focused tests passed, zero failures and zero skips. This includes the blocking-connect retry fixture. Seven additional scoped patched checks passed. The loader opened 9 staged modules, and the three cancellation imports still resolve to patched libkernel.
  • Debian on WSL2 Linux 6.6.87.2, GCC 14.2.0. 921 focused tests passed, zero failures and zero skips. The existing TCP and pending-connect cases ran in guest_tcp. A disposable diagnostic variant of main's TCP fixture returned EAGAIN on preceding head c76cc791de9fd7f0e68f0d53676879d25ebef470 and ENOTCONN on this head for all three guest APIs.
  • Both platforms passed the write, descriptor, archive and LibreSSL selections. Four Linux large-write interruption probes and three host fstat probes passed.
  • Conventions, whitespace and public-header checks passed. The full debt-fold check reported the same unmatched libwebrtc fragment on integrated main and this head. The header audit covered 413 libraries and 34,810 exports.

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 c76cc79

What

Head c76cc791de9fd7f0e68f0d53676879d25ebef470 merges the LibreSSL fixture repair from published #12688 at 59991e7d5e186a075c78bd7b55718ce6bb63b59f. 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:

  • Windows 11, WinLibs GCC 15.2.0 r7. 839 focused tests passed, zero failures and zero skips. The seven scoped patched tests also passed. The loader opened all nine staged modules, and the three cancellation imports still resolve to patched libkernel.
  • Debian on WSL2 Linux 6.6.87.2, GCC 14.2.0. 919 focused tests passed, zero failures and zero skips. Four large-write chunk interruption probes and three host fstat probes passed.
  • Both platforms passed all four LibreSSL I/O groups, all three TLS engine groups, and the archive and write-cancellation selections. The earlier hosted transport failure reproduced locally at the exact preceding head. The fixed Windows transport tests each passed 8 consecutive runs.
  • Conventions, debt fragments, whitespace and the public-header audit passed. The audit covered 413 libraries and 34,805 exports.

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 b8271ad76c97526637d1bcdd4dff3009c6c14350 and 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 duplicate recvfrom and sendto notices 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 8637b82

What

Fix the Windows loader error for the forwarded POSIX write path. Head 8637b820cc5e03d2e658f4eed8af5f2de779862b merges published #12688 at 7935169d1605d995040076bee0b6128df94a690c on top of the existing writes branch. It keeps the integrated upstream main at 5e97fdf3415656bef6c786487517982d0a0920e6.

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:

  • Windows 11, WinLibs GCC 15.2.0 r7. 832 focused tests passed, zero failures and zero skips. The forwarded-socket fixture includes blocking send cancellation, partial sends, close wakeups and a saturated sendto. The fixture also passed five consecutive runs.
  • Debian on WSL2 Linux 6.6.87.2, GCC 14.2.0. 912 focused tests passed, zero failures and zero skips. Four large-write chunk interruption probes and three host fstat error probes also passed.
  • On published predecessor 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.
  • Conventions, debt fragments, whitespace and the public-header audit passed. The audit covered 413 libraries and 34,805 exports.

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 in GuestLibreSslSslIo.cpp at 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 bf79392

What

Integrate main's archive-backed file mapping (#11625) through the published transport prerequisite. Head bf7939216ab7b00a77633b222f5b036713bfde08 merges #12688 at dd3e4aa0de0548d820b4aa85a5c6c61ce3ae3683 and upstream main through 5e97fdf3415656bef6c786487517982d0a0920e6. The merge preserves main's POSIX archive error translation inside the pread cancellation 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:

  • Native Windows, WinLibs GCC 15.2.0 r7. 832 passed, zero failures and zero skips.
  • Debian container on WSL2 Linux 6.6.87.2, GCC 14.2.0. 912 passed, zero failures and zero skips.
  • Both platforms ran all five archive fixtures, including mapped-file failures and damaged backing, alongside write and read cancellation, synchronous writes, socket transfers, descriptor reuse, vector and positioned I/O, and AIO.
  • The four Linux write-chunk interruption probes and three Linux host fstat error probes passed again against the rebuilt libraries.
  • Conventions, debt fragments, whitespace and the public-header audit passed. The audit covered 413 libraries and 34,805 exports.

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 c567dd9

What

Resolve the large-file integration after main's #24076. Head c567dd9678d10713bc7047d421acc9406671d02c carries the previously published write history, #12688 at 804d854d2bdacb49116521eb6a7c0cba5e45c1d7, and main through 05349cacbabe201178ea4999e0dba1076d3b5f15. 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:

  • Windows 10.0.26300, WinLibs GCC 15.2.0 r7: 832 passed, zero failures and zero skips.
  • Debian container on WSL2 Linux 6.6.87.2, GCC 14.2.0: 913 passed, zero failures and zero skips. The Unix large-file fixture exercised transfers over 2 GiB, including vector I/O, positioned reads, and AIO.
  • Both selections covered write cancellation, synchronous writes, descriptor reuse, shared memory, stream close, read/shutdown, and socket and libSceNet forwarding.
  • Three disposable Linux probes injected host fstat errors with seccomp. They confirmed that a pending guest interruption plus host EINTR preserves completed bytes, and that otherwise unrelated host metadata failures propagate.
  • Four additional Linux probes interrupted write, pwrite, writev, and pwritev with host SIGINT immediately 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.
  • Conventions, debt-fragment and whitespace checks, and the public-header audit passed. The header audit covered 413 libraries and 34,780 exports. The function-name scan found shared entry points in the stack and in open ksem PRs fix(libkernel): fail read, write and seek on a ksem id as FreeBSD 11.4's ksem_ops does #24487 and fix(libkernel): fail fsync, fstatfs, fchflags, futimes and flock on a ksem id as FreeBSD 11.4 does #24488, which cover descriptor error rules.

The progress report for 4387b62 → c567dd9 counts 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-stream MSG_PEEK | MSG_WAITALL receive gap restored exactly the eleven flagged exports. The scanner follows the shared Transfer helper across platform, direction, and flag guards, including through forwarding aliases. The gap applies to the guarded receive combination. Sends pass send=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 caeb7f4

What

Head caeb7f4984210b6b4aa715cf0d20acdf4a7eb55e preserves the previously published write commits. It merges the published reads and transport layers through #12688 and upstream main cb734a9eb84a35717372d1101fa946b68ebe3374. 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. sendmsg holds one descriptor admission from socket lookup through the final send. Windows writes validate the native handle before CRT I/O.

The independent review of fbee14dc27bed22957213358c868617ecde78f86 found 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:

  • Windows 10.0.26300, WinLibs GCC 15.2.0 r7: 822 passed, zero failures and zero skips. This includes 405 write cases, Windows restricted-right pipes, named shared memory, libSceNet forwarding, and shutdown.
  • Debian container on WSL2 Linux 6.6.87.2, GCC 14.2.0: 904 passed, zero failures and zero skips. This includes 430 write cases, shared-memory preflight, SCM_RIGHTS, and native socket mode. Both platforms ran all 92 synchronous-write cases, main's sceKernelRdup fixture, descriptor access, stream close, and SSL transport.
  • The augmented forwarded-socket fixture checks partial sends under cancellation and POSIX close, and cancellation of a saturated forwarded sendto. The fixture rejected the earlier Windows candidate. Five new interrupted flush cases also failed against that candidate by losing the returned EIO; 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.
  • Three separate Linux probes against the exact built libkernel used a per-thread seccomp filter to inject errors from the actual host stat syscall. Host EINTR with a pending guest interruption preserved completed bytes and skipped the flush. Host EINTR without a guest interruption and host EIO with one propagated their original exceptions. The probes ran from a disposable test executable.
  • Conventions, debt-fragment validation, whitespace, and the public-header audit passed. The audit covered 413 libraries and 34,771 exports. The function-name overlap scan recorded feat(libkernel): create SOCK_SEQPACKET socketpairs on Windows #23341 and fix(libkernel): check the send and recv buffers as sendto and recvfrom do #24382 as related open socket work. Neither is a dependency of this refresh.

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 bf740fc

What

Published head bf740fcd275bc7e9c8a78cbfce94da554e0e78b0 preserves November writes 6076fc5ca39d40aad6e69b27a41a50f4af3bc836, exact published transport 8f34999f2fad40fcf704765c3dedcafe5d157fa7 and reads 32121ca48d0abf5e1c11e7c601636d10ec8cb77d through ordinary merge history. The refreshed stack includes fetched main 4138defef7c468835190768e5143e411bce92d6a; 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:

  • 875/875 Windows focused cases pass (Windows10.0.26300, WinLibs GCC15.2; 51.01 s total).
  • 927/927 Linux focused cases pass (Ubuntu24.04 imav-tao WSL2/kernel6.6.87.2, GCC13.3; 43.72 s total).
  • Both relevant production libc/libkernel/libSceLibcInternal/libkernel_sys/libSceNet/libSceSsl graphs and fixtures rebuilt from this worktree. Selections include read/write cancellation, pipe/socket progress, descriptor duplication/close/reuse, shared/positioned metadata waits, signals, context retirement, stream-close barriers, append/vector writes, socket native/dontwait/host-write behavior and SSL transport. They are focused selections, not the entire project suite; no skipped CI job is counted as executed validation.
  • 82/82 Windows synchronous-write cases, including 20 new cases across write, writev, pwrite, libkernel_sys pwrite and pwritev. Metadata and flush hooks throw a known unknown-gap exception after a real native pipe wait, with and without pending signal delivery. Checks require original exception text, existing ab content, no replay, released descriptor admission, once cleanup/TSD and correct signal count.
  • Regression control: composed production baseline c8e26536e858da234f071beafadd62f4e291fc3b plus 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.
  • Two fresh independent read-only adversarial MICRO/MACRO reviews of exact 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.
  • Public-header audit: 407 libraries / 30,931 exports, unique owning declarations and umbrella coverage pass. Required conventions against origin/main: 0 errors, one existing 1,084-character context-debt warning. Isolated overlap scan: 1,763 heads, 79 uncomparable shared-file branches; failed closed, so no blanket overlap clearance or new contributor-order agreement is claimed.

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 main d23df92b3805fea21493a73cbed8835c9e8548d0 through 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 6076fc5ca39d40aad6e69b27a41a50f4af3bc836 spans 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 2572b70 merged onto main e772fb2. 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 6076fc5: 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 6076fc5: the live progress report compares main d23df92 with 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 fd8e709; inspected its delta from 4e67d63. 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, main d23df92b3805fea21493a73cbed8835c9e8548d0. 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 a564d53 (reads), 95ce593 (transport) and 6076fc5 (writes). Those published commits were adopted unchanged; only accept needed a new ordinary merge of the maintainer's writes head, producing 82eaaf7. 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 e772fb2. Re-read all 22 live heads. Nineteen match the selected new/changed source patches recorded in the transport description at 40ca3c4. 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 f4b87cb (checked sendmsg input/control copying and failure order), #14043 3714f2a (connected socketpair sendto address/EISCONN behavior), and #15219 bf4f7b7 (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 6db995790dbe9193ee44028e327ad907faaa5cba with main e772fb25cc72ee5faf77847f06bbc69533016e82: 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/main checks 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 12965 was 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_nolock declaration; 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 32169af, transport 70120f1, writes fbd44d3. 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

lgqdaxia and others added 30 commits October 25, 2026 22:47
Keep native signals arriving beyond the receive timeout and bound the retained-owner wait. The same fixture rejects a source variant that incorrectly restarts its deadline after EINTR.

AI-assisted: Codex
Read O_NONBLOCK from the native socket for every retained transfer so descriptor aliases and passed sockets do not turn nonblocking I/O into a blocking wait. Keep guest timeout accounting and native query errors intact.

AI-assisted: Codex
Exercise real native descriptor aliases switching both blocking directions and a saturated nonblocking send after the guest descriptor closes, independently of SCM_RIGHTS.

AI-assisted: Codex
This was referenced Dec 2, 2026

@ligmaSec ligmaSec left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.