]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: sink: fix a race condition in the TCP log forwarding code
authorWilly Tarreau <w@1wt.eu>
Tue, 27 Feb 2024 16:32:44 +0000 (17:32 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Mar 2024 10:48:44 +0000 (11:48 +0100)
commit962c129dc1f1f8718098e29ff9b01905fef63944
treee4a2f2d885c2557316d856de936d93470743c943
parent75c8a1bc2dadd473de2de240ec8e125b45254833
BUG/MINOR: sink: fix a race condition in the TCP log forwarding code

That's exactly the same as commit 53bfab080c ("BUG/MINOR: sink: fix a race
condition between the writer and the reader") that went into 2.7 and was
backported as far as 2.4, except that since the code was duplicated, the
second instance was not noticed, leaving the race present. The race has
a limited impact, if a forwarder reaches the end of the logs and a new
message arrives before it leaves, the forwarder will only wake up after
yet another new message will be sent. In practice it remains unnoticeable
because for the race to trigger, one needs to have a steady flow of logs,
which means the wakeup will happen anyway.

This should be backported, but no need to insist on it if it resists.
src/sink.c