]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: mux-fcgi: let the buffer callback allocate despite the queue
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 20 Nov 2026 14:33:44 +0000 (15:33 +0100)
committerOlivier Houchard <cognet@ci0.org>
Fri, 20 Nov 2026 15:30:08 +0000 (16:30 +0100)
commit14495d1ed27e15b3350dc1e92640c3830c310eb2
tree32814efd37f3e417c4eb1e26e1399a8665d661e2
parent830bbaa7ad28da86afb7c47a457d76e224d51704
BUG/MEDIUM: mux-fcgi: let the buffer callback allocate despite the queue

fcgi_buf_available() is called by offer_buffers() while the fconn is
still in the buffer wait queue. Since commit d1eb48a12 ("MEDIUM: dynbuf:
refrain from offering a buffer if more critical ones are waiting"),
b_alloc() refuses to allocate when the queue of the same or of a more
critical level is not empty, unless DB_F_NOQUEUE is passed. As the fconn
is queued with DB_MUX_RX, the demux buffer allocation always fails from
the callback, and the connection remains blocked until it times out.
This was reproduced by faking a failed demux buffer allocation when
receiving the response: the request ends with a 504.

Let's pass DB_F_NOQUEUE to the allocations made from the callback, as
was done for mux-h2 in commit d7192a667 ("BUG/MEDIUM: mux-h2: permit the
buffer callback to allocate despite the queue").

This was introduced in 3.0 by the commit above and must be backported
to 3.0.
src/mux_fcgi.c