Repository navigation
Conversation
3c88c50 to
b5ce981
Compare
|
Windows test of this PR: the new check in Environment: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, Result: Suggestion (untested): wait until the listener is readable (poll with a timeout) or retry on Not checked: whether the same race exists in the implementation and not only in the test; the PR base is older than #4391, so the interaction with the new descriptor model is also open; Linux not tested; no title run. AI-assisted (Claude Code). |
|
Follow-up on the intermittent |
b5ce981 to
62df1d7
Compare
62df1d7 to
b2243e1
Compare
|
Linux validation (Ubuntu 24.04, GCC 13.3, Release), this PR's commits on AI-assisted: yes |
|
Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line. |
What
sceNetAcceptnow preserves the listener's non-blocking mode in both the accepted host socket and the state returned bysceNetGetsockopt(SO_NBIO).On the base of this PR,
bb9a4d8a244cb4cbe3a8c9f69a21074b696e7684, a connection accepted from a non-blocking listener reportsSO_NBIO = 0. On Linux the accepted host socket is also blocking, so an empty receive can wait indefinitely. Windows inherits the host mode but still reports the wrong guest state. The new regression fails on main withsceNetAccept did not inherit listener nonblocking mode.The implementation explicitly enables the inherited host mode before registering the connection and records it on that connection. A host mode-setting failure closes the new socket through the existing owner and returns the translated error. Changing either socket's mode later does not change the other.
This follows FreeBSD 11.4
kern_accept4withACCEPT4_INHERIT. PS5 hardware behavior has not been measured; that limitation is recorded in the library's technical debt.This addresses the separate
sceNetAcceptpath explicitly left outside #3938. The libkernelacceptchange in #3958 does not change this implementation. No title run or compatibility-percentage increase is claimed.Windows readiness follow-up
The test now registers the listener with
sceNetEpolland waits for readable readiness with a one-second timeout before each accept. A completed blocking connect does not itself guarantee that a subsequent nonblocking accept already sees the connection on Windows loopback, as xXPBSXx measured on main. The wait is test synchronization; it introduces no production retry, sleep or fallback. The empty-acceptEAGAIN, inherited mode, independent mode changes and data checks remain.The branch is rebased after #4391, retaining its socket descriptor model. The unverified PS5 hardware behavior is now recorded under Unknown function infos in the debt file.
Tested
Exact source:
b2243e14a60af0df15988b3f8dc394ff022bf930, based on mainbb9a4d8a244cb4cbe3a8c9f69a21074b696e7684.libs,relinkerand targeted test executables build. LocalANYPS5_ENABLE_SPIRV_TOOLS=OFF.guest_sce_netpasses 100 consecutive runs, including IPv4 and IPv6. The exact updated head after fix(libkernel_sys): reach rename through a _nid_no_patch export #5025 passes all eight focused tests (guest_sce_net,guest_tcp,guest_udp, fourguest_datagram_*cases andpatched_libraries) five times each. The initial local 100-run stability check was on preceding head62df1d73fwith identical readiness/network code; the new public Windows job repeats and passes all 100 on final headb2243e14a.libSceNet/Export.cppstill fails atsceNetAccept did not inherit listener nonblocking mode; restoring this PR passes. The readiness wait therefore does not hide the original regression.patched_librariesfailure was the unrelatedlibkernel_sys/renameimport regression. fix(libkernel_sys): reach rename through a _nid_no_patch export #5025 is now merged into this baseline; the full build and all eight local tests pass without an overlay or exclusion.Overlap
#4391 is merged and included in the baseline. A pairwise merge with the current #5004 head is clean after placing the hardware uncertainty in the proper debt section; its libc signature cleanup does not implement socket-mode inheritance. #4613 changes address-length reporting, and #3958 handles libkernel
accept, not this implementation.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)