]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stats: decrement srv refcount on stats-file release
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 10 Dec 2024 14:57:17 +0000 (15:57 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 10 Dec 2024 15:04:11 +0000 (16:04 +0100)
commit2199179461957c86f57e39c4d97c37f3e4d10935
tree646693a04aed2730c2ac6fa8266ade7e752cfd3b
parenta6b3080966402123fb4dca95620aea1b40ebc2c8
BUG/MINOR: stats: decrement srv refcount on stats-file release

Servers instance may be removed at runtime. This can occurs during a
stat dump which currently references this server instance. This case is
protected by server refcount to prevent the server immediate release.

CLI output may be interrupted prior to stats dump completion, for
example if client CLI has been disconnected before the full response
transfer. As such, srv_drop() must be called in every stats dump release
callback.

srv_drop() was missing for stats-file dump release callback. This could
cause a race condition which would prevent a server instance to be fully
removed. Fix this by adding srv_drop() invokation into
cli_io_handler_release_dump_stat_file().

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