BUG/MAJOR: mux_pt: always report the connection error to the conn_stream

Over time we've tried hard to abstract connection errors from the upper
layers so that they're reported per stream and not per connection. As
early as 1.8-rc1, commit 4ff3b8964 ("MINOR: connection: make conn_stream
users also check for per-stream error flag") did precisely this, but
strangely only for rx, not for tx (probably that by then send errors
were not imagined to be reported that way).

And this lack of Tx error check was just revealed in 2.6 by recent commit
d1480cc8a ("BUG/MEDIUM: stream-int: do not rely on the connection error
once established") that causes wakeup loops between si_cs_send() failing
to send via mux_pt_snd_buf() and subscribing against si_cs_io_cb() in
loops because the function now rightfully only checks for CS_FL_ERROR
and not CO_FL_ERROR.

As found by Amaury, this causes aborted "show events -w" to cause
haproxy to loop at 100% CPU.

This fix theoretically needs to be backported to all versions, though
it will be necessary and sufficient to backport it wherever 4ff3b8964
gets backported.

(cherry picked from commit 413713f02a73970122fd41c668b655daa38a98ae)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 6a097fd2f381807dacd1adc364788e1e01da5b02)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed