From: Frédéric Lécaille Date: Wed, 22 Nov 2023 15:29:08 +0000 (+0100) Subject: BUG/MINOR: quic: Possible RX packet memory leak under heavy load X-Git-Tag: v2.9-dev11~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7fc52357cb10e98c0c13358aa6f7babc3d81da95;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: Possible RX packet memory leak under heavy load This bug could be reproduced with -dMfail and h2load generating plenty of connections. A "show pools" CLI command showed that some memory in relation with RX packet pool was never release. Furthermore, adding a RX packet counter to each connection and a BUG_ON() in quic_conn_release() has proved that this unreleased memory was in relation with RX packet which were not linked to a connection. The responsible is quic_dgram_parse() which does not release some RX packet memory before exiting after the connection thread affinity has changed. Must be backported as far as 2.7. --- diff --git a/src/quic_rx.c b/src/quic_rx.c index df4abb5c89..3374e1a9b7 100644 --- a/src/quic_rx.c +++ b/src/quic_rx.c @@ -2587,6 +2587,7 @@ int quic_dgram_parse(struct quic_dgram *dgram, struct quic_conn *from_qc, MT_LIST_APPEND(&quic_dghdlrs[new_tid].dgrams, &dgram->handler_list); tasklet_wakeup(quic_dghdlrs[new_tid].task); + pool_free(pool_head_quic_rx_packet, pkt); goto out; }