Hi Willy,
Op 15-4-2018 om 23:08 schreef Willy Tarreau:
Well to be clear, I'm pretty sure we're hiding the dust under the carpet
here, even if it fixes the problem in your case. What I need to do is to
actually understand why we end up in this situation.
Okay added a little more code/error logging to help understand whats
going on. Like below with the original code from master.
This error pops up with code '2': "[ENOENT] The event could not be found
to be modified or deleted."
This prevents the "EVFILT_READ, EV_ADD (7)" from taking effect and
reading the second browser request that includes the NTLM credentials..
Added logging:
if (changes) {
errno = -1;
int x = kevent(kqueue_fd[tid], kev, changes, NULL, 0, NULL);
int e = errno;
fprintf(stdout, " Events changed:%d result:%d err:%d\n",
changes, x, e);
}
The result is like this:
Total: 3 (3 usable), will use kqueue.
Available filters :
[TRACE] trace
[COMP] compression
[SPOE] spoe
Using kqueue() as the polling mechanism.
EVFILT_READ, EV_ADD (4)
EVFILT_READ, EV_ADD (5)
Events changed:2 result:0 err:-1
KernelEvent kev for FD:(4) filter:-1
00000000:Syner.accept(0004)=0007 from [192.168.8.116:4096] ALPN=<none>
EVFILT_READ, EV_ADD (7)
Events changed:1 result:0 err:-1
KernelEvent kev for FD:(7) filter:-1
00000000:Syner.clireq[0007:ffffffff]: GET
/SynEnt/docs/HRMResourceCard.aspx?ID=7 HTTP/1.1
00000000:Syner.clihdr[0007:ffffffff]: Accept: text/html,
application/xhtml+xml, image/jxr, */*
00000000:Syner.clihdr[0007:ffffffff]: Accept-Language:
nl-NL,nl;q=0.8,en-GB;q=0.5,en;q=0.3
00000000:Syner.clihdr[0007:ffffffff]: User-Agent: Mozilla/5.0 (Windows
NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
00000000:Syner.clihdr[0007:ffffffff]: Accept-Encoding: gzip, deflate
00000000:Syner.clihdr[0007:ffffffff]: Host: 192.168.8.93
00000000:Syner.clihdr[0007:ffffffff]: Connection: Keep-Alive
EVFILT_READ, EV_DELETE (7)
Events changed:1 result:0 err:-1
EVFILT_WRITE, EV_ADD (8)
Events changed:1 result:0 err:-1
KernelEvent kev for FD:(8) filter:-2
EVFILT_READ, EV_ADD (8)
EVFILT_WRITE, EV_DELETE (8)
Events changed:2 result:0 err:-1
KernelEvent kev for FD:(8) filter:-1
KernelEvent kev for FD:(8) filter:-1
EVFILT_READ, EV_DELETE (8)
EVFILT_WRITE, EV_DELETE (8)
Events changed:2 result:-1 err:2 <<<<<<<<<<< ERROR while deleting a
non existing event
EVFILT_READ, EV_ADD (8)
Events changed:1 result:0 err:-1
KernelEvent kev for FD:(8) filter:-1
00000000:Syner.srvrep[0007:0008]: HTTP/1.1 401 Unauthorized
00000000:Syner.srvhdr[0007:0008]: Content-Type: text/html
00000000:Syner.srvhdr[0007:0008]: Server: Microsoft-IIS/7.5
00000000:Syner.srvhdr[0007:0008]: WWW-Authenticate: NTLM
00000000:Syner.srvhdr[0007:0008]: WWW-Authenticate: Negotiate
00000000:Syner.srvhdr[0007:0008]: X-Powered-By: ASP.NET
00000000:Syner.srvhdr[0007:0008]: Date: Mon, 16 Apr 2018 00:12:47 GMT
00000000:Syner.srvhdr[0007:0008]: Content-Length: 1332
EVFILT_READ, EV_ADD (8)
EVFILT_WRITE, EV_DELETE (8)
EVFILT_READ, EV_ADD (7)
Events changed:3 result:-1 err:2 <<<<<<<<<<< ERROR while deleting a
non existing event
After this the KernelEvent for FD 7 that should read the second browser
request never happens.
I think we can conclude deleting events that don't exist is a bad thing.?
Ill leave further discussion about why and how to you and Oliver :).
Regards,
PiBa-NL (Pieter)