REGTESTS: disable inter-thread idle connection sharing on sensitive tests

Some regtests involve multiple requests from multiple clients, which can
be dispatched as multiple requests to a server. It turns out that the
idle connection sharing works so well that very quickly few connections
are used, and regularly some of the remaining idle server connections
time out at the moment they were going to be reused, causing those random
"HTTP header incomplete" traces in the logs that make them fail often. In
the end this is only an artefact of the test environment.

And indeed, some tests like normalize-uri which perform a lot of reuse
fail very often, about 20-30% of the times in the CI, and 100% of the
time in local when running 1000 tests in a row. Others like ubase64,
sample_fetches or vary_* fail less often but still a lot in tests.

This patch addresses this by adding "tune.idle-pool.shared off" to all
tests which have at least twice as many requests as clients. It proves
very effective as no single error happens on normalize-uri anymore after
10000 tests. Also 100 full runs of all tests yield no error anymore.

One test is tricky, http_abortonclose, it used to fail ~10 times per
1000 runs and with this workaround still fails once every 1000 runs.
But the test is complex and there's a warning in it mentioning a
possible issue when run in parallel due to a port reuse.
This commit is contained in:
Willy Tarreau 2021-05-09 14:41:41 +02:00
parent 6b86d9e485
commit e1465c1e46
22 changed files with 128 additions and 0 deletions

View File

@ -78,6 +78,12 @@ server s2 {
} -start
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
${no-htx} option http-use-htx

View File

@ -40,6 +40,12 @@ server s3 {
} -start
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
${no-htx} option http-use-htx

View File

@ -40,6 +40,12 @@ server s1 {
} -start
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
${no-htx} option http-use-htx

View File

@ -25,6 +25,12 @@ server s1 {
} -start
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
${no-htx} option http-use-htx

View File

@ -44,6 +44,12 @@ server s3 {
} -start
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
${no-htx} option http-use-htx

View File

@ -127,6 +127,12 @@ server s2 {
} -start
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
${no-htx} option http-use-htx

View File

@ -92,6 +92,12 @@ server s1 {
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
${no-htx} option http-use-htx

View File

@ -106,6 +106,12 @@ server s1 {
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
${no-htx} option http-use-htx

View File

@ -61,6 +61,12 @@ server s1 {
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
${no-htx} option http-use-htx

View File

@ -9,6 +9,12 @@ server s1 {
} -repeat 8 -start
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
timeout connect 1s

View File

@ -16,6 +16,12 @@ server s2 {
} -repeat 7 -start
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
timeout connect 1s

View File

@ -115,6 +115,12 @@ server s1 {
} -repeat 3 -start
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
${no-htx} option http-use-htx

View File

@ -34,6 +34,12 @@ server s1 {
} -repeat 2 -start
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
#log stdout format raw daemon
mode http

View File

@ -46,6 +46,12 @@ syslog S -level info {
} -start
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
${no-htx} option http-use-htx

View File

@ -30,6 +30,12 @@ server s1 {
} -repeat 2 -start
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
${no-htx} option http-use-htx

View File

@ -7,6 +7,12 @@ varnishtest "Test IPv4/IPv6 except param for the forwardfor and originalto optio
feature ignore_unknown_macro
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
timeout connect 1s

View File

@ -6,6 +6,12 @@ varnishtest "Test the HTTP return action"
feature ignore_unknown_macro
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
timeout connect 1s

View File

@ -12,6 +12,10 @@ server s1 {
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
expose-experimental-directives
defaults

View File

@ -5,6 +5,12 @@ varnishtest "Lua: set_var"
feature ignore_unknown_macro
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
global
lua-load ${testdir}/set_var.lua

View File

@ -7,6 +7,11 @@ feature ignore_unknown_macro
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
lua-load-per-thread ${testdir}/txn_get_priv.lua
lua-load-per-thread ${testdir}/txn_get_priv-print_r.lua

View File

@ -5,6 +5,12 @@ varnishtest "ub64dec sample fetche Test"
feature ignore_unknown_macro
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
defaults
mode http
timeout connect 1s

View File

@ -8,6 +8,11 @@ server s1 {
haproxy h1 -conf {
global
# WT: limit false-positives causing "HTTP header incomplete" due to
# idle server connections being randomly used and randomly expiring
# under us.
tune.idle-pool.shared off
stats socket /tmp/haproxy.socket level admin
defaults