]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
Revert "BUG/MAJOR: mux-quic: fix BUG_ON on empty STREAM emission"
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 2 Jan 2025 09:56:13 +0000 (10:56 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 2 Jan 2025 10:00:25 +0000 (11:00 +0100)
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.

src/mux_quic.c

index 29d950e81830c19a4074db5f79aece7c125afb1d..e3fa05cb48ecb9cb5518bc9f4fdf074887900ced 100644 (file)
@@ -2014,7 +2014,7 @@ static void qcs_destroy(struct qcs *qcs)
  * truncated if greater than <fc_conn_wnd>. 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)
 {