]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mworker: signals inconsistencies during startup and reload
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 17 Nov 2025 17:30:20 +0000 (18:30 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 18 Nov 2025 09:05:42 +0000 (10:05 +0100)
commit709cde6d0877f409173d81dd46e1d0f52af92279
treeb716d76bba63bf9d65c446661e52444c5a351145
parentb38405d156661620b5c9e36fb968813d6c77ee22
BUG/MEDIUM: mworker: signals inconsistencies during startup and reload

Since haproxy 3.1, the master-worker mode changed to let the worker
parse the configuration instead of the master.

Previously, signals were blocked during configuration parsing and
unblocked before entering the polling loop of the master. This way it
was impossible to start a reload during the configuration parsing.

But with the new model, the polling loop is started in the master before
the configuration parsing is finished, and the signals are still
unblocked at this step. Meaning that it is possible to start a reload
while the configuration is parsing.

This patch reintroduce the behavior of blocking the signals during
configuration parsing adapted to the new model:

- Before the exec() of the reload, signals are blocked.
- When entering the polling loop, the SIGCHLD is unblocked because it is
  required to get a failure during configuration parsing in the worker
- Once the configuration is parsed, upon success in _send_status() or
  upon failure in run_master_in_recovery_mode() every signals are unblocked.

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