MINOR: epoll: permit to mask certain specific events
authorWilly Tarreau <w@1wt.eu>
Mon, 27 Jan 2025 14:41:26 +0000 (15:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Apr 2025 09:05:33 +0000 (11:05 +0200)
commit8ecfb849e49f84cb7e0302e001d256aa5a5ce441
tree9b795ddbb3105694894b3358a88501609e891c1f
parent2dfa77805662706e3c1d92ad0f5412dec2f43ed1
MINOR: epoll: permit to mask certain specific events

A few times in the past we've seen cases where epoll was caught reporting
a wrong event that caused trouble (e.g. spuriously reporting HUP or RDHUP
after a successful connect()). The new tune.epoll.mask-events directive
permits to mask events such as ERR, HUP and RDHUP and convert them to IN
events that are processed by the regular receive path. This should help
better diagnose and troubleshoot issues such as this one, as well as rule
out such a cause when similar issues are reported:

   https://github.com/haproxy/haproxy/issues/2368
   https://www.spinics.net/lists/netdev/msg876470.html

It should be harmless to backport this if necessary.

(cherry picked from commit 7fa70da06db3e69a61e4451a82a4f980b40b4d0c)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit cf4d3fc9aec7bb16191cad2678554b631553a99d)
Signed-off-by: Willy Tarreau <w@1wt.eu>
doc/configuration.txt
src/ev_epoll.c