When preloading the shared memory stats file at startup,
shm_stats_file_preload() only checked that the tgid read from each
object was not greater than the number of configured thread groups,
but it forgot to also check for zero, which can correspond to an
entry in the process of being reused, and that would cause the
process to crash on startup.
Let's just also test 0. This should be backported to 3.3.
Reported-by: Claude (ANT-2026-71A0JC6Q)
obj_tgid = HA_ATOMIC_LOAD(&curr_obj->tgid);
- /* ignore object if greater than our max tgid */
- if (obj_tgid <= global.nbtgroups &&
+ /* ignore object if tgid greater than our max tgid (or null) */
+ if (obj_tgid && obj_tgid <= global.nbtgroups &&
(node = guid_lookup(curr_obj->guid))) {
switch (*node->obj_type) {
case OBJ_TYPE_LISTENER: