Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

healthcheck module coredump #18

Open
honwel opened this issue May 16, 2014 · 1 comment
Open

healthcheck module coredump #18

honwel opened this issue May 16, 2014 · 1 comment

Comments

@honwel
Copy link

honwel commented May 16, 2014

i found coredump file when used ' ./nginx -s reload':

Reading symbols from /usr/lib64/libcrypto.so.10...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libcrypto.so.10
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libfreebl3.so...(no debugging symbols found)...done.
Loaded symbols for /lib64/libfreebl3.so
Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libnss_files.so.2
Reading symbols from /lib64/libnss_dns.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libnss_dns.so.2
Reading symbols from /lib64/libresolv.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libresolv.so.2
Core was generated by `nginx: w'.
Program terminated with signal 11, Segmentation fault.
#0 ngx_rbtree_min (tree=0x6bde20, node=0x1326598) at src/core/ngx_rbtree.h:76

76 while (node->left != sentinel) {
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.107.el6.x86_64 nss-softokn-freebl-3.12.9-11.el6.x86_64 openssl-1.0.0-27.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0 ngx_rbtree_min (tree=0x6bde20, node=0x1326598) at src/core/ngx_rbtree.h:76
#1 ngx_rbtree_delete (tree=0x6bde20, node=0x1326598) at src/core/ngx_rbtree.c:178
#2 0x000000000046c002 in ngx_event_del_timer (log=) at src/event/ngx_event_timer.h:44
#3 ngx_http_healthcheck_clear_events (log=)

at /home/hongwei/CloudListProxy/src/addon/ngx-http-healthcheck-module-0.10/ngx_http_healthcheck_module.c:669

#4 0x000000000046c1ec in ngx_http_healthcheck_mark_finished (stat=0x1326540)

at /home/hongwei/CloudListProxy/src/addon/ngx-http-healthcheck-module-0.10/ngx_http_healthcheck_module.c:318

#5 0x000000000046c57a in ngx_http_healthcheck_read_handler (rev=0x1346720)

at /home/hongwei/CloudListProxy/src/addon/ngx-http-healthcheck-module-0.10/ngx_http_healthcheck_module.c:441

#6 0x0000000000422781 in ngx_epoll_process_events (cycle=0x1303360, timer=, flags=)

at src/event/modules/ngx_epoll_module.c:683

#7 0x000000000041a1f3 in ngx_process_events_and_timers (cycle=0x1303360) at src/event/ngx_event.c:249
#8 0x0000000000421040 in ngx_worker_process_cycle (cycle=0x1303360, data=) at src/os/unix/ngx_process_cycle.c:807
#9 0x000000000041f7cc in ngx_spawn_process (cycle=0x1303360, proc=0x420f4a <ngx_worker_process_cycle>, data=0x0,

name=0x489bdb "worker process", respawn=-4) at src/os/unix/ngx_process.c:198

#10 0x0000000000420498 in ngx_start_worker_processes (cycle=0x1303360, n=1, type=-4) at src/os/unix/ngx_process_cycle.c:362
#11 0x0000000000421db1 in ngx_master_process_cycle (cycle=0x1303360) at src/os/unix/ngx_process_cycle.c:249
#12 0x00000000004049fd in main (argc=, argv=) at src/core/nginx.c:412

(gdb) quit

@honwel
Copy link
Author

honwel commented May 16, 2014

yes , when i adding 4 lines in ngx_http_healthcheck_clear_events(), its looks like solved.

void ngx_http_healthcheck_clear_events(ngx_log_t *log) {
ngx_uint_t i;
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, log, 0,
"healthcheck: Clearing events");

//  Note: From what I can tell it is safe to ngx_del_timer events
//  that are not in the event tree
for (i=0; i<ngx_http_healthchecks_arr->nelts; i++) {
  •    if (ngx_http_healthchecks[i].conf->healthcheck_enabled) {
    
  •        if (ngx_http_healthchecks[i].health_ev.timer_set)
            ngx_del_timer(&ngx_http_healthchecks[i].health_ev);
    
  •        if (ngx_http_healthchecks[i].ownership_ev.timer_set)
            ngx_del_timer(&ngx_http_healthchecks[i].ownership_ev);
    
  •    }
    
    }
    }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant