From d9855102cf303948ffc842e8c0f7939e67a29bd9 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 22 Jul 2025 15:15:34 +0200 Subject: [PATCH] BUG/MEDIUM: Remove sync sends from streams to applets When the applet API was reviewed to use dedicated buffers, the support for sends from the streams to applets was added. Unfortunately, it was not a good idea because this way it is possible to deliver data to an applet and release it just after, truncated data. Indeed, the release stage for applets is related to the stream release itself. However, unlike the multiplexers, the applets cannot survive to a stream for now. So, for now, the sync sends from the streams is removed for applets, waiting for a better way to handle the applets release stage. Note that this only concerns applets using their own buffers. And of now, the bug is harmless because all refactored applets are on server side and consume data first. But this will be an issue with the HTTP client. This patch should be backported as far as 3.0 after a period of observation. --- include/haproxy/sc_strm.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/include/haproxy/sc_strm.h b/include/haproxy/sc_strm.h index 3e2bea0bd..996b7ea88 100644 --- a/include/haproxy/sc_strm.h +++ b/include/haproxy/sc_strm.h @@ -348,15 +348,6 @@ static inline void sc_sync_send(struct stconn *sc) { if (sc_ep_test(sc, SE_FL_T_MUX)) sc_conn_sync_send(sc); - else if (sc_ep_test(sc, SE_FL_T_APPLET)) { - sc_applet_sync_send(sc); - if (sc_oc(sc)->flags & CF_WRITE_EVENT) { - /* Data was send, wake the applet up. It is safe to do so because sc_applet_sync_send() - * removes CF_WRITE_EVENT flag from the channel before trying to send data to the applet. - */ - task_wakeup(__sc_appctx(sc)->t, TASK_WOKEN_OTHER); - } - } } /* Combines both sc_update_rx() and sc_update_tx() at once */ -- 2.47.2