BUG/MEDIUM: mux-h1: Fix a deadlock when a 408 error is pending for a client
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Dec 2020 09:06:12 +0000 (10:06 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Dec 2020 09:06:13 +0000 (10:06 +0100)
commitcc043f66b7d6479866037bae00e27fd34fbee70b
tree433b45f21a73f015462809ea563d5c9f6faeda8c
parentcb33d3ac7f8dbc3f7323606a521d29dc100adbda
BUG/MEDIUM: mux-h1: Fix a deadlock when a 408 error is pending for a client

When a frontend H1 connection timed out waiting for the next request, a 408
error message is returned to the client. It is performed into the H1C task
process function, h1_timeout_task(), and under the idle connection takeover
lock. If the 408 error message cannot be sent immediately, we wait for a
next retry. In this case, the lock must be released.

This bug was introduced by the commit c4bfa59f1d ("MAJOR: mux-h1: Create the
client stream as later as possible") and is specific to the 2.4-DEV. No
backport needed.
src/mux_h1.c