]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: mux_quic: prevent purgeable QCS lingering
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 23 Sep 2026 12:31:37 +0000 (14:31 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 6 Oct 2026 15:12:29 +0000 (17:12 +0200)
Ensure QCC tasklet is woken up when a QCS is inserted in the purge list.
The objective is to prevent keeping QCS for too long in it.

Changes are only necessary when running outside of QCC tasklet. Thus new
wakeup are only inserted in receive handlers to avoid unnecessary
tasklet execution.

Prior to this patch, a purgeable QCS could have been kept virtually
indefinitely. This probably did not really happen as QCC tasklet is
frequently woken after frames handling.

This should be backported up to 3.2, after a period of observation.

src/mux_quic.c

index 19fb5c0cc7a041a20410f28267e952c19df57511..720ef93708a7c870af7da1dffe7bccb4883b26fb 100644 (file)
@@ -2149,6 +2149,10 @@ int qcc_recv(struct qcc *qcc, uint64_t id, uint64_t len, uint64_t offset,
                return 0;
        }
 
+       /* Wakeup tasklet if QCS inserted in purge list. May happen after remote closure. */
+       if (qcs_is_completed(qcs))
+               tasklet_wakeup(qcc->wait_event.tasklet);
+
  out:
        TRACE_LEAVE(QMUX_EV_QCC_RECV, qcc->conn);
        return 0;
@@ -2366,6 +2370,9 @@ int qcc_recv_reset_stream(struct qcc *qcc, uint64_t id, uint64_t err, uint64_t f
 
        qcs->flags |= QC_SF_SIZE_KNOWN|QC_SF_RECV_RESET;
        qcs_close_remote(qcs);
+       /* Wakeup tasklet if QCS inserted in purge list. May happen after remote closure. */
+       if (qcs_is_completed(qcs))
+               tasklet_wakeup(qcc->wait_event.tasklet);
 
        /* RFC 9000 3.2. Receiving Stream States
         *