From: Amaury Denoyelle Date: Mon, 2 Nov 2026 13:34:42 +0000 (+0100) Subject: BUG/MEDIUM: proxy: fix stick table expired entries cleanup on stopping X-Git-Tag: v3.5-dev11~81 X-Git-Url: https://git.kaiwu.me/$%7BISSUES%7D/static/gitweb.js?a=commitdiff_plain;h=5d870741a8c59b83ca033d787d3198dd286fbe65;p=haproxy.git BUG/MEDIUM: proxy: fix stick table expired entries cleanup on stopping Since the following patch, proxy internal management task is only created for frontends or if a stick-table is present. This notably serves to purge expired entries from tables on soft-stop. a4a17eb36698c927de1c3171236fcc5a6997721a OPTIM/MINOR: proxy: do not init proxy management task if unused However, the condition was incorrectly written, as it is never true for the stick-table case. This is because table's member is always zero at parse time as the stick-table is still empty. Thus, the task is not allocated for backends even if stick-table is declared. This results in worker processes potentially leaving expired entries in stick-tables. The error originates from reusing the condition from manage_proxy(), which performs the stick-table cleanup. In this context it makes sense to check value. Fix the condition to ensure the task is allocated when a stick-table is declared. Checking the proxy's member is sufficient for that. This fixes github issue #3554. This must be backported up to 3.4. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 3459d55c2..e6667cbd7 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2630,7 +2630,7 @@ init_proxies_list_stage2: /* Create the task associated with the proxy. Only necessary * for frontend or if a stick-table is defined. */ - if ((curproxy->cap & PR_CAP_FE) || (curproxy->table && curproxy->table->current)) { + if ((curproxy->cap & PR_CAP_FE) || curproxy->table) { curproxy->task = task_new_anywhere(); if (curproxy->task) { curproxy->task->context = curproxy;