]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: mux-pt: report send errors in termination events from done_ff()
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 15 Oct 2026 09:48:50 +0000 (09:48 +0000)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 3 Dec 2026 12:41:06 +0000 (13:41 +0100)
When the zero-copy forwarding is used with splicing, the data received by
the producer are immediately sent by the consumer through
mux_pt_done_ff(). If this send fails, the error is reported to the sedesc
but, unlike in mux_pt_snd_buf() and mux_pt_resume_fastfwd(), no "snd_err"
termination event is reported for the mux connection. So the term_events
sample fetch misses it and only shows the receive error detected later by
the fd/xprt layer, which makes the analysis of aborted spliced transfers
misleading. The H1 mux reports it in h1_done_ff().

This was introduced with the commit 9cbc3229e ("MINOR: tevt/mux-pt: Add
support for termination event logs") in 3.2-dev5. This patch must be
backported as far as 3.2.

src/mux_pt.c

index 7bfae0b0e4517161692b3508bedbebf04282c2b4..282f1105ded24dd616281cc237b345e6bbfcda38 100644 (file)
@@ -646,6 +646,7 @@ static size_t mux_pt_done_ff(struct stconn *sc)
 
   out:
        if (conn->flags & CO_FL_ERROR) {
+               mux_pt_report_term_evt(ctx, muxc_tevt_type_snd_err);
                if (conn_xprt_read0_pending(conn))
                        se_fl_set(ctx->sd, SE_FL_EOS);
                se_fl_set_error(ctx->sd);