]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: fix random failures with wrong_ip_port_logging.vtc under load
authorWilly Tarreau <w@1wt.eu>
Mon, 9 Sep 2024 17:31:14 +0000 (19:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Sep 2024 17:38:28 +0000 (19:38 +0200)
This test has an expect rule for syslog that looks for [cC]D, to
indicate a client abort or timeout during the data phase. The purpose
was to say that when it fails it must be this, but the very low timeout
(1ms) still makes it prone to succeeding if the machine is highly loaded.

This has become more visible since commit e8b1ad4c2b ("BUG/MEDIUM: clock:
also update the date offset on time jumps") because the clock drift
adjustments are more systematic. Since this commit, running 50 such tests
at twice more than the number of CPUs in parallel is sufficient to yield
errors due to some lines appearing as succeeding:

   make reg-tests -- --j $((($(nproc)+1)*2)) --vtestparams -n50 reg-tests/log/wrong_ip_port_logging.vtc

It was observed that pauses up to 300ms were observed in epoll_wait() in
such circumstances, which were properly fixed by the time drift detection..
Another approach would consist in increasing the permitted margin during
which we don't fix the clock drift but that would not be logical since the
base time had really been awaited for.

This should be backported to all stable releases since the commit above
will trigger the issue more often.

reg-tests/log/wrong_ip_port_logging.vtc

index af8ca8486828abd47b62988f683814a35a3ece4d..0109fbc8d684266f6c3059f3087ab5bc06748a89 100644 (file)
@@ -30,7 +30,7 @@ server s1 {
 
 syslog Slg_1 -level notice {
     recv info
-    expect ~ \"dip\":\"${h1_fe_1_addr}\",\"dport\":\"${h1_fe_1_port}.*\"ts\":\"[cC]D\",\"
+    expect ~ \"dip\":\"${h1_fe_1_addr}\",\"dport\":\"${h1_fe_1_port}.*\"ts\":\"[cC-][D-]\",\"
 } -start
 
 haproxy h1 -conf {