fix(libSceNet): wake UDP receives on abort and close #24065
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24065"
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 Romannachwievor on 2026-11-20T03:58:01Z.
What
On macOS, wake blocked UDP receives when an unconnected socket is aborted or closed. The native shutdown fallback connects the datagram socket to loopback before shutting it down.
Tested
guest_sce_net_tests --unbound-datagram-receivepassed three times on the change, covering IPv4/IPv6, bound/unbound sockets, Abort/Close. Without the helper, the bound receive remained blocked. Fullguest_sce_netstill fails atCheckConnectTimeoutExpiry(errno 61).userfaultfd failed (Operation not permitted)andrecvmsg: process_vm_readv failed with errno 38; the fix was not reached.build-full, maina4d1053d4b+ #17425 + #11049, without this change): fullguest_sce_netfails at the same place (line 1241,connect timeout expiry: no connect stayed pending, errno 61). That is the known macOS backlog issue #22443 (PR #22623), not this change. The Linux code path is unchanged: the extra connect and shutdown run only under__APPLE__.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 PrivacyOnion on 2026-11-20T04:00:30Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
369900d7ba:tools/check_conventions.pypassed.guest_sce_net_testsbuilt cleanly.guest_sce_net,guest_net_inet_pton_source_faults):core/libs/prx/libSceNet/Export.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T05:14:08Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing in the inspected change shows a verified blocking defect; the change remains incompletely verified because no checks were run in this review.
What I ran
Reviewed head
369900d7ba4e9f33184ae2dd4674bdeae32d7523using the prepared diff and pinned reader. No build or tests were run. Files read:review/description.md,review/commits.md,review/manifest.json,review/diff.patch,core/libs/prx/libSceNet/Export.cpp(lines 260–320, 1388–1440, 1770–1825),core/libs/tests/GuestSceNet.cpp(lines 760–845, 2960–2990), anddocs/dev/debt/changes/fix-net-abort-unconnected-udp-macos.md. The change’s complete text was included for all three changed files; no changed files were excluded inmanifest.json.review/files.jsonwas not available through the reader.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The macOS and Windows runtime behavior, Linux behavior, and the author-reported test results were not independently verified. The full source text for each changed file was available, but only the targeted ranges above were read. The excluded-file listing was unavailable.
To get this to a good state
Nothing is required.
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.