]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: stream: Force channel analysis on successful synchronous send
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 11 Sep 2025 07:38:41 +0000 (09:38 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 11 Sep 2025 07:47:47 +0000 (09:47 +0200)
commit5354c24c7609002c4daeb58e15a6057eeae367ac
tree1a67c78c4069cb5cd3214f569fc4690693edf506
parentded2110ec6be271ae7293dc536bedc1fd49d7314
BUG/MAJOR: stream: Force channel analysis on successful synchronous send

This patchs reverts commit a498e527b ("BUG/MAJOR: stream: Remove READ/WRITE
events on channels after analysers eval") because of a regression. It was an
attempt to properly detect synchronous sends, even when the stream was woken
up on a write event. However, the fix was wrong because it could mask
shutdowns performed during process_stream() and block the stream.

Indeed, when a shutdown is performed, because an error occurred for
instance, a write event is reported. The commit above could mask this event
while the shutdown prevent any synchronous sends. In such case, the stream
could remain blocked infinitly because an I/O event was missed.

So to properly fix the original issue (#3070), the write event must not be
masked before a synchronous send. Instead, we now force the channel analysis
by setting explicitly CF_WAKE_ONCE flags on the corresponding channel if a
write event is reported after the synchronous send. CF_WRITE_EVENT flag is
remove explicitly just before, so it is quite easy to detect.

This patch must be backport to all stable version in same time of the commit
above.
src/stconn.c
src/stream.c