]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: checks: Dequeue checks on purge
authorOlivier Houchard <ohouchard@haproxy.com>
Mon, 8 Jun 2026 13:48:42 +0000 (15:48 +0200)
committerOlivier Houchard <cognet@ci0.org>
Mon, 8 Jun 2026 13:06:09 +0000 (15:06 +0200)
commita4520229a77eae2c33df7a003a07b95f162482e0
tree86e353b174534ce496f0ab8b5a51ec7afc68a0d0
parent3fa818c78f28239eb0c309c684c52c22f9f0bb40
BUG/MEDIUM: checks: Dequeue checks on purge

When tune.max-checks-per-thread is used, checks that should run are
queued, to avoid having too many checks running at the same time.
But if the check is about to be purged, because the server is being
deleted, we have to explicitly remove it from the queue as that memory is
about to be freed, otherwise it will cause a use-after-free.
Also, queued checks have not yet incremented th_ctx->running_checks, so
don't decrement it if we're queued.

This should be backported up to 3.0.
src/check.c