BUG/MEDIUM: check: Requeue healthchecks on I/O events to handle check timeout
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 3 Jun 2025 12:50:38 +0000 (14:50 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 17 Jun 2025 06:04:00 +0000 (08:04 +0200)
commit160574c9c95a86cd2b2995639becd433adf42e87
tree1b21fd87601a3e68df675a28951c604bc2bda3d0
parent2ba8352e613f752d739d66d836d95bf514625c84
BUG/MEDIUM: check: Requeue healthchecks on I/O events to handle check timeout

When a healthchecks is processed, once the first wakeup passed to start the
check, and as long as the expiration timer is not reached, only I/O events
are able to wake it up. It is an issue when there is a check timeout
defined.  Especially if the connect timeout is high and the check timeout is
low. In that case, the healthcheck's task is never requeue to handle any
timeout update. When the connection is established, the check timeout is set
to replace the connect timeout. It is thus possible to report a success
while a timeout should be reported.

So, now, when an I/O event is handled, the healthcheck is requeue, except if
an success or an abort is reported.

Thanks to Thierry Fournier for report and the reproducer.

This patch must be backported to all stable versions.

(cherry picked from commit 7c788f0984623f727a71ae4aee9917ddeac1b59d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 73b733e2e0bf6d6e9914c3b58a632f2b4dcb2d8d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 2341a3c06afd1ec3a92d0df5766daf30360374d6)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/check.c