在用gdb调试正在运行的nginx woker进程时会产生exited on signal 9

由于nginx在运行的时候,用gdb运行nginx的woker进程引起的:

140:/var/log/nginx# ps aux|grep nginx
root     17915  0.0  0.2  40196  1048 ?        Ss   11:25   0:00 nginx: master process /usr/local/nginx/sbin/nginx
www-data 17990  1.1  0.3  40700  1444 ?        S    11:31   0:00 nginx: worker process     
root     18005  0.0  0.2   9724   796 pts/0    S+   11:32   0:00 grep nginx
140:/var/log/nginx# gdb -p 17915
GNU gdb 6.8-debian
Copyright (C) 2008 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".
Attaching to process 17915
Reading symbols from /usr/local/nginx/sbin/nginx...done.
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/libmhash.so.2...done.
Loaded symbols for /usr/lib/libmhash.so.2
Reading symbols from /usr/lib/libpcre.so.3...done.
Loaded symbols for /usr/lib/libpcre.so.3
Reading symbols from /usr/lib/libssl.so.0.9.8...done.
Loaded symbols for /usr/lib/libssl.so.0.9.8
Reading symbols from /usr/lib/libcrypto.so.0.9.8...done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.8
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/libnss_compat.so.2...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libnss_nis.so.2...done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
0x00007f39380c926a in sigsuspend () from /lib/libc.so.6
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/nginx/sbin/nginx
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: still could not bind()
Program exited with code 01.
(gdb) q

 

查看error log

140:/var/log/nginx# tail -n 30 error.log

2010/03/02 11:31:48 [alert] 17915#0: worker process 17916 exited on signal 9
2010/03/02 11:31:48 [emerg] 17991#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2010/03/02 11:31:48 [emerg] 17991#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2010/03/02 11:31:48 [emerg] 17991#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2010/03/02 11:31:48 [emerg] 17991#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2010/03/02 11:31:48 [emerg] 17991#0: bind() to 0.0.0.0:80 failed (98: Address already in use)

你可能感兴趣的:(c,nginx,Signal,2010,X86)