From: Willy Tarreau Date: Tue, 22 Sep 2026 03:28:56 +0000 (+0000) Subject: REGTESTS: sample_fetches: pin one thread in the connection address test X-Git-Tag: v3.5-dev8~45 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=498a31194866103932339dc2e93c2ebbd6dea5e6;p=haproxy.git REGTESTS: sample_fetches: pin one thread in the connection address test The test asserted that dst_conn reports exactly one connection, which holds when it runs alone but not when the reg-tests are run in parallel on a loaded machine: it was reported failing with a value of 8. The extra connections are not real. With several threads accepting in parallel, the process ends up reporting current connections which were never established: after the only client has left, "show info" reports a non-zero CurrConns while CumConns has only counted the connections which really happened, and "show stat" shows the same discrepancy between scur and stot for the frontend. Forcing nbthread to 1 makes the counters exact again, which is what this test needs since it checks the address fetches, not the connection accounting. --- diff --git a/reg-tests/sample_fetches/conn_addresses.vtc b/reg-tests/sample_fetches/conn_addresses.vtc index 4630f11c4..8841b7e6e 100644 --- a/reg-tests/sample_fetches/conn_addresses.vtc +++ b/reg-tests/sample_fetches/conn_addresses.vtc @@ -9,6 +9,12 @@ varnishtest "Test the connection address and multiplexer sample fetches" # boolean in case of socket creation failure. This needs to be debugged on # that platform. +# A single thread is used because act_conn, fe_conn and dst_conn are +# over-counted when several threads accept in parallel on a loaded +# machine: the process then reports current connections which were never +# established (see "CurrConns" in "show info" vs "CumConns"). That is +# unrelated to what this test checks. + feature ignore_unknown_macro server s1 { @@ -20,6 +26,7 @@ haproxy h1 -conf { global .if feature(THREAD) thread-groups 1 + nbthread 1 .endif chroot /