Open kivarun opened 8 years ago
@kivarun Do you think this may be related to my errors reported in #99?
@augustf I think that we can find out if you make coredump analiz.
Looks like I'm hitting this as well. @augustf did you get to the bottom of it?
(gdb) bt
#0 0x00000000004824f7 in ngx_http_auth_ldap_return_connection (c=0x2434dc0) at /root/nginx-auth-ldap/ngx_http_auth_ldap_module.c:1103
#1 0x0000000000485287 in ngx_http_auth_ldap_authenticate (conf=<optimized out>, ctx=0x2481890, r=0x24808b0) at /root/nginx-auth-ldap/ngx_http_auth_ldap_module.c:1861
#2 ngx_http_auth_ldap_handler (r=0x24808b0) at /root/nginx-auth-ldap/ngx_http_auth_ldap_module.c:1676
#3 0x0000000000437c1a in ngx_http_core_access_phase (r=<optimized out>, ph=0x2434b80) at src/http/ngx_http_core_module.c:1066
#4 0x00000000004338e6 in ngx_http_core_run_phases (r=r@entry=0x24808b0) at src/http/ngx_http_core_module.c:840
#5 0x000000000048243b in ngx_http_auth_ldap_wake_request (r=0x24808b0) at /root/nginx-auth-ldap/ngx_http_auth_ldap_module.c:1049
#6 0x00000000004825c8 in ngx_http_auth_ldap_reply_connection (c=c@entry=0x2434dc0, error_code=0, error_msg=<optimized out>) at /root/nginx-auth-ldap/ngx_http_auth_ldap_module.c:1127
#7 0x0000000000485ffe in ngx_http_auth_ldap_read_handler (rev=0x7fba5ffd7130) at /root/nginx-auth-ldap/ngx_http_auth_ldap_module.c:1445
#8 0x00000000004297f4 in ngx_epoll_process_events (cycle=0x2403520, timer=<optimized out>, flags=<optimized out>) at src/event/modules/ngx_epoll_module.c:822
#9 0x0000000000420a3c in ngx_process_events_and_timers (cycle=cycle@entry=0x2403520) at src/event/ngx_event.c:242
#10 0x000000000042782c in ngx_worker_process_cycle (cycle=cycle@entry=0x2403520, data=data@entry=0x1) at src/os/unix/ngx_process_cycle.c:753
#11 0x0000000000425f43 in ngx_spawn_process (cycle=cycle@entry=0x2403520, proc=proc@entry=0x427789 <ngx_worker_process_cycle>, data=data@entry=0x1, name=name@entry=0x48b206 "worker process",
respawn=respawn@entry=-3) at src/os/unix/ngx_process.c:198
#12 0x0000000000426af1 in ngx_start_worker_processes (cycle=cycle@entry=0x2403520, n=8, type=type@entry=-3) at src/os/unix/ngx_process_cycle.c:358
#13 0x0000000000428133 in ngx_master_process_cycle (cycle=cycle@entry=0x2403520) at src/os/unix/ngx_process_cycle.c:130
#14 0x000000000040842e in main (argc=<optimized out>, argv=<optimized out>) at src/core/nginx.c:359
+1
looks like I am having a similar issue here:
root@security-monkey-nginx-auth-4e8f:/tmp# gdb /usr/share/nginx/sbin/nginx /tmp/core.XXXX-nginx-auth-4e8f.nginx.10030 GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/share/nginx/sbin/nginx...done. [New LWP 10030] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `nginx: worker process '. Program terminated with signal SIGSEGV, Segmentation fault.
1756 ctx->server = ((ngx_http_auth_ldap_server_t **) conf->servers->elts)[ctx->server_index]; (gdb) backtrace full
No locals.
alcf = 0x1df47c8
ctx = 0x1e39320
rc = <optimized out>
rc = <optimized out>
clcf = <optimized out>
rc = <optimized out>
ph = 0x1df8d78
cmcf = <optimized out>
cmcf = <optimized out>
c = 0x7f28e9714250
n = <optimized out>
rc = <optimized out>
rv = <optimized out>
host = {len = 4845998, data = 0x43f0f3 <ngx_http_wait_request_handler+323> "H\205\300H\211\003\017\204\344\376\377\377H\307E\020\360\353C"}
c = 0x7f28e9714250
r = 0x1e38340
ev = 0x1e03d58
flags = <optimized out>
timer = <optimized out>
delta = <optimized out>
worker = 2
i = <optimized out>
c = <optimized out>
on = 1
pid = 0
s = 2
i = 2
ch = {command = 1, pid = 10029, slot = 1, fd = 10}
---Type
And my nginx installation is
root@security-monkey-nginx-auth-4e8f:/tmp# nginx -V nginx version: nginx/1.4.6 built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) TLS SNI support enabled configure arguments: --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --add-module=/root/nginx-auth-ldap/ root@security-monkey-nginx-auth-4e8f:/tmp#
Is this related to any specific version or options built for nginx? Anyone knows any working specs with nginx-ldap-auth?
Thanks!
here is another core dump I encountered by using the latest nginx:
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/share/nginx/sbin/nginx...done. [New LWP 9043] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `nginx: worker process '. Program terminated with signal SIGSEGV, Segmentation fault.
1756 ctx->server = ((ngx_http_auth_ldap_server_t **) conf->servers->elts)[ctx->server_index]; (gdb) bt full
No locals.
alcf = 0x271e340
ctx = 0x27509e0
rc = <optimized out>
rc = <optimized out>
clcf = <optimized out>
rc = <optimized out>
ph = 0x2722be0
cmcf = <optimized out>
cmcf = <optimized out>
c = 0x7f21429e6298
n = <optimized out>
rc = <optimized out>
rv = <optimized out>
host = {len = 7313872, data = 0x400 <error: Cannot access memory at address 0x400>}
c = 0x7f21429e6298
r = 0x274f9d0
q = 0x272bad0
ev = 0x272ba80
flags = <optimized out>
timer = <optimized out>
delta = <optimized out>
worker = 1
on = 1
pid = 0
s = 1
i = 1
live = 1
n = <optimized out>
ch = {command = 2, pid = 9027, slot = 1, fd = -1}
ccf = <optimized out>
title = <optimized out>
p = <optimized out>
size = <optimized out>
i = <optimized out>
n = <optimized out>
sigio = 0
set = {__val = {0 <repeats 16 times>}}
itv = {it_interval = {tv_sec = 40860415, tv_usec = 0}, it_value = {tv_sec = 0, tv_usec = 0}}
live = <optimized out>
delay = 0
ls = <optimized out>
ccf = 0x26f6e90
b = <optimized out>
log = 0x6f69a0 <ngx_log>
i = <optimized out>
cycle = 0x26f5cc0
init_cycle = {conf_ctx = 0x0, pool = 0x26f5780, log = 0x6f69a0 <ngx_log>, new_log = {log_level = 0, file = 0x0, connection = 0, disk_full_time = 0, handler = 0x0, data = 0x0, writer = 0x0, wdata = 0x0, action = 0x0, next = 0x0}, log_use_stderr = 0, files = 0x0,
free_connections = 0x0, free_connection_n = 0, reusable_connections_queue = {prev = 0x0, next = 0x0}, listening = {elts = 0x0, nelts = 0, size = 0, nalloc = 0, pool = 0x0}, paths = {elts = 0x0, nelts = 0, size = 0, nalloc = 0, pool = 0x0}, config_dump = {
elts = 0x0, nelts = 0, size = 0, nalloc = 0, pool = 0x0}, open_files = {last = 0x0, part = {elts = 0x0, nelts = 0, next = 0x0}, size = 0, nalloc = 0, pool = 0x0}, shared_memory = {last = 0x0, part = {elts = 0x0, nelts = 0, next = 0x0}, size = 0, nalloc = 0,
pool = 0x0}, connection_n = 0, files_n = 0, connections = 0x0, read_events = 0x0, write_events = 0x0, old_cycle = 0x0, conf_file = {len = 21, data = 0x4ac991 "/etc/nginx/nginx.conf"}, conf_param = {len = 0, data = 0x0}, conf_prefix = {len = 11,
---Type
still experiencing same issue, has anyone ever solved this?
Still have the same issue after config max_down_retries. If no max_down_retries, it keeps log error message: http_auth_ldap: ldap_result() failed (-1: Can't contact LDAP server)
I have random segfaults in module nginx-auth-ldap Some debug data: nginx -V
/var/log/nginx/error.log:
nginx config:
dbg debugging: