From: Olivier Houchard Date: Mon, 2 Nov 2026 15:57:00 +0000 (+0100) Subject: BUG/MEDIUM: haload: restore request accounting after user timeouts X-Git-Tag: v3.5-dev11~44 X-Git-Url: https://git.kaiwu.me/$%7BISSUES%7D/static/gitweb.js?a=commitdiff_plain;h=bc5d61dce5e8b917e94d730280e4a094c2b9e8ba;p=haproxy.git BUG/MEDIUM: haload: restore request accounting after user timeouts The user path drops expired streams without releasing their active-stream count or their tot_rconns slot, unlike the stream-error path. Once -r is reached with fewer completions, running_tasks never falls back to zero and haload hangs until it is killed. Release both there, matching the error path; the timeout is still counted as an error. This was introduced with haload in 3.5-dev, no backport needed. --- diff --git a/src/haload.c b/src/haload.c index 487574f2e..d80473765 100644 --- a/src/haload.c +++ b/src/haload.c @@ -2010,6 +2010,12 @@ static struct task *hld_usr_task(struct task *t, void *context, unsigned int sta * count it as a failure, not a success */ thrs_info[tid].tot_perr++; + BUG_ON(!thrs_info[tid].cur_req); + thrs_info[tid].cur_req--; + if (arg_rcon > 0) { + BUG_ON(!hs->url->tot_rconn_sent); + hs->url->tot_rconn_sent--; + } hs->url->mreqs++; usr->nreqs = usr->nreqs == -1 ? -1 : usr->nreqs + 1; LIST_DELETE(&hs->list);