]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: promex: server iteration may rely on stale server
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 13 Jan 2026 20:38:18 +0000 (21:38 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Mon, 19 Jan 2026 13:24:11 +0000 (14:24 +0100)
commitb4f64c0abf03f305f59ab6c932e945fc4cd8bcc5
tree19107cee2d8df1756a30e693d7d7cd8780d047c2
parentd38b918da1c8deece731e2fba36576f0b077ed76
BUG/MEDIUM: promex: server iteration may rely on stale server

When performing a promex dump, even though we hold reference on server
during resumption after a yield (ie: buffer full), the refcount mechanism
only guarantees that the server pointer will be valid upon resumption, not
that its content will be consistent. As such, sv->next may be garbage upon
resumption. Instead, we must rely on the watcher mechanism to iterate over
server list when resumption is involved like we already do for stats and
lua handlers.

It must be backported anywhere 071ae8ce3 (" BUG/MEDIUM: stats/server: use
watcher to track server during stats dump") was (up to 2.8 it seems)
addons/promex/service-prometheus.c