]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: quic: prevent stream freeze on pacing
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 29 Nov 2024 13:28:09 +0000 (14:28 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 29 Nov 2024 13:35:10 +0000 (14:35 +0100)
commit9d4c26ebaa5c54714eae27a39422e0d47970c628
tree6b6a281e42471d7cf5bda31699acd309cd383d77
parentdd56616067d19060425940f6906cefe6efcd1955
BUG/MEDIUM: quic: prevent stream freeze on pacing

On snd_buf completion, QUIC MUX tasklet is scheduled if newly data has
been transferred from the stream layer. Thanks to qcc_wakeup(), pacing
status is removed from tasklet, which ensure next emission will reset Tx
frames and use the new data.

Tasklet is not scheduled if MUX is already subscribed on send due to a
previous blocking condition. This is an optimization to prevent an
unneeded IO handler execution. However, this causes a bug if an emission
is currently delayed due to pacing. As pacing status is not removed on
snd_buf, next emission process will continue emission with older data
without refreshing the newly transferred one.

This causes a transfer freeze. Unless there is some activity on the
connection, the transfer will be eventually aborted due to idle timeout.

To fix this, remove TASK_F_USR1 if tasklet wakeup is not called due to
send subscription. Note that this code is also duplicated in done_ff for
zero-copy transfer.

This must be backported up to 3.1.
src/mux_quic.c