-
Notifications
You must be signed in to change notification settings - Fork 24
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
Some segfaults #5
Comments
Hi, The only way to see why it crashes is to get the core dump files You have to add this in your main nginx.conf makdir -p /tmp/cores worker_rlimit_core 500M;
working_directory /tmp/cores/; Then run gdb to obtain backtrace as usual, e.g. gdb /path/to/nginx /tmp/nginx.core.PID
backtrace full It will help if you can share your current nginx configuration (only the relevant parts) and some load statistics. Thanks |
Hi, Don't know if it can help. The load is very low. I have a lot of reverse proxys with ntlm enabled on this instance.
|
Hi, Thanks. This definitely helps. g. |
I think your code contains a logical error on the following lines: static void ngx_http_upstream_client_conn_cleanup(void *data) {
} If the connection is already deleted, then calling the function ngx_log_debug2 results in segfault. |
@dbalaev Thanks for pointing this. |
Build CENTOS 7 + NGINX 1.23.1-1 [Thread debugging using libthread_db enabled] |
same segfault on ubuntu 22 with nginx/1.22.0 https://gist.github.com/klp18/a9eb7118e951528e3c9da65851a18d45
|
Thanks @klp18 for reporting this. |
@gabihodoroaga thank's for this module! Did you manage to reproduce the segfaults? It's also happening on my instance (nginx/1.18.0) and shutting down worker proccesses every few minutes (often multiple times per minute). Let me know if you need further information or configuration files for comparison. |
@klp18 would you mind sharing a binary core dump file ? I'm trying to reproduce the issue in lab with no luck yet. Backtrace is useful but I'd like to go further into the investigation. |
Thanks @klp18! I will have a look |
@klp18 Can you provide me with the output of "nginx -V" command, please? |
|
@klp18 I may have found a fix but can't reproduce the issue locally. Would you mind trying the following patch and see if it fixes ?
|
@tmagnien
|
@klp18 Sorry to bother again but I can't reproduce it so would you mind replacing previous patch with this one:
If segfault still occurs, it would help me to also have nginx debug logs. Thanks a lot! |
@tmagnien
|
Hi again @klp18. Can you try the following patch, please:
And again, sorry for those multiple tries, but I still don't have any way to reproduce the issue, so I'm working blind. |
I have no problem with doing such tests, so ask away. Here's another thing I noticed.
and the new ones with the following:
new back trace:
and another one:
|
Thanks a lot @klp18 . Do you think you could provide a full Nginx debug log ? This would help me understanding the sequence of events. And in the meantime, please try this patch:
|
new dumps with debug logs with the new patch applied |
Thanks a lot @klp18 , it was helpful. Can you try the following patch:
|
crashes are much less frequent now. |
@klp18 I think I spotted the root cause, can you please try this patch:
|
@tmagnien |
@klp18 great news ! If you confirm tomorrow I'll create a PR with the patch. |
@klp18 Thanks for the core dumps, and yes, if you can enable debug it will help a lot. |
@klp18 updated patch to handle last (I hope) edge case:
|
There was one crash in last 16 hours though.
|
@klp18 Thanks! Just one question : from the logs I feel there's a internal proxy configuration on your setup, something like client -> nginx -> nginx -> server, is this right ? |
@tmagnien Publishing through TMG 2010 has its own specific features. So it turns out that I don't have an extra proxy in front of nginx, but a double NAT. |
Hi @klp18 . I finally have some time to work in this again. Would you have the possibility to make the same tests with keepalive disabled ? I mean "keepalive_timeout 0;" in nginx config file. |
Hello @tmagnien, |
Ok no problem, thanks for trying.
Le mar. 7 févr. 2023, 20:37, klp18 ***@***.***> a écrit :
… Hello @tmagnien <https://github.com/tmagnien>,
when I set keepalive_timeout to zero, authentication stops working.
Outlook constantly asks for the password, and I see an endless 401 http
status code in the nginx log.
Well, since crashes are quite rare (a few times a day), I can't leave
nginx running for long in this state.
And it's unlikely to crash if clients can't authenticate.
—
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJMVWF4D3KVCU57AVTQWKLWWKP7TANCNFSM5BAHGO4A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi,
I'm having some segfaults here. nginx version: nginx/1.20.1
Please help me to get some debug info for you.
The text was updated successfully, but these errors were encountered: