Repository navigation
fix(libSceNet): sceNetEpollWait takes 2 as the OUT event - #4611
Merged
adriadam10 merged 4 commits intoOct 13, 2026
Merged
Conversation
sceNetEpollWait used Linux's EPOLLOUT bit (4) for writability. The SCE value is 2 (shadPS4 net_types.h ORBIS_NET_EPOLLOUT, KytyPS5 network.cpp EPOLL_OUT, SharpProspero Socket.cs EpollOut); IN (1), ERR (8) and HUP (0x10) already match. A socket registered for OUT was never polled for writability, so the wait ran out its timeout or blocked forever, and an IN|OUT registration never reported OUT.
boykopovar#4673 adds a test after CheckEmptyEpoll and its call after CheckEmptyEpoll(), so placing the new check there made the two pull requests conflict.
10 tasks done
6 tasks done
boykopovar#4785 adds its netstat checks before CheckPoolStats, so defining CheckEpollWritable there made the two pull requests conflict.
10 tasks done
Collaborator
|
Checked |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
sceNetEpollWaitused Linux'sEPOLLOUTbit (4) when it polled and when it reported writability. The SCE value is 2 (shadPS4 net_types.h, KytyPS5 network.cpp, SharpProspero Socket.cs); IN (1), ERR (8) and HUP (0x10) already match. A socket registered for OUT was never polled for writability, so the wait ran out its timeout or blocked forever, and an IN|OUT registration never reported OUT:mainevents0x2, at onceevents0x1 (OUT missing)events0x3Same kind of fix as #4110, which corrected the
sceNetEpollControloperation numbers.Tested
Windows 11 (10.0.26300), WinLibs MinGW-w64 GCC 15.2.0 r7 (UCRT), Release,
-DBUILD_TESTING=ON, onmainat 2a5eca1:main'sExport.cpp, the newCheckEpollWritableinguest_sce_netaborts (exit0xc0000409);guest_sce_netpasses onmainitself, IPv6 checks included, so the abort is the new check. With the change it passes, 20 runs in a row.core/libs/prx/libc/CMakeLists.txtandcore/libs/prx/libkernel/CMakeLists.txtthat build on Windows pass, and so do the network tests (guest_datagram_recv,guest_datagram_recvfrom,guest_datagram_sceNetRecv,guest_datagram_sceNetRecvfrom,guest_udp,guest_resolver,guest_posix_filesystem).Linux (Ubuntu 24.04, GCC 13.3, Release), base 33ae282: the new
CheckEpollWritableinguest_sce_netaborts onmainatsceNetEpollWait(epoll, &ready, 1, 1000000) == 1and passes with the change, 20/20; the libSceNet, libc and libkernel tests are unchanged. Again on WSL2 (Ubuntu 24.04, GCC 13.3.0, Release with CI's configure flags), merged intomainat c952c2b, IPv6 checks included: it aborts withmain'sExport.cppand passes with the change, 20 runs in a row.tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)