nginx worker process hang,cpu load 100%

Long Wan nginx-forum at nginx.us
Mon Nov 14 01:28:49 UTC 2011


Hello Maxim,Thanks for your reply, I tried gdb as you tolde me , it
reported something :


[root at host-22 ~]# gdb /usr/local/nginx/sbin/nginx 1130
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 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-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/nginx/sbin/nginx...done.
Attaching to program: /usr/local/nginx/sbin/nginx, process 1130
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols
found)...done.
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/libcrypt.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /lib64/libpcre.so.0...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libpcre.so.0
Reading symbols from /lib64/libssl.so.6...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libssl.so.6
Reading symbols from /lib64/libcrypto.so.6...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libcrypto.so.6
Reading symbols from /lib64/libdl.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /usr/lib64/libz.so.1...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib64/libz.so.1
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 /usr/lib64/libgssapi_krb5.so.2...(no debugging
symbols found)...done.
Loaded symbols for /usr/lib64/libgssapi_krb5.so.2
Reading symbols from /usr/lib64/libkrb5.so.3...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib64/libkrb5.so.3
Reading symbols from /lib64/libcom_err.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libcom_err.so.2
Reading symbols from /usr/lib64/libk5crypto.so.3...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib64/libk5crypto.so.3
Reading symbols from /usr/lib64/libkrb5support.so.0...(no debugging
symbols found)...done.
Loaded symbols for /usr/lib64/libkrb5support.so.0
Reading symbols from /lib64/libkeyutils.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libkeyutils.so.1
Reading symbols from /lib64/libresolv.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /lib64/libselinux.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libselinux.so.1
Reading symbols from /lib64/libsepol.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libsepol.so.1
Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libnss_files.so.2
ngx_http_upstream_get_round_robin_peer (pc=0x78166f0, data=<value
optimized out>) at src/http/ngx_http_upstream_round_robin.c:413
413     src/http/ngx_http_upstream_round_robin.c: No such file or
directory.
        in src/http/ngx_http_upstream_round_robin.c
(gdb) bt
#0  ngx_http_upstream_get_round_robin_peer (pc=0x78166f0, data=<value
optimized out>) at src/http/ngx_http_upstream_round_robin.c:413
#1  0x000000000041a8fc in ngx_event_connect_peer (pc=0x78166f0) at
src/event/ngx_event_connect.c:24
#2  0x000000000043d1e8 in ngx_http_upstream_connect (r=0x7cf6310,
u=0x78166e0) at src/http/ngx_http_upstream.c:1089
#3  0x000000000043ea3a in ngx_http_upstream_init_request (r=0x7cf6310)
at src/http/ngx_http_upstream.c:628
#4  0x0000000000435185 in ngx_http_read_client_request_body
(r=0x7cf6310, post_handler=0x43eec0 <ngx_http_upstream_init>)
    at src/http/ngx_http_request_body.c:153
#5  0x0000000000456b46 in ngx_http_proxy_handler (r=0x7cf6310) at
src/http/modules/ngx_http_proxy_module.c:617
#6  0x000000000042b15c in ngx_http_core_content_phase (r=0x7cf6310,
ph=0x7b5a4e0) at src/http/ngx_http_core_module.c:1339
#7  0x0000000000426817 in ngx_http_core_run_phases (r=0x7cf6310) at
src/http/ngx_http_core_module.c:837
#8  0x000000000042f6d6 in ngx_http_process_request (r=0x7cf6310) at
src/http/ngx_http_request.c:1650
#9  0x0000000000430314 in ngx_http_process_request_line (rev=0x7c65578)
at src/http/ngx_http_request.c:893
#10 0x0000000000420a04 in ngx_epoll_process_events (cycle=<value
optimized out>, timer=<value optimized out>, flags=<value optimized
out>)
    at src/event/modules/ngx_epoll_module.c:635
#11 0x0000000000419bad in ngx_process_events_and_timers
(cycle=0x784e770) at src/event/ngx_event.c:245
#12 0x000000000041f528 in ngx_worker_process_cycle (cycle=0x784e770,
data=<value optimized out>) at src/os/unix/ngx_process_cycle.c:800
#13 0x000000000041dc89 in ngx_spawn_process (cycle=0x784e770,
proc=0x41f470 <ngx_worker_process_cycle>, data=0x0, name=0x4652e1
"worker process", 
    respawn=-4) at src/os/unix/ngx_process.c:196
#14 0x000000000041eb0b in ngx_start_worker_processes (cycle=0x784e770,
n=8, type=-4) at src/os/unix/ngx_process_cycle.c:360
#15 0x000000000041fea8 in ngx_master_process_cycle (cycle=0x784e770) at
src/os/unix/ngx_process_cycle.c:249
#16 0x0000000000406069 in main (argc=1, argv=<value optimized out>) at
src/core/nginx.c:405
(gdb) n

there is no output when type 'n', should i recompile nginx with
'--with-debug' configure option ?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,218259,218280#msg-218280



More information about the nginx mailing list