libkernel: poll throws for POLLPRI on guest sockets under WSAPoll (PSXS5, SwanStation, ProsperoTV after #3649); fix branch ready, PSXS5 renders #4478
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 screamm on 2026-10-12T13:04:12Z.
With #3649 (poll on file descriptors) applied, three catalog titles stop on the next Windows limit in
poll:what(): poll: POLLPRI is not supported by WSAPoll, thrown when a title polls a guest socket withPOLLPRI|POLLOUT(a non-blockingconnectcompletion check): PSXS5 (PPSA97510, socket0x10000002, thread gamedb, at 13 s), SwanStation (PPSA98510, sockets0x10000003/0x10000002, threads gamedb and update), ProsperoTV (PPSA99003,{0x10000001, POLLPRI|POLLOUT}at 5.3 s). Verbatim lines and gdb traces are in my #3649 validation comment.Fix branch ready:
screamm:fix/libkernel-poll-pollpri-sockets:1a20b493on top of #3649's two commits onmain58ee7af7(depends on #3649; the fix commit alone is what needs carrying once #3649 lands). I cannot open it as a PR under the intake rule while #4081 is open; anyone eligible is welcome to carry it, keeping the commit as is.sopoll_generic(sys/kern/uipc_socket.c,8c639945) treatsPOLLPRIandPOLLRDBANDalike: both mean out-of-band data is pending. On WindowsPOLLPRIis now passed to WSAPoll asPOLLRDBAND(WSAPoll rejectsPOLLPRIwithWSAEINVAL; measured on this host: it reportsPOLLRDBANDonce a peer sendsMSG_OOB, wakes a waiting poll, and clears it when the byte is read withMSG_OOB, consistent withSIOCATMARK), andPOLLINis mapped toPOLLRDNORMbecause Winsock'sPOLLINincludesPOLLRDBANDand would otherwise report urgent data as readable, which FreeBSD does not. Linux is unchanged.select's exceptfds path already asks forPOLLRDBANDthrough the libSceNet poller. Guestsend/recvrefuseMSG_OOBwithEOPNOTSUPP, so urgent data can only come from an outside peer; the one remaining difference (Winsock keeps reporting urgent data until the byte is read withMSG_OOB, FreeBSD stops once the stream is read past the mark) replaces the old "POLLPRI throws" clause in TechnicalDebt.guest_pollgains: a non-blockingconnectpolled withPOLLPRI|POLLOUTreports exactlyPOLLOUT; a connected pair the same;MSG_OOBon guest sockets gives errno 45; after a host socket sendsMSG_OOB, pollingPOLLPRIreports it andPOLLIN|POLLPRI|POLLOUTgivesPOLLPRI|POLLOUTwithoutPOLLIN(Windows-only assertion, plusPOLLRDBAND). Note for reviewers: non-blockingconnecton Windows returns errno 35 where FreeBSD givesEINPROGRESS36 (pre-existing, the test accepts either).Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs:guest_poll,guest_socket_pair,guest_udp,guest_sce_net3/3;ctest -j8 -E "^agc_driver_|^video_out_flip"620/620; conventions andgit diff --checkpass. Titles relinked against this build (run 4 runtime, 60 s): PSXS5 runs the whole minute rendering (PSXS5 | FPS: 38.79 (1496)in the window title), SwanStation runs the whole minute with no stop (it exited 0xC0000409 before), ProsperoTV moves on towhat(): fcntl: record locks are not implemented on Windows, command=12, fd=3(#3840's recorded limit, fix in progress). Not run on Linux.Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-12T13:31:52Z.
Combined run on Windows (
main33ae282e+ #3649's two commits + the POLLPRI fix from #4478 + the record-lock fix from #4479, all cherry-picking cleanly; run 4 runtime with that build's libs and relinker, 60 s each): ProsperoRadio (PPSA99001) and ProsperoTV (PPSA99003) get pastpolland the record locks and now stop on the graphics side,[videoout] presentation failed: AGC graphics: last provoking vertex with explicit per-vertex flat interpolation is unsupported(open #4030); PSXS5 (PPSA97510) runs the whole minute atPSXS5 | FPS: 59.93 (2867); SwanStation (PPSA98510) runs the whole minute (SwanStationPS5 ready, pad detected, its gamedb download fails with curl 7). No library stop is left in these four that lacks a PR. One observation for later: every HTTPS request from inside the guest fails immediately in these titles (Failed to connect to all.api.radio-browser.info port 443 after 75 ms,curl 7) while the same URLs answer from the host shell; it produces no stop line, and PSXS5 logged it before these fixes too.Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-13T13:23:40Z.
This looks fixed: #4525 (POLLPRI on Windows sockets) merged on 2026-10-13. It names this issue only as its evidence, not with a closing keyword, so this stayed open. I verified the three titles on #4525 before the merge: PSXS5, SwanStation and ProsperoTV get past the
pollstop. Could a maintainer close it?Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-13T14:09:08Z.
PSXS5 (PPSA97510) reaches Menus on
main: Windows 11 (26300), Radeon 860M, WinLibs GCC 15.2.0, Release,main6cd052848with no patches, catalog release relinked with--windows --trap-sdk-syscall-stubs, 60 s withAPS5_PAD_INPUT_FILEpulses from 30 s, frames dumped withAPS5_DUMP_FRAMES. It draws its library screen ("Your shelf is empty", "All games 0") at 60 FPS, and it responds to the controller: the R1/Options pulses bring up the "Sorted by Recently played" toast.Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-13T14:09:09Z.
SwanStationPS5 (PPSA98510) reaches Menus on
main: Windows 11 (26300), Radeon 860M, WinLibs GCC 15.2.0, Release,main6cd052848with no patches, catalog release relinked with--windows --trap-sdk-syscall-stubs, 60 s withAPS5_PAD_INPUT_FILEpulses from 30 s, frames dumped withAPS5_DUMP_FRAMES. It draws its library screen ("Your shelf is empty", "All games 0") at about 35 FPS, and it responds to the controller: the R1/Options pulses bring up the "Sorted by Recently played" toast.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T00:08:45Z.
Closing: #4525 is on main, and PSXS5, SwanStation and ProsperoTV get past the
pollstop. Comment here if a title still hitsPOLLPRI is not supported by WSAPollon current main.