Hi again,
On Fri, Jun 14, 2019 at 05:25:34AM +0200, Willy Tarreau wrote:
> On Thu, Jun 13, 2019 at 05:31:09PM -0500, Dave Chiluk wrote:
> > I used the number of calls to setsockopt with SO_LINGER in them using the
> > following command.
> > $ sudo timeout 60s strace -e setsockopt,close -p $(ps -lf -C haproxy | tail
> > -n 1 | awk -e '{print $4}') 2>&1 | tee 1.9-${V} ; grep LINGER 1.9-${V} | wc
> > -l
> >
> > 53216e7 = 1
> > 81a15af6b = 69
> >
> > Interesting to note is that 1.8.17 only has roughly 17. I'll see if I can
> > do a bisection for that tomorrow.
>
> This is interesting because there is no equivalent commit in 1.8 so it
> may be possible that we've created a bug long ago that triggers more
> easily in certain situations.
So in fact it was not that black or white between versions, but we've
seen that depending on the check and its behaviour, a shutw could
be emitted before setting the NOLINGER flag, which is problematic
because at this point the flag will be ignored. Olivier addressed
this by ensuring we don't shutw() when the flag is there so that only
close() does the job. I'm seeing that in some cases we call
conn_sock_drain() which will disable the flag. Thus I'm interested in
knowing if what is present in the lastest development tree 2.0 master
branch) works fine for you or if you're still experiencing the issue.
thanks,
Willy