[Bug 299447] sys/kern/ssl_sendfile:eagain_vs_eof test failing intermittently in CI
Date: Thu, 19 Nov 2026 21:55:59 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299447
--- Comment #12 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:
URL:
https://cgit.FreeBSD.org/src/commit/?id=ba045424b33d2a48f127adc8126d79d9eb82954a
commit ba045424b33d2a48f127adc8126d79d9eb82954a
Author: Nick Banks <nickbanks@netflix.com>
AuthorDate: 2026-11-19 21:45:21 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-11-19 21:54:19 +0000
tests/ssl_sendfile: size socket buffers before connecting
The :grow, :truncate and :eagain_vs_eof cases rely on the socket buffers
filling up before the whole file has been sent. :grow and :truncate shrank
SO_SNDBUF and SO_RCVBUF only after the connection was established, when
the receiver had already advertised a window based on the default buffer
size; TCP does not shrink an advertised window. :eagain_vs_eof used the
default, autosized buffers. With a large net.inet.tcp.recvspace, or once
autosizing has grown the buffers, the whole 2 MB file fits in the socket
buffers:
:grow and :truncate: sendfile(2) returns before the file is resized, and
the poll loop that waits for the sender to block spins forever on a
writable socket.
:eagain_vs_eof: the loop that keeps writing until
EAGAIN never sees it, since sendfile(2) returns 0 at EOF.
Either way kyua reports a timeout, which is why doubling the timeouts did
not help. Apply a 128 KB buffer size to the listening socket, which the
accepted socket inherits, and to the client socket before connect(2) in
all three cases.
Under CPU load in a test VM, :eagain_vs_eof timed out in 3 of 11 runs
without this change and passed 40 of 40 runs with it. With 1 MB recvspace
and sendspace, :grow hung on its first run in 3 of 4 boots without it and
passed 20 of 20 runs with it.
Differential Revision: https://reviews.freebsd.org/D61752
Reviewed by: glebius, ngie
PR: 299447
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/sys/kern/ssl_sendfile.c | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.