]> git.kaiwu.me - haproxy.git/commit
REGTESTS: sample_fetches: make the raw hello test parallel-safe
authorWilly Tarreau <w@1wt.eu>
Tue, 22 Sep 2026 21:47:33 +0000 (21:47 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 15:25:37 +0000 (17:25 +0200)
commit20f4f6aea27d2048ea32ea52b274952662200a79
tree17f77613b23516e9117a75949ff9ce69032703b6
parent212afc516352f15ff30836f5f2587b2a8da356f3
REGTESTS: sample_fetches: make the raw hello test parallel-safe

Running the suite with "--j 4" caught the client of the third
ClientHello getting an empty response. The single server was reading
only the 47 bytes the three hellos have in common, so the rest of each
of them was still unread when it closed its socket, which makes the
system emit a reset instead of a FIN, and that reset discards the
ServerHello which haproxy had not read yet.

Each hello now has its own server, reading exactly the number of bytes
its client sends, and the backend distributes the three connections in
order with round robin. Nothing is left unread, so the close is a plain
FIN again.

That uncovered a second race: the log of a stream is emitted when the
stream ends, which may be after the next client has been served by the
other frontend, and the third message of the first frontend was
sometimes overtaken by the first message of the second one. The two
frontends now log to their own syslog server, so only their own series
has to be ordered, and each client of the first frontend waits for the
close before ending, which finishes its stream.

Thirty-two runs in parallel pass where the previous version failed
about once in twenty.
reg-tests/sample_fetches/ssl_hello_type.vtc