-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No http events when making a https request to scoped nginx #1017
Comments
After turning on hex logging in doProtocol() (our protocol detection function) and recompiling, I observed the following pattern (snippet):
That first call to doProtocol() with a buffer of length 1 containing 0x16 appears erroneous. Since it's the first message on the socket, it's setting TLS=false and subsequently we aren't able to detect a PROTO later.
as a result, TLS detection works, and PROTO detection works also. So, where is this strange first message coming from? I scoped nginx again, then attached gdb to the worker process and set a breakpoint on doProtocol().
This is the only instance that doProtocol() is called from __recv_chk . In all other cases, we are coming from an interposition of syscall read or write. |
@jrcheli discovered that nginx is calling We need to put in place a check for this flag in all recv type interpositions, ignoring any occasions where it is set. This will avoid duplication of data reads which upset things like protocol detection. |
Just for the record, per @jrcheli , I updated the Known Issues description. Since the old one is gone from the docs now, here it is:
And here is the revised description:
|
* add fix for KI #1017 * update lambda section * tweak * sort out lambda function content * revise KI description * clarify where settings happen Co-authored-by: Abe Raher <abe@cribl.io>
When scoping nginx, and hitting it with a curl request, we do not get http events.
User @coccyx reported an issue first seen in the AppScope Fundamentals sandbox:
"if I scope nginx and then curl --http1.1 -s -k https://localhost/ I would expect scope events --id 1 -t http.req to return some events, but I do not see HTTP events from nginx."
The team was able to reproduce the issue on local environments by configuring nginx to handle TLS requests and scoping it, before hitting it with a cURL request. This is a confirmed bug.
The text was updated successfully, but these errors were encountered: