]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mworker: can't use signals after a failed reload
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 6 Jan 2026 12:59:41 +0000 (13:59 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 6 Jan 2026 13:27:53 +0000 (14:27 +0100)
commit97490a7789f39d704193e2146131cf5574a755ff
treef7595c929ae2cea9cd4a80ee2b66eddc1fa2be6e
parent56fd0c1a5c15f9b1986d0a6fa6d703c8ea9ae5fe
BUG/MEDIUM: mworker: can't use signals after a failed reload

In issue #3229 it was reported that the master couldn't reload after a
failed reload following a wrong configuration.

It is still possible to do a reload using the "reload" command of the
master CLI. But every signals are blocked.

The problem was introduced in 709cde6d0 ("BUG/MEDIUM: mworker: signals
inconsistencies during startup and reload") which fixes the blocking of
signals during the reload.

However the patch missed a case, indeed, the
run_master_in_recovery_mode() is not being called when the worker failed
to parse the configuration, it is only failing when the master is
failing.

To handle this case, the mworker_unblock_signals() function must be
called upon mworker_on_new_child_failure(). But since this is called in
an haproxy signal handler it would mess with the signals.

Instead, the patch adds a task which is started by the signal handler,
and restores the signals outside of it.

This must be backported as far as 3.1.
src/mworker.c