test(libSceNet): allow more timed sends before the blocking-send test expects EAGAIN #8918
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8918"
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 xXPBSXx on 2026-10-21T06:10:05Z.
What
Allow up to 64 timed sends (was 16) in
NetBlockingSendbefore the test expects EAGAIN. The loop still stops at the first EAGAIN and the byte-count checks are unchanged, so it asserts what it did before. On a Linux host whose loopback receive buffer autotunes up to 32 MiB (net.ipv4.tcp_rmemmax 33554432), 16 sends of at most 4 MiB do not fill it andnet_dontwait_blocking_send,_sendtoand_sendmsgfail with "peer never exhausted the send buffers".Fixes #8917
Tested
mainfa9eb5cfacand pass with the change (4 of 4 of-R net_dontwait_blocking, about 5.3 s each). In that full ctest run 3 of 1771 tests failed, all three these.python tools/check_conventions.py --base upstream/mainpasses;git merge-treeagainstmainis clean.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)AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T06:15:37Z.
I opened #8922 before I saw this PR, so both changes target #8917. Your exact-head Linux and Windows runs are useful. One alternative worth considering: set the receiver to a small
SO_RCVBUFin this unread-peer timeout block on Linux, leaving the Windows setup unchanged. I reproduced the first partial send followed by a timeout within two retries with a 4 KiB receiver buffer. That makes the retry count independent of a host'stcp_rmemmaximum and avoids spending several seconds probing a large receive window. #8922 has that focused change; please use whichever approach you think fits the test best.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T06:16:02Z.
Clarification: #8918 was already open when I created #8922; I failed to notice it in my duplicate check. Sorry for the overlap. #8922 is an alternative test setup, not an additional behavior fix. Your PR has stronger end-to-end evidence (including the three Linux and Windows tests); mine has only a Linux socket smoke reproduction and conventions checks, but constrains the receiver buffer instead of raising the retry bound. Please feel free to use whichever approach the maintainers prefer.
Imported from boykopovar/AnyPS5. Originally posted by veosett on 2026-10-21T08:55:58Z.
Independent Windows/Linux comparison of the two alternatives for #8917: #8918 at
aa56b002285182763ac422483bd384d309568ee5and #8922 atde573c6d1ef287fe20a5e90f728712fef8e3bb0c.Each unchanged patch was applied separately to the same current
main,f894ba69d30055259a56907563f438379d1275a3. The local integration commits were704bf4ae1ea7b1981df172820b5ec30f6526e8ecfor #8918 and3e1fbde9a8ec0767ce474d0eb28efaf58bb27fbafor #8922. Each diff contains only its originalNetBlockingSend.cppchange. These are integration results on the newer main, rather than builds of the PRs' older bases.Release builds succeeded on Ubuntu 24.04 WSL (GCC 13.3) and Windows 11 Pro 10.0.26100 (supported WinLibs GCC 15.2.0 r7).
peer never exhausted the send buffersEvery candidate run delivered and compared all 4,194,304 payload bytes and passed the existing timeout, abort and guest-nonblocking assertions. There were no skips or CTest timeouts. The longest affected candidate invocation across both hosts and patches was 5.10 s, within the unchanged 20 s timeout.
The eight neighboring
net_dontwait_{send,sendto,sendmsg,recv,recvfrom,recvmsg,duplex,blocking}tests andguest_sce_netalso passed once each on both hosts, on main and the #8922 integration. Those nine neighbors were not rerun for #8918.Linux already had the reported limits:
net.ipv4.tcp_rmem = 4096 131072 33554432,net.ipv4.tcp_wmem = 4096 16384 4194304, and bothnet.core.rmem_maxandnet.core.wmem_maxwere 4194304. These settings were read without changing them.Main used the same commands without the repeat option. Both alternatives fix the reproduced Linux failure in this environment; only one needs to land. I favor #8922 for this fixture because it explicitly bounds the unread receiver queue in the timeout case, keeping the existing retry budget.
No full suite, macOS, title or console run, and no claim of a production networking change. AI-assisted verification; I ran the builds and tests locally.
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T09:28:30Z.
Thanks @veosett for the side-by-side run and @MarcZX10 for the alternative.
My own Linux run (Ubuntu 24.04 on WSL2, GCC 13.3, Release,
net.ipv4.tcp_rmemmax 33554432; a virtualised kernel, not bare-metal) agrees with the table:mainfailsnet_dontwait_blocking_send,_sendtoand_sendmsg; #8918 passes them (about 5.3 s per test in my run) and #8922 atde573c6d1epasses all three three times each (9 of 9, about 3 s per test; the two numbers come from separate runs). Windows for both is covered by veosett's table, so I did not run it again.The two differ in construction: #8918 raises the retry bound from 16 to 64, which relies on the receive-buffer ceiling of the host; #8922 caps the receiver at a small
SO_RCVBUFon Linux, so the number of retries does not depend ontcp_rmemby construction (I only ran it with the 33554432 maximum).Only one of them needs to land. I am happy to close #8918 in favour of #8922 if the maintainers prefer it, and I will leave it open until you or @MarcZX10 say so.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T19:24:10Z.
Checked the one-line change (16 → 64 timed sends; 64 × 4 MiB exceeds the 32 MiB autotuned receive maximum), the unchanged byte-count checks, and the Linux/Windows runs reported by @veosett and the author; merged. #8922 overlaps on the same issue and can be closed or rebased as the author sees fit.