]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: stream-int: Process connection/CS errors during synchronous sends
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 23 Sep 2019 14:11:57 +0000 (16:11 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 24 Sep 2019 08:04:19 +0000 (10:04 +0200)
If an error occurred on the connection or the conn-stream, no syncrhonous send
is performed. If the error was not already processed and there is no more I/O,
it will never be processed and the stream will never be notified of this
error. This may block the stream until a timeout is reached or infinitly if
there is no timeout.

Concretly, this bug can be triggered time to time with h2spec, running the test
"http2/5.1.1/2".

This patch depends on the commit 328ed220a "BUG/MINOR: stream-int: Process
connection/CS errors first in si_cs_send()". Both must be backported to 2.0 and
probably to 1.9. In 1.9, the code is totally different, so this patch would have
to be adapted.

src/stream_interface.c

index e661fb2f59319d208316bc1bd2a8fae68e7df71e..5a0c3cae8db464f4bc8145d1a7a286782397277a 100644 (file)
@@ -917,12 +917,6 @@ void si_sync_send(struct stream_interface *si)
        if (!cs)
                return;
 
-       if (cs->flags & (CS_FL_ERROR|CS_FL_ERR_PENDING))
-               return;
-
-       if (cs->conn->flags & CO_FL_ERROR)
-               return;
-
        si_cs_send(cs);
 }