]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mworker: increase maxsock with each new worker
authorWilliam Lallemand <wlallemand@haproxy.org>
Mon, 19 Jun 2023 15:12:58 +0000 (17:12 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Mon, 19 Jun 2023 15:32:32 +0000 (17:32 +0200)
commite6051a04efc0616cc84256cad5ef9b264818daef
treee8fcb9c75a55c4584611782779d662a533cacc9f
parent98b55d1260df37f019a2d4ebc984338fae6e8a7f
BUG/MEDIUM: mworker: increase maxsock with each new worker

In ticket #2184, HAProxy is crashing in a BUG_ON() after a lot of reload
when the previous processes did not exit.

Each worker has a socketpair which is a FD in the master, when reloading
this FD still exists until the process leaves. But the global.maxconn
value is not incremented for each of these FD. So when there is too much
workers and the number of FD reaches maxsock, the next FD inserted in
the poller will crash the process.

This patch fixes the issue by increasing the maxsock for each remaining
worker.

Must be backported in every maintained version.
src/mworker.c