Skip to content

feat(libkernel): answer TCP_NODELAY, SO_NOSIGPIPE and SO_NBIO on a guest socket - #5565

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
Dripl1x:feat/socket-options-nodelay-nosigpipe-nbio
Oct 15, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
Dripl1x:feat/socket-options-nodelay-nosigpipe-nbio

Conversation

@Dripl1x

@Dripl1x Dripl1x commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What

setsockopt and getsockopt on a socket from socket() answer the SOL_SOCKET options #4796 added and fail every other option and level with ENOPROTOOPT. This PR answers three more, the ones the discussion of #4796 left as a separate change. They are added to #4796's structure: the handling is in Socket/src/SocketOptions.cpp, and the per-socket state is in SocketOptionState under modeMutex.

  • TCP_NODELAY (IPPROTO_TCP, 1) is set on the host socket and reads back as TF_NODELAY (4), as FreeBSD 11.4's tcp_default_ctloutput returns it. The IPPROTO_TCP level on a datagram or AF_UNIX socket fails with EINVAL, as ip_ctloutput and uipc_ctloutput answer it. Every other TCP option still fails with ENOPROTOOPT. setsockopt and getsockopt pass level 6 to the new SetTcpLevelOption and GetTcpLevelOption, and SOL_SOCKET to the existing functions.
  • SO_NOSIGPIPE (0x800) is kept in SocketOptionState::noSignal and reads back as its own bit (sogetopt). It takes effect: on Linux a send, sendto, sendmsg or write on that socket passes MSG_NOSIGNAL to the host, so a broken connection gives EPIPE without the host's SIGPIPE ending the title, as kern_sendit and soo_write decide it. send and sendto read the flag under modeMutex; sendmsg and write go through them. An accepted socket takes the option from its listener, as sonewconn copies the options. Windows raises no signal either way.
  • SO_NBIO (0x1200), the console's own non-blocking option, switches the host socket with FIONBIO and reads back as 0 or 1, as sceNetSetsockopt and sceNetGetsockopt treat it here. The non-blocking flag moves from Socket into SocketOptionState, so this option, fcntl, ioctl(FIONBIO) and accept use the same state.
  • The three options follow the checks of the options already in SocketOptions.cpp. A value shorter than an int fails with EINVAL (sooptcopyin), and so does a null value. getsockopt copies as many bytes as the buffer holds. FreeBSD's kern_setsockopt returns EFAULT for a null value instead; that applies to every option here and is recorded in the debt entry rather than changed.
  • guest_socket_options expected SO_NOSIGPIPE to fail. It now checks that the option reads back as its bit. The debt entry for SocketOptions.cpp and the sentence on SIGPIPE in the socket read/write entry are updated.

Titles that ask for them:

  • ProsperoStore (PPSA99000) sets SO_NBIO on every curl socket and fails the request when the call fails; VITA5 (PPSA39410) returns the error of the same call. On main the call fails with ENOPROTOOPT. This is read from their sources; neither title was run.
  • screamm's trace of ProsperoRadio (PPSA99001) in #4796 shows TCP_NODELAY, SO_NOSIGPIPE and option 0x1200 failing with ENOPROTOOPT on main; curl carries on without them.
  • A static survey of the 63 executables of ps5-homebrew-catalog (not run): TCP_NODELAY is set by 29 titles, SO_NOSIGPIPE by 28, SO_NBIO by 18 and read by 12. The level and option were recovered at 840 of 2661 setsockopt call sites, so these are lower bounds. The lists and the method are in this comment.

Related:

Tested

Windows 11, Ryzen 7 5800H, WinLibs MinGW-w64 GCC 15.2.0 r7; Ubuntu 26.04 under WSL, GCC 15.2.0. Release, BUILD_TESTING=ON, root configuration with FFMPEG_PREBUILT_DIR pointed at an already unpacked package. Head 7e79f36ed on main 4c1de0c0c.

  • The new test guest_socket_stream_options covers the three options on a loopback TCP pair, a datagram socket and an AF_UNIX pair. It checks values and read-back, short and truncated arguments, and the EINVAL of the TCP level on the other socket kinds. It also checks EAGAIN from a receive after SO_NBIO and F_GETFL following it, inheritance by an accepted socket, and EPIPE from send and write after shutdown(SHUT_WR). On Linux it counts host SIGPIPE deliveries: none while SO_NOSIGPIPE is set or MSG_NOSIGNAL is passed, and one after the option is cleared.
  • Negative control: with SocketOptions.hpp, SocketOptions.cpp and Udp.cpp from main and the tests of this PR, guest_socket_stream_options fails on both systems with socket stream option check failed at line 91, errno 42. guest_socket_options fails with setsockopt of an integer option failed (errno 42).
  • Windows: guest_socket_stream_options and guest_socket_options pass 20 of 20 repeated runs. Of the twelve socket tests eleven pass. guest_udp times out after 20 s, and does so on main too: on this machine a datagram to [::1] is never delivered, even between two plain host sockets outside AnyPS5.
  • Linux: the twelve socket tests pass in 0.86 s, guest_udp included.
  • The conventions checker, including the title and description, and git diff --check pass.

Not tested: any title, a console, macOS, the full test suite. Full PR builds need a collaborator's manual Build run.

Checklist

  • Based on current main; no other open PR implements these three options
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stubs added
  • No notes, investigation .md files or images added to the repository
  • No new third-party code or dependencies
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none; no title was run with this change
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

@Dripl1x

Dripl1x commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Evidence for head 36ff565fe on main d1670009f. Local paths are replaced with <build> and <source>.

Which catalog titles ask for the three options

Call Titles Call sites Titles
setsockopt(IPPROTO_TCP, TCP_NODELAY) 29 105 PPSA17641 SymphonyStation5, PPSA39410 VITA5, PPSA69421 SuperTuxKart, PPSA74126 Stremio Plus, PPSA85300 VLC, PPSA97358 XPSemu, PPSA97510 PSXS5, PPSA98510 SwanStationPS5, PPSA99000 ProsperoStore, PPSA99001 ProsperoRadio, PPSA99003 ProsperoTV, PPSA99004 ProsperoAI, PPSA99008 ProsperoEden, PPSA99039 EVO Player, PPSA99141 Mortalfin, PPSA99169 RetroArch, PPSA99177 PS5VR, PPSA99203 PS5SX2, PPSA99288 Nuvio Max'd, PPSA99360 PS5CEMU-HAR, PPSA99420 PS5MC, PPSA99505 Jelly5, PPSA99515 Emby5, PPSA99520 Régie5, PPSA99773 PShare, PPSA99808 PICO-8 for PS5, PPSA99810 PSBox Cloud Gaming, PPSA99930 Forwarder Manager, PPSA99997 Nuvio PS5
getsockopt(IPPROTO_TCP, TCP_NODELAY) 1 1 PPSA99420 PS5MC
setsockopt(SOL_SOCKET, SO_NOSIGPIPE) 28 49 PPSA17641 SymphonyStation5, PPSA69421 SuperTuxKart, PPSA74126 Stremio Plus, PPSA85300 VLC, PPSA97358 XPSemu, PPSA97510 PSXS5, PPSA98001 PokeMMO Prospero, PPSA98510 SwanStationPS5, PPSA99000 ProsperoStore, PPSA99001 ProsperoRadio, PPSA99003 ProsperoTV, PPSA99004 ProsperoAI, PPSA99008 ProsperoEden, PPSA99039 EVO Player, PPSA99141 Mortalfin, PPSA99169 RetroArch, PPSA99177 PS5VR, PPSA99203 PS5SX2, PPSA99288 Nuvio Max'd, PPSA99360 PS5CEMU-HAR, PPSA99420 PS5MC, PPSA99505 Jelly5, PPSA99515 Emby5, PPSA99520 Régie5, PPSA99773 PShare, PPSA99808 PICO-8 for PS5, PPSA99930 Forwarder Manager, PPSA99997 Nuvio PS5
getsockopt(SOL_SOCKET, SO_NOSIGPIPE) 1 1 PPSA85300 VLC
setsockopt(SOL_SOCKET, 0x1200) 18 43 PPSA17641 SymphonyStation5, PPSA39410 VITA5, PPSA74126 Stremio Plus, PPSA97510 PSXS5, PPSA98001 PokeMMO Prospero, PPSA98510 SwanStationPS5, PPSA99000 ProsperoStore, PPSA99001 ProsperoRadio, PPSA99003 ProsperoTV, PPSA99004 ProsperoAI, PPSA99008 ProsperoEden, PPSA99009 ProsperoLichess, PPSA99288 Nuvio Max'd, PPSA99303 Quake3e, PPSA99764 Porpoise, PPSA99773 PShare, PPSA99810 PSBox Cloud Gaming, PPSA99930 Forwarder Manager
getsockopt(SOL_SOCKET, 0x1200) 12 12 PPSA17641 SymphonyStation5, PPSA74126 Stremio Plus, PPSA97510 PSXS5, PPSA98510 SwanStationPS5, PPSA99001 ProsperoRadio, PPSA99003 ProsperoTV, PPSA99004 ProsperoAI, PPSA99008 ProsperoEden, PPSA99009 ProsperoLichess, PPSA99288 Nuvio Max'd, PPSA99773 PShare, PPSA99930 Forwarder Manager

Method: the 65 release archives listed in ps5-homebrew-catalog were downloaded (SHA-256 equal to the catalog records); 63 of them hold an eboot.bin, which was unwrapped from its fake-signed container. Nothing was run. Each call site of setsockopt and getsockopt was found through the import's GOT slot, and the level and option were read from the instructions before it (objdump). That recovers a value only where the compiler loads a constant right before the call: both were recovered at 840 of 2661 setsockopt call sites, so the counts are lower bounds.

Tests

Windows: guest_socket_stream_options, 20 repeated runs
Test project <build>
    Test #955: guest_socket_stream_options ......   Passed    0.06 sec
    Test #955: guest_socket_stream_options ......   Passed    0.02 sec
    Test #955: guest_socket_stream_options ......   Passed    0.02 sec
    Test #955: guest_socket_stream_options ......   Passed    0.03 sec
    Test #955: guest_socket_stream_options ......   Passed    0.02 sec
    Test #955: guest_socket_stream_options ......   Passed    0.02 sec
    Test #955: guest_socket_stream_options ......   Passed    0.03 sec
    Test #955: guest_socket_stream_options ......   Passed    0.03 sec
    Test #955: guest_socket_stream_options ......   Passed    0.02 sec
    Test #955: guest_socket_stream_options ......   Passed    0.03 sec
    Test #955: guest_socket_stream_options ......   Passed    0.02 sec
    Test #955: guest_socket_stream_options ......   Passed    0.02 sec
    Test #955: guest_socket_stream_options ......   Passed    0.03 sec
    Test #955: guest_socket_stream_options ......   Passed    0.03 sec
    Test #955: guest_socket_stream_options ......   Passed    0.03 sec
    Test #955: guest_socket_stream_options ......   Passed    0.03 sec
    Test #955: guest_socket_stream_options ......   Passed    0.03 sec
    Test #955: guest_socket_stream_options ......   Passed    0.03 sec
    Test #955: guest_socket_stream_options ......   Passed    0.03 sec
1/1 Test #955: guest_socket_stream_options ......   Passed    0.02 sec
100% tests passed, 0 tests failed out of 1
Total Test time (real) =   0.97 sec
Windows: the nine socket tests (guest_udp times out on this machine with main's Udp.cpp too, see the control)
Test project <build>
1/9 Test #948: guest_socket_error ...............   Passed    0.02 sec
2/9 Test #949: guest_udp ........................***Timeout  20.02 sec
3/9 Test #950: guest_socket_read_write ..........   Passed    0.06 sec
4/9 Test #951: guest_poll .......................   Passed    0.25 sec
5/9 Test #952: guest_tcp ........................   Passed    0.06 sec
6/9 Test #953: guest_socket_pair ................   Passed    0.06 sec
7/9 Test #955: guest_socket_stream_options ......   Passed    0.03 sec
8/9 Test #957: guest_socket_descriptors .........   Passed    0.06 sec
9/9 Test #958: guest_socket_events ..............   Passed    0.22 sec
89% tests passed, 1 tests failed out of 9
Total Test time (real) =  20.85 sec
The following tests FAILED:
	949 - guest_udp (Timeout)
Windows control: Udp.cpp from main, new test
Test project <build>
1/2 Test #947: guest_udp ........................***Timeout  20.02 sec
2/2 Test #953: guest_socket_stream_options ......Exit code 0xc0000409***Exception:   0.24 sec
socket stream option check failed at line 92, errno 42
0% tests passed, 2 tests failed out of 2
Total Test time (real) =  20.35 sec
The following tests FAILED:
	947 - guest_udp (Timeout)
Linux: the ten socket tests
Test project <build>
 1/10 Test #921: guest_socket_error ...............   Passed    0.00 sec
 2/10 Test #922: guest_udp ........................   Passed    0.01 sec
 3/10 Test #923: guest_socket_read_write ..........   Passed    0.05 sec
 4/10 Test #924: guest_poll .......................   Passed    0.18 sec
 5/10 Test #925: guest_select .....................   Passed    0.31 sec
 6/10 Test #926: guest_tcp ........................   Passed    0.01 sec
 7/10 Test #927: guest_socket_pair ................   Passed    0.01 sec
 8/10 Test #929: guest_socket_stream_options ......   Passed    0.01 sec
 9/10 Test #931: guest_socket_descriptors .........   Passed    0.01 sec
10/10 Test #932: guest_socket_events ..............   Passed    0.15 sec
100% tests passed, 0 tests failed out of 10
Total Test time (real) =   0.78 sec
Linux control: Udp.cpp from main, new test
Test project <build>
1/1 Test #927: guest_socket_stream_options ......Subprocess aborted***Exception:   0.01 sec
socket stream option check failed at line 92, errno 42
0% tests passed, 1 tests failed out of 1
Total Test time (real) =   0.03 sec
The following tests FAILED:

The two controls were run on main bfc10637d, before the rebase onto d1670009f; Udp.cpp and the test are the same on both.

AI-assisted (Claude Code).

@Dripl1x

Dripl1x commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

The PR overlap check lists four open pull requests against this one, so the checklist declares the order Depends on: #4796, #4903, #4920, #5403. None is a functional prerequisite; this PR goes after them and is rebased when each lands. Trial git merge-tree results for head 36ff565fe:

If one of you prefers this PR first, say so and I drop that number from the line.

AI-assisted (Claude Code).

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

#4796 is merged, so this needs a rebase and a port before it can land:

  • setsockopt/getsockopt on main now delegate to GuestSockets::SetSocketLevelOption/GetSocketLevelOption in Socket/src/SocketOptions.cpp, with the per-socket state in Socket::options under modeMutex (Udp.cpp setsockopt_nid_postfix). Udp.cpp conflicts on exactly those lines. Please move SO_NOSIGPIPE, SO_NBIO and the IPPROTO_TCP handling into that structure (the SO_NOSIGPIPE flag belongs in SocketOptionState, not a separate atomic read outside the lock) instead of a second dispatcher in front of it.
  • core/libs/tests/GuestSocketOptions.cpp:155 on main expects SO_NOSIGPIPE (0x800) to fail; it has to change with this behaviour, and your new test should keep passing next to it.
  • Keep the accept inheritance and the MSG_NOSIGNAL on send/sendto/write; those parts look right against kern_sendit/sonewconn.
  • Docs: docs/dev/debt/libkernel.md conflicts with main; "Depends on: #4796, #4903, #4920, #5403" no longer matches (#4796 and #4903 merged, #4920 and #5403 closed). Update it to what is actually open.

Once it is rebased on current main with guest_socket_stream_options and guest_socket_options passing, it should be ready for another look.

@Dripl1x
Dripl1x force-pushed the feat/socket-options-nodelay-nosigpipe-nbio branch from 36ff565 to 1e47835 Compare October 14, 2026 15:32
@Dripl1x

Dripl1x commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

@adriadam10 ported to main 84b01f9cd as you described. It is one commit, 1e4783573:

Results at 1e4783573:

  • Windows: guest_socket_stream_options and guest_socket_options pass 20 of 20 repeated runs, and 11 of the 12 socket tests pass. guest_udp times out here on main too, because a VPN on this machine drops IPv6 loopback traffic: a datagram to [::1] never arrives, even between two plain host sockets.
  • Linux: all 12 socket tests pass, guest_udp included.
  • Control: with SocketOptions.hpp, SocketOptions.cpp and Udp.cpp from main, both tests fail on both systems. guest_socket_stream_options stops at line 91, errno 42, and guest_socket_options with setsockopt of an integer option failed (errno 42).

#5617 is rebased onto this commit.

AI-assisted (Claude Code).

@Dripl1x
Dripl1x requested a review from adriadam10 October 14, 2026 15:43
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 14, 2026
…est socket

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-checked on the current head, merged onto main:

  • Ported into SocketOptionState under modeMutex; no second dispatcher in Udp.cpp.
  • guest_socket_options updated for SO_NOSIGPIPE; guest_socket_options and guest_socket_stream_options pass, and both fail with the SocketOptions/Udp.cpp changes reverted.
  • accept inheritance and MSG_NOSIGNAL on send/sendto/write kept; debt doc matches what is open.

Merging once the full Build is green.

@github-actions

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
#3891 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4156 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4396 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4397 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4422 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4423 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4424 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4520 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4521 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4522 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4523 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4566 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4599 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4718 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4740 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4749 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4760 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4813 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#4972 core/libs/prx/libkernel/CMakeLists.txt
#5021 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#6044 core/libs/prx/libkernel/CMakeLists.txt
core/libs/tests/GuestSocketOptions.cpp
#6222 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md
#6226 core/libs/prx/libkernel/CMakeLists.txt

@adriadam10
adriadam10 merged commit 1036905 into boykopovar:main Oct 15, 2026
8 of 9 checks passed
@screamm

screamm commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Cross-validation on Windows 11 Pro 26220, NVIDIA RTX 4070 (596.21), MinGW GCC 15.2, PR head 7e79f36ed merged on main b08db6a09:

This ran after the merge (1036905b5), so it is a post-merge confirmation. "Before" is main 8856f180c (before the merge) and, as a clean control, b08db6a09 with only SocketOptions.hpp, SocketOptions.cpp and Udp.cpp from 1036905b5^1. Catalog releases, app0/eboot.bin staged, relinker --windows --registry unused-filter=0, display on, 90 s per run. The host was busy with other builds, so frame counts follow load. To see the calls I wrapped libkernel setsockopt/getsockopt in a local stderr trace (not part of any PR).

ProsperoRadio (PPSA99001)

  • 8856f180c: running at 90 s, ProsperoRadio | FPS: 9.68 (1519), title log [ProsperoRadio][http] non-blocking sockets: NOT set.
  • Reverted control, traced: ProsperoRadio | FPS: 18.99 (1907). 16 curl sockets, each with setsockopt(fd, 0x6, 0x1, 1) = -1 errno 42, setsockopt(fd, 0xffff, 0x800, 1) = -1 errno 42 and setsockopt(fd, 0xffff, 0x1200, 1) = -1 errno 42; non-blocking sockets: NOT set.
  • b08db6a09, run 1: ProsperoRadio | FPS: 59.95 (4932), [ProsperoRadio][http] non-blocking sockets: set.
  • b08db6a09, run 2 (traced): ProsperoRadio | FPS: 35.48 (493). The same 16 sockets, now TCP_NODELAY, SO_NOSIGPIPE and SO_NBIO each = 0, and getsockopt(fd, 0xffff, 0x1007) = 0 value 0; non-blocking sockets: set.
  • Requests still end in curl 77 on /<sandbox>/common/cert/CA_LIST.cer with every build. That is a separate gap.

VITA5 (PPSA39410)

  • 8856f180c: running at 90 s, VITA5 PPSA17035 | FPS: 57.36 (3198).
  • Reverted control, traced (FPS: 49.00 (3670)): 30 IPC sockets, each stopping at setsockopt(fd, 0xffff, 0x1200, 1) = -1 errno 42, because configure_socket returns there.
  • b08db6a09, run 1: FPS: 30.24 (2952).
  • b08db6a09, run 2 (traced, FPS: 45.96 (3669)): 31 sockets with 0x1200, TCP_NODELAY, SO_SNDBUF 65536 and SO_RCVBUF 262144, all = 0.
  • [VD5] dock attached=0 vita=0 in all runs; no Vita is attached here.

ProsperoStore (PPSA99000)

  • 8856f180c: ProsperoStore | FPS: 17.17 (1267). b08db6a09: FPS: 15.74 (1007) and FPS: 11.25 (629).
  • All runs are still running at 90 s. The trace shows no libkernel setsockopt call: on this host it logs [STORE] transport elevated=1 ca_list=0 -> sceHttp and fails through sceHttp (http rc=0x80431063 ... The network request failed), so the native-curl SO_NBIO callback is not reached.

No run had a stop line.

Tests

  • guest_socket_options and guest_socket_stream_options pass 3/3 (--repeat until-fail:3), on b08db6a09 and with feat(libkernel): apply SO_RCVTIMEO and SO_SNDTIMEO on a guest socket #5617 on top.
  • Negative control (the three source files from 1036905b5^1, tests kept): both fail as in the description, with setsockopt of an integer option failed (errno 42) and socket stream option check failed at line 91, errno 42.

Suite. ctest -j8 --timeout 120 -E '^agc_driver_|^video_out_flip' on this tree with #5617 merged: 825 tests, 16 failed under host load. 14 of the 16 pass when rerun serially. prx_thread_local_destructors reports the libSceAgcDriver traceDrawKeyLookup thread_local, which #6349 fixes after b08db6a09. hardware_oracle_compare hits its 20 s limit under load.

Conventions. tools/check_conventions.py with title and description passes. git diff --check is clean.

Review. The FreeBSD links are pinned to 8c639945a (the release/11.4.0 commit), and the cited lines match: TF_NODELAY read back as 4, so_options & SO_NOSIGPIPE, EINVAL from sooptcopyin and from ip_ctloutput/uipc_ctloutput for the TCP level on UDP and AF_UNIX, and ENOPROTOOPT for the other TCP options. The TCP option is mapped through the host's IPPROTO_TCP/TCP_NODELAY rather than passed through. Storing SO_NOSIGPIPE without effect on Windows is exact, since Winsock raises no signal. SO_NBIO shares the non-blocking flag with fcntl, ioctl(FIONBIO) and accept under modeMutex. No concerns.

Written with Claude Code assistance.

milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 16, 2026
…Setsockopt

The call MXGP 26 makes; libkernel answers it since boykopovar#5565.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 17, 2026
…Setsockopt

The call MXGP 26 makes; libkernel answers it since boykopovar#5565.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants