From: Amaury Denoyelle Date: Thu, 2 Jan 2025 09:56:13 +0000 (+0100) Subject: Revert "BUG/MAJOR: mux-quic: fix BUG_ON on empty STREAM emission" X-Git-Tag: v3.2-dev3~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85e27f1e92d0d6fd4dd0588992d3da3039a065f9;p=thirdparty%2Fhaproxy.git Revert "BUG/MAJOR: mux-quic: fix BUG_ON on empty STREAM emission" This reverts commit 98064537423fafe05b9ddd97e81cedec8b6b278d. Above patch tried to fix a BUG_ON() occurence when MUX only emitted empty STREAM frames via qcc_build_frms(). Return value of qcs_send() was changed from the payload STREAM frame to the whole frame length. However, this is invalid as this return value is used to ensure connection flow-control is not exceeded on sending retry. This causes occurence of BUG_ON() crash in qcc_io_send() as send-list is not properly purged after QCS emission. Reverts this incorrect fix. The original issue will be properly dealt in the next commit. This commit must be backported to 3.1 if reverted commit was already applied on it. --- diff --git a/src/mux_quic.c b/src/mux_quic.c index 29d950e818..e3fa05cb48 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -2014,7 +2014,7 @@ static void qcs_destroy(struct qcs *qcs) * truncated if greater than . This allows to prepare several * frames in a loop while respecting connection flow control window. * - * Returns the length of the STREAM frame or a negative error code. + * Returns the payload length of the STREAM frame or a negative error code. */ static int qcs_build_stream_frm(struct qcs *qcs, struct buffer *out, char fin, struct list *frm_list, uint64_t window_conn) @@ -2103,7 +2103,7 @@ static int qcs_build_stream_frm(struct qcs *qcs, struct buffer *out, char fin, qcc->conn, qcs, &arg); } - return qc_frm_len(frm); + return total; err: TRACE_LEAVE(QMUX_EV_QCS_SEND, qcc->conn, qcs); @@ -2265,7 +2265,7 @@ static int qcs_send_stop_sending(struct qcs *qcs) * This allows to prepare several frames in a loop while respecting connection * flow control window. * - * Returns the length of the STREAM frame or a negative error code. + * Returns the payload length of the STREAM frame or a negative error code. */ static int qcs_send(struct qcs *qcs, struct list *frms, uint64_t window_conn) {