]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: http_ana: handle yield for "stats http-request" evaluation
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 25 Aug 2025 08:13:31 +0000 (10:13 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Mon, 25 Aug 2025 08:59:16 +0000 (10:59 +0200)
commit3da1d63749d23d68119f55e9fb54806ca1bdf388
tree476b439bb8508d2e8a7d2bd5cef9e83f154cc995
parentf9b227ebff7c575f3a9cd1b8060b42894f8e2165
BUG/MEDIUM: http_ana: handle yield for "stats http-request" evaluation

stats http-request rules evaluation is handled separately in
http_process_req_common(). Because of that, if a rule requires yielding,
the evaluation is interrupted as (F)YIELD verdict return values are not
handled there.

Since 3.2 with the introduction of costly ruleset interruption in
0846638 ("MEDIUM: stream: interrupt costly rulesets after too many
evaluations"), the issue started being more visible because stats
http-request rules would be interrupted when the evaluation counters
reached tune.max-rules-at-once, but the evaluation would never be
resumed, and the request would continue to be handled as if the
evaluation was complete. Note however that the issue already existed
in the past for actions that could return ACT_RET_YIELD such as
"pause" for instance.

This issue was reported by GH user @Wahnes in #3087, thanks to him for
providing useful repro and details.

To fix the issue, we merge rule vedict handling in
http_process_req_common() so that "stats http-request" evaluation benefits
from all return values already supported for the current ruleset.

It should be backported in 3.2 with 0846638 ("MEDIUM: stream: interrupt
costly rulesets after too many evaluations"), and probably even further
(all stable versions) if the patch adaptation is not to complex (before
HTTP_RULE_RES_FYIELD was introduced) because it is still relevant.
src/http_ana.c