]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stats-file: fix shm-stats-file recover when all process slots are full
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 18 Feb 2026 16:04:03 +0000 (17:04 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 19 Feb 2026 15:13:48 +0000 (16:13 +0100)
commit04a4d242c9d3be576745ca3765ca2fbc3776b449
tree1ddc49a21c4f8828a973c3b31c697fe2afaa20f0
parent0bb686a72df856861fe81f7abbc9503ff3163a8f
BUG/MEDIUM: stats-file: fix shm-stats-file recover when all process slots are full

Amaury reported that when the following warning is reported by haproxy:

  [WARNING]  (296347) : config: failed to get shm stats file slot for 'haproxy.stats', all slots are occupied

haproxy would segfault right after during clock update operation.

The reason for the warning being emitted is not the object of this commit
(all shm-stats-file slots occupied by simultaneous co-processes) but since
it was is intended that haproxy is able to keep working despite that
warning (ignoring the use of shm-stats-file), we should fix the crash.

The crash is caused by the fact that we detach from the shared memory while
the global_now_ns and global_now_ms clock pointers still point to the shared
memory. Instead we should revert to using our local clock instead before
detaching from the map.

It should be backported in 3.3
src/stats-file.c