Fantastic. I can confirm that I see the fix working too, both using my reproducer and my original more-involved problem. Thanks for the super-fast turnaround!
From: adarra...@haproxy.com At: 04/17/25 14:09:56 UTC+1:00To: Jacques Heunis (BLOOMBERG/ LONDON ) , haproxy@formilux.org Subject: Re: Yielding from a lua service seems to drop data > > Thank you very much for this reproducer, it was very helpful. > Turns out this used to work fine in older stable releases (ie: 2.4, 2.6) > and somehow it stopped working properly near 2.8 indeed > > A quick bisect based on your reproducer tells us that: > >> commit 31572229ede61eb4ce1ee494f4436df353165a43 >> Author: Christopher Faulet <cfau...@haproxy.com> >> Date: Fri Mar 31 11:13:48 2023 +0200 >> >> MEDIUM: hlua/applet: Use the sedesc to report and detect end of processing >> >> There are 3 kinds of applet in lua: The co-sockets, the TCP services and the >> HTTP services. The three are refactored to use the SE descriptor instead of >> the channel to report error and end-of-stream. >> >> src/hlua.c | 108 +++++++++++++++++++++++++++---------------------------------- >> 1 file changed, 48 insertions(+), 60 deletions(-) > > Is the first commit that exhibits this unexpected behavior/bug. > > So indeed all versions since 2.8 appear to be affected. > > > We'll try to understand the regression and provide a fix shortly, thank > you very much! It should be fixed with b81ab159a [1] ("BUG/MEDIUM: hlua: fix hlua_applet_{http,tcp}_fct() yield regression (lost data)"), it will get backported to relevant branches as usual [1]: https://github.com/haproxy/haproxy/commit/b81ab159a613323a0e8cd625d138955acfcbb6 66 Aurelien