]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mworker: PROC_O_LEAVING used but not updated
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 27 Jul 2022 09:57:12 +0000 (11:57 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 27 Jul 2022 10:13:56 +0000 (12:13 +0200)
commit14b98ef1bde442abb2f3616a590af803516c7467
tree9a7f8eed17fc6c8bf7e1a07dcc01dd553b5a286a
parent519cd2021bda11231d461f5974b4e321d0b4eb29
BUG/MINOR: mworker: PROC_O_LEAVING used but not updated

Since commit 2be557f ("MEDIUM: mworker: seamless reload use the internal
sockpair"), we are using the PROC_O_LEAVING flag to determine which
sockpair worker will be used with -x during the next reload.

However in mworker_reexec(), the PROC_O_LEAVING flag is not updated, it
is only updated at startup in mworker_env_to_proc_list().

This could be a problem when a remaining process is still in the list,
it could be selected as the current worker, and its socket will be used
even if _getsocks doesn't work anymore on it. (bug #1803)

This patch fixes the issue by updating the PROC_O_LEAVING flag in
mworker_proc_list_to_env() just before using it in mworker_reexec()

Must be backported to 2.6.
src/mworker.c