]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-quic: fix EOI for request without payload
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 12 May 2023 16:16:31 +0000 (18:16 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 16 May 2023 15:53:45 +0000 (17:53 +0200)
commitbf86d89ea60d63df469069339bb8542203c5578f
tree7a2d563b5db35274817e90f851fbe1977f93046c
parent1a2faef92fab683b240b6dc2ff7bf9eae2520320
BUG/MEDIUM: mux-quic: fix EOI for request without payload

When a full message is received for a stream, MUX is responsible to set
EOI flag. This was done through rcv_buf stream callback by checking if
QCS HTX buffer contained the EOM flag.

This is not correct for HTTP without body. In this case, QCS HTX buffer
is never used. Only a local HTX buffer is used to transfer headers just
as stream endpoint is created. As such, EOI is never transmitted to the
upper layer.

If the transfer occur without any issue, this does not seem to cause any
problem. However, in case the transfer is aborted, the stream is never
released which cause a memory leak and prevent the process soft-stop.

To fix this, also check if EOM is put by application layer during
headers conversion. If true, this is transferred through a new argument
to qc_attach_sc() MUX function which is responsible to set the EOI flag.

This issue was reproduced using h2load with hundred of connections.
h2load is interrupted with a SIGINT which causes streams to never be
closed on haproxy side.

This should be backported up to 2.6.
src/h3.c
src/hq_interop.c
src/mux_quic.c