]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: listener: never suspend inherited sockets
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2020 13:14:55 +0000 (14:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2020 13:22:42 +0000 (14:22 +0100)
commit59b5da487368a976fa475848eaea5499ca007a19
tree2351282db83a7825a279d4df07c767a4f805095b
parent38dba27d4d2b3a39bb88893023c5269a871b52f2
BUG/MEDIUM: listener: never suspend inherited sockets

It is not acceptable to suspend an inherited socket because we'd kill
its listening state, making it possibly unrecoverable for future
processes. The situation which can trigger this is when there is an
abns socket in a config and an inherited FD on another listener. Upon
soft reload, the abns fails to bind, a SIGTTOU is sent to the old
process which suspends everything, including the inherited FD, then
the new process can bind and tell the old one to quit. Except that the
new FD was not set back to the listen state, which is detected by
listener_accept() which can pause it. It's only upon second reload
that the FD works again.

The solution is to refrain from suspending such FDs since we don't own
them. And the next process will get them right anyway from its config.
For now only TCP and UDP face this issue so it's better to address this
on a protocol basis

No backport is needed, this is related to the new listeners in 2.3.
src/proto_tcp.c
src/proto_udp.c