nginx-auth-ldap icon indicating copy to clipboard operation
nginx-auth-ldap copied to clipboard

segmentation fault in module

Open kivarun opened this issue 9 years ago • 8 comments

I have random segfaults in module nginx-auth-ldap Some debug data: nginx -V

nginx version: nginx/1.9.5
built by gcc 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) 
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --add-module=/var/lib/jenkins/workspace/Build_nginx/rpm-build/nginx-1.9.5/nginx-auth-ldap-master

/var/log/nginx/error.log:

2015/10/16 10:33:11 [notice] 1290#0: signal 17 (SIGCHLD) received
2015/10/16 10:33:11 [alert] 1290#0: worker process 2293 exited on signal 11
2015/10/16 10:33:11 [notice] 1290#0: start worker process 59706

nginx config:

http {
.......
      ldap_server ld-ldap {
        url "ldaps://ld-ldap.company.com/dc=company,dc=com?uid?sub?";
        binddn "cn=Manager,dc=company,dc=com";
        binddn_passwd "passwprd";
        group_attribute member;
        group_attribute_is_dn on;
        require valid_user;
      }
      ldap_server ldap {
        url "ldaps://ldap.company.com/dc=company,dc=com?uid?sub?";
        binddn "cn=Manager,dc=company,dc=com";
        binddn_passwd "password";
        group_attribute member;
        group_attribute_is_dn on;
        require valid_user;
      }
.......
server {
.......
    auth_ldap "Forbidden";
    auth_ldap_servers ld-ldap;
    auth_ldap_servers ldap;
.......
    }

dbg debugging:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `nginx: worker process                   '.
Program terminated with signal 11, Segmentation fault.
#0  ngx_http_auth_ldap_return_connection (c=<optimized out>) at /usr/src/debug/nginx-1.9.5/nginx-auth-ldap-master/ngx_http_auth_ldap_module.c:1092
1092            ngx_queue_remove(q);
(gdb) bt
#0  ngx_http_auth_ldap_return_connection (c=<optimized out>) at /usr/src/debug/nginx-1.9.5/nginx-auth-ldap-master/ngx_http_auth_ldap_module.c:1092
#1  0x0000000000497551 in ngx_http_auth_ldap_authenticate (conf=0xe61db0, ctx=0xf032a0, r=0xed5820) at /usr/src/debug/nginx-1.9.5/nginx-auth-ldap-master/ngx_http_auth_ldap_module.c:1797
#2  ngx_http_auth_ldap_handler (r=0xed5820) at /usr/src/debug/nginx-1.9.5/nginx-auth-ldap-master/ngx_http_auth_ldap_module.c:1612
#3  0x0000000000437d6b in ngx_http_core_access_phase (r=<optimized out>, ph=0xe6aa88) at src/http/ngx_http_core_module.c:1066
#4  0x00000000004334e5 in ngx_http_core_run_phases (r=0xed5820) at src/http/ngx_http_core_module.c:840
#5  0x0000000000496324 in ngx_http_auth_ldap_read_handler (rev=0xea5870) at /usr/src/debug/nginx-1.9.5/nginx-auth-ldap-master/ngx_http_auth_ldap_module.c:1410
#6  0x00000000004295a7 in ngx_epoll_process_events (cycle=<optimized out>, timer=<optimized out>, flags=<optimized out>) at src/event/modules/ngx_epoll_module.c:822
#7  0x0000000000421b03 in ngx_process_events_and_timers (cycle=cycle@entry=0xe3b880) at src/event/ngx_event.c:242
#8  0x00000000004276c1 in ngx_worker_process_cycle (cycle=cycle@entry=0xe3b880, data=data@entry=0x0) at src/os/unix/ngx_process_cycle.c:753
#9  0x0000000000426104 in ngx_spawn_process (cycle=cycle@entry=0xe3b880, proc=0x427640 <ngx_worker_process_cycle>, data=0x0, name=0x49c106 "worker process", respawn=respawn@entry=0)
    at src/os/unix/ngx_process.c:198
#10 0x0000000000428832 in ngx_reap_children (cycle=0xe3b880) at src/os/unix/ngx_process_cycle.c:621
#11 ngx_master_process_cycle (cycle=cycle@entry=0xe3b880) at src/os/unix/ngx_process_cycle.c:174
#12 0x0000000000407b0f in main (argc=<optimized out>, argv=<optimized out>) at src/core/nginx.c:415
(gdb) bt full 
#0  ngx_http_auth_ldap_return_connection (c=<optimized out>) at /usr/src/debug/nginx-1.9.5/nginx-auth-ldap-master/ngx_http_auth_ldap_module.c:1092
        q = 0xed5950
#1  0x0000000000497551 in ngx_http_auth_ldap_authenticate (conf=0xe61db0, ctx=0xf032a0, r=0xed5820) at /usr/src/debug/nginx-1.9.5/nginx-auth-ldap-master/ngx_http_auth_ldap_module.c:1797
No locals.
#2  ngx_http_auth_ldap_handler (r=0xed5820) at /usr/src/debug/nginx-1.9.5/nginx-auth-ldap-master/ngx_http_auth_ldap_module.c:1612
        alcf = 0xe61db0
        ctx = 0xf032a0
        rc = <optimized out>
#3  0x0000000000437d6b in ngx_http_core_access_phase (r=<optimized out>, ph=0xe6aa88) at src/http/ngx_http_core_module.c:1066
        rc = <optimized out>
        clcf = <optimized out>
#4  0x00000000004334e5 in ngx_http_core_run_phases (r=0xed5820) at src/http/ngx_http_core_module.c:840
        rc = <optimized out>
        ph = 0xe6a9c8
        cmcf = <optimized out>
#5  0x0000000000496324 in ngx_http_auth_ldap_read_handler (rev=0xea5870) at /usr/src/debug/nginx-1.9.5/nginx-auth-ldap-master/ngx_http_auth_ldap_module.c:1410
        conn = 0xe6f950
        c = 0xe6acf0
        rc = 0
        timeout = {tv_sec = 0, tv_usec = 0}
        result = 0xf14630
        error_code = 0
        error_msg = 0x0
        dn = <optimized out>
#6  0x00000000004295a7 in ngx_epoll_process_events (cycle=<optimized out>, timer=<optimized out>, flags=<optimized out>) at src/event/modules/ngx_epoll_module.c:822
        events = 1
        revents = 5
        instance = <optimized out>
        i = 0
        level = <optimized out>
        err = <optimized out>
        rev = <optimized out>
        wev = <optimized out>
        queue = <optimized out>
        c = 0xe6f950
#7  0x0000000000421b03 in ngx_process_events_and_timers (cycle=cycle@entry=0xe3b880) at src/event/ngx_event.c:242
        flags = <optimized out>
        timer = <optimized out>
        delta = 1444917074915
#8  0x00000000004276c1 in ngx_worker_process_cycle (cycle=cycle@entry=0xe3b880, data=data@entry=0x0) at src/os/unix/ngx_process_cycle.c:753
        worker = 0
#9  0x0000000000426104 in ngx_spawn_process (cycle=cycle@entry=0xe3b880, proc=0x427640 <ngx_worker_process_cycle>, data=0x0, name=0x49c106 "worker process", respawn=respawn@entry=0)
    at src/os/unix/ngx_process.c:198
        on = 1
        pid = 0
        s = 0
#10 0x0000000000428832 in ngx_reap_children (cycle=0xe3b880) at src/os/unix/ngx_process_cycle.c:621
        i = 0
        live = 0
        n = <optimized out>
        ch = {command = 2, pid = 63681, slot = 0, fd = -1}
        ccf = <optimized out>
#11 ngx_master_process_cycle (cycle=cycle@entry=0xe3b880) at src/os/unix/ngx_process_cycle.c:174
        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 = 9, tv_usec = 18}, it_value = {tv_sec = 14929147, tv_usec = 0}}
        live = <optimized out>
        delay = 0
        ls = <optimized out>
        ccf = 0xe3ca40
#12 0x0000000000407b0f in main (argc=<optimized out>, argv=<optimized out>) at src/core/nginx.c:415
        b = <optimized out>
        log = 0x6d50a0 <ngx_log>
        i = <optimized out>
        cycle = 0xe3b880
        init_cycle = {conf_ctx = 0x0, pool = 0xe3b340, log = 0x6d50a0 <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 = 0x7fff9ab5df8a "ss"}, conf_param = {len = 0, data = 0x0}, conf_prefix = {len = 11, data = 0x7fff9ab5df8a "ss"}, 
          prefix = {len = 11, data = 0x498ae1 "/etc/nginx/"}, lock_file = {len = 0, data = 0x0}, hostname = {len = 0, data = 0x0}}
        cd = <optimized out>
        ccf = <optimized out>

kivarun avatar Oct 16 '15 07:10 kivarun

@kivarun Do you think this may be related to my errors reported in #99?

augustf avatar Oct 22 '15 17:10 augustf

@augustf I think that we can find out if you make coredump analiz.

kivarun avatar Oct 23 '15 06:10 kivarun

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

hardillb avatar Feb 01 '16 13:02 hardillb

+1 #0 0x0000000000482729 in ngx_http_auth_ldap_return_connection (c=0x2588900) at /opt/app/software/nginx/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1103 #1 0x00000000004854dc in ngx_http_auth_ldap_authenticate (conf=, ctx=0x2714878, r=0x2713a80) at /opt/app/software/nginx/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1861 #2 ngx_http_auth_ldap_handler (r=0x2713a80) at /opt/app/software/nginx/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1676 #3 0x0000000000437dd0 in ngx_http_core_access_phase (r=, ph=0x2588188) at src/http/ngx_http_core_module.c:1066 #4 0x0000000000433b33 in ngx_http_core_run_phases (r=r@entry=0x2713a80) at src/http/ngx_http_core_module.c:840 #5 0x000000000048266d in ngx_http_auth_ldap_wake_request (r=0x2713a80) at /opt/app/software/nginx/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1049 #6 0x00000000004827fa in ngx_http_auth_ldap_reply_connection (c=c@entry=0x2588900, error_code=0, error_msg=) at /opt/app/software/nginx/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1127 #7 0x0000000000486211 in ngx_http_auth_ldap_read_handler (rev=0x25906b0) at /opt/app/software/nginx/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1445 #8 0x0000000000429bb1 in ngx_epoll_process_events (cycle=0x253f7d0, timer=, flags=) at src/event/modules/ngx_epoll_module.c:822 #9 0x0000000000420d6e in ngx_process_events_and_timers (cycle=cycle@entry=0x253f7d0) at src/event/ngx_event.c:242 #10 0x0000000000427bd8 in ngx_worker_process_cycle (cycle=0x253f7d0, data=) at src/os/unix/ngx_process_cycle.c:753 #11 0x00000000004262c2 in ngx_spawn_process (cycle=cycle@entry=0x253f7d0, proc=0x427b35 <ngx_worker_process_cycle>, data=0x0, name=0x48b23e "worker process", respawn=respawn@entry=0) at src/os/unix/ngx_process.c:198 #12 0x00000000004288d9 in ngx_reap_children (cycle=0x253f7d0) at src/os/unix/ngx_process_cycle.c:621 #13 ngx_master_process_cycle (cycle=cycle@entry=0x253f7d0) at src/os/unix/ngx_process_cycle.c:174 #14 0x000000000040845a in main (argc=, argv=) at src/core/nginx.c:359

henkwiedig avatar Mar 21 '16 12:03 henkwiedig

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. #0 ngx_http_auth_ldap_authenticate (conf=0x1df47c8, ctx=0x1e39320, r=0x1e38340) at /root/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1756 1756 ctx->server = ((ngx_http_auth_ldap_server_t **) conf->servers->elts)[ctx->server_index]; (gdb) backtrace full #0 ngx_http_auth_ldap_authenticate (conf=0x1df47c8, ctx=0x1e39320, r=0x1e38340) at /root/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1756 No locals. #1 ngx_http_auth_ldap_handler (r=0x1e38340) at /root/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1717 alcf = 0x1df47c8 ctx = 0x1e39320 rc = #2 0x0000000000437404 in ngx_http_core_access_phase (r=, ph=0x1df8e38) at src/http/ngx_http_core_module.c:1114 rc = clcf = #3 0x0000000000432c55 in ngx_http_core_run_phases (r=r@entry=0x1e38340) at src/http/ngx_http_core_module.c:888 rc = ph = 0x1df8d78 cmcf = #4 0x0000000000432d3d in ngx_http_handler (r=r@entry=0x1e38340) at src/http/ngx_http_core_module.c:871 cmcf = #5 0x000000000043e574 in ngx_http_process_request (r=0x1e38340) at src/http/ngx_http_request.c:1828 c = 0x7f28e9714250 #6 0x000000000043ef66 in ngx_http_process_request_line (rev=0x1e03d58) at src/http/ngx_http_request.c:940 n = rc = rv = 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 #7 0x0000000000420b58 in ngx_event_process_posted (cycle=cycle@entry=0x1dd2d30, posted=0x6dd880 <ngx_posted_events>) at src/event/ngx_event_posted.c:40 ev = 0x1e03d58 #8 0x00000000004206c2 in ngx_process_events_and_timers (cycle=cycle@entry=0x1dd2d30) at src/event/ngx_event.c:276 flags = timer = delta = #9 0x000000000042762a in ngx_worker_process_cycle (cycle=cycle@entry=0x1dd2d30, data=data@entry=0x2) at src/os/unix/ngx_process_cycle.c:807 worker = 2 i = c = #10 0x00000000004260d0 in ngx_spawn_process (cycle=cycle@entry=0x1dd2d30, proc=proc@entry=0x427570 <ngx_worker_process_cycle>, data=data@entry=0x2, name=name@entry=0x49f1ae "worker process", respawn=respawn@entry=-3) at src/os/unix/ngx_process.c:198 on = 1 pid = 0 s = 2 #11 0x000000000042785c in ngx_start_worker_processes (cycle=cycle@entry=0x1dd2d30, n=4, type=type@entry=-3) at src/os/unix/ngx_process_cycle.c:362 i = 2 ch = {command = 1, pid = 10029, slot = 1, fd = 10} #12 0x000000000042853c in ngx_master_process_cycle (cycle=cycle@entry=0x1dd2d30) at src/os/unix/ngx_process_cycle.c:136 ---Type to continue, or q to quit---q Quit (gdb) q root@security-monkey-nginx-auth-4e8f:/tmp#

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!

westlifezs avatar Jun 09 '16 01:06 westlifezs

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. #0 ngx_http_auth_ldap_authenticate (conf=0x271e340, ctx=0x27509e0, r=0x274f9d0) at /root/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1756 1756 ctx->server = ((ngx_http_auth_ldap_server_t **) conf->servers->elts)[ctx->server_index]; (gdb) bt full #0 ngx_http_auth_ldap_authenticate (conf=0x271e340, ctx=0x27509e0, r=0x274f9d0) at /root/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1756 No locals. #1 ngx_http_auth_ldap_handler (r=0x274f9d0) at /root/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1717 alcf = 0x271e340 ctx = 0x27509e0 rc = #2 0x000000000043c8e4 in ngx_http_core_access_phase (r=, ph=0x2722ca0) at src/http/ngx_http_core_module.c:1066 rc = clcf = #3 0x0000000000438005 in ngx_http_core_run_phases (r=r@entry=0x274f9d0) at src/http/ngx_http_core_module.c:840 rc = ph = 0x2722be0 cmcf = #4 0x00000000004380f4 in ngx_http_handler (r=r@entry=0x274f9d0) at src/http/ngx_http_core_module.c:823 cmcf = #5 0x0000000000443cb3 in ngx_http_process_request (r=0x274f9d0) at src/http/ngx_http_request.c:1911 c = 0x7f21429e6298 #6 0x0000000000444676 in ngx_http_process_request_line (rev=0x272ba80) at src/http/ngx_http_request.c:1022 n = rc = rv = host = {len = 7313872, data = 0x400 <error: Cannot access memory at address 0x400>} c = 0x7f21429e6298 r = 0x274f9d0 #7 0x0000000000424c63 in ngx_event_process_posted (cycle=cycle@entry=0x26f5cc0, posted=0x6f99d0 <ngx_posted_events>) at src/event/ngx_event_posted.c:33 q = 0x272bad0 ev = 0x272ba80 #8 0x000000000042476b in ngx_process_events_and_timers (cycle=cycle@entry=0x26f5cc0) at src/event/ngx_event.c:259 flags = timer = delta = #9 0x000000000042b285 in ngx_worker_process_cycle (cycle=cycle@entry=0x26f5cc0, data=data@entry=0x1) at src/os/unix/ngx_process_cycle.c:753 worker = 1 #10 0x0000000000429d50 in ngx_spawn_process (cycle=cycle@entry=0x26f5cc0, proc=0x42b240 <ngx_worker_process_cycle>, data=0x1, name=0x4b0b96 "worker process", respawn=respawn@entry=1) at src/os/unix/ngx_process.c:198 on = 1 pid = 0 s = 1 #11 0x000000000042c766 in ngx_reap_children (cycle=0x26f5cc0) at src/os/unix/ngx_process_cycle.c:621 i = 1 live = 1 n = ch = {command = 2, pid = 9027, slot = 1, fd = -1} ccf = #12 ngx_master_process_cycle (cycle=cycle@entry=0x26f5cc0) at src/os/unix/ngx_process_cycle.c:174 title = p = size = i = n = 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 = delay = 0 ls = ccf = 0x26f6e90 #13 0x0000000000408fcf in main (argc=, argv=) at src/core/nginx.c:359 b = log = 0x6f69a0 <ngx_log> i = 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 to continue, or q to quit--- data = 0x4ac991 "/etc/nginx/nginx.conf"}, prefix = {len = 17, data = 0x4ac97f "/usr/share/nginx/"}, lock_file = {len = 0, data = 0x0}, hostname = {len = 0, data = 0x0}} cd = ccf =

westlifezs avatar Jun 09 '16 16:06 westlifezs

still experiencing same issue, has anyone ever solved this?

davidk81 avatar Nov 05 '18 02:11 davidk81

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)

hailin84 avatar Jun 14 '23 10:06 hailin84