From: Olivier Houchard Date: Wed, 18 Nov 2026 16:41:03 +0000 (+0100) Subject: BUG/MEDIUM: mux-quic: cap elastic MAX_STREAMS to stream.max-total X-Git-Url: https://git.kaiwu.me/web/%22data:,/doc/static/%7B@url%7D?a=commitdiff_plain;h=3c85b929c881ca65de08a20003034161336dbe48;p=haproxy.git BUG/MEDIUM: mux-quic: cap elastic MAX_STREAMS to stream.max-total With "tune.streams-elasticity", qcc_release_remote_stream() grants as MAX_STREAMS increment the difference between the elastic limit and the streams still usable by the peer. Unlike the static path, nothing caps the new limit to "tune.quic.fe.stream.max-total". If the window was reduced under load and the load then drops, the increment computed close to the end of the connection may exceed the remaining streams, and the next released stream hits BUG_ON(qcc->lfctl.ms_bidi > max). Let's cap the increment to the remaining streams. It is still at least 1 since ms_bidi is below max there. This was introduced by commit e139dd90e ("MAJOR: mux_quic: support stream elasticity during connection lifetime") in 3.4-dev13 and must be backported to 3.4. --- diff --git a/src/mux_quic.c b/src/mux_quic.c index d00aaeb8c..c490a8e08 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -2657,6 +2657,9 @@ static int qcc_release_remote_stream(struct qcc *qcc, uint64_t id) /* Update flow control limit up to the allowed elasticity limit. */ inc = conn_max - rem; + /* never exceed max, still >= 1 as ms_bidi < max */ + if (inc > max - qcc->lfctl.ms_bidi) + inc = max - qcc->lfctl.ms_bidi; _HA_ATOMIC_ADD(&tg_ctx->committed_extra_streams, inc - non_extra); qcc->lfctl.ms_bidi_rel = rem + inc; }