On Tue, Mar 25, 2025 at 04:41:39PM +0000, psavalle wrote:
> I gave it another try along these lines, with a few simplifications. I think
> it is still a good test for the feature, and at least it appears to work 100%
> of the time 'on my machine' -- so I am hopeful in might on yours/CI as well.
> 
> I have dropped the second `c2b` client to simplify the test.
> 
> I initially also tried to serve the request for `c1b` (the one that is 
> initially
> queued) and check that it is successful, by using something along the lines 
> of:
> 
> ```
> s1 {
>   rxresp   # Serve request for c1a
>   ...      # Barriers
>   txresp
> 
>   rxresp   # Serve request for c1b
>   txtesp
> }
> ```

I tried this one as well since used in other configs but didn't manage
to get it to work.

> With `http-reuse always` in the haproxy config, this seemed to work... about 
> 90%
> of the time.

I just forgot to force reuse!

> In about 10% of cases, the second `s1 rxresp` would just hang and
> the test would time out. Not sure why from the logs.

One reason very likely is the random sharing of idle connections
between threads. You can try to make that more deterministic
using "nbthread 1" in the config.

> To avoid those occurrences,
> I now let the request from `c1b` fail silently, and this request only serves 
> the
> purpose of keeping the queue full for when `c2` comes in.

Oh that can indeed be an option! I figured that the difficulty comes from
reusing the same barrier in the server's loop, which can either wait or
release another one depending on the arrival order. I wish there were
barriers to wait and others to release but I'm not fluent enough in vtc
to know this.

> > If I don't manage to get them to work, I propose you to merge everything
> > but tag the VTC as "broken" (we already have a few such) so that they
> > don't run by default. It's too bad to delay the inclusion of a feature
> > just because we're unable to express it in vtc :-(
> 
> That is fine by me as well. Thank you for taking a detailed look at these 
> tests!

OK I'll try with your last update. If it continues to fail here, I'll
just do that. Thanks for making the effort of writing a vtc, it's very
much appreciated, even if in this case we're playing with the limits, I
hope next time it will go smoother ;-)

Willy


Reply via email to