ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ngnix and Linux on UltrasparcII



Igor Sysoev wrote:



Конфиг:

worker_processes  2;
error_log  /var/log/nginx/error.log warn;

events {
  worker_connections  1024;
}

http {
  include      /etc/nginx/mime.types;
  default_type        application/octet-stream;
log_format main '$remote_addr - - [$time_gmt] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
  access_log /var/log/nginx/access.log main;
  sendfile        on;
  server {
      listen       80;
      charset off;
      location / {
          root   /var/www;
          index  index.html index.htm;
      }
      location /doc {
          root /usr/share;
          autoindex on;
          allow 127.0.0.0/8;
          deny all;
      }
}

То есть вроде-бы ни чего криминального - самый простой конфиг.


Нужно получить core и прислать вывод команды bt.

Как получить core не понял, просто протрассировал в gdb:

# /usr/sbin/nginx.debug
# ps ax | grep nginx
14545 ?        Ss     0:00 nginx: master process /usr/sbin/nginx.debug
14546 ?        S      0:00 nginx: worker process

# gdb /usr/sbin/nginx.debug 14546
GNU gdb 6.3.90_20051119-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

Attaching to program: /usr/sbin/nginx.debug, process 14546
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/libpcre.so.3...done.
Loaded symbols for /usr/lib/libpcre.so.3
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.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_ldap.so.2...done.
Loaded symbols for /lib/libnss_ldap.so.2
Reading symbols from /usr/lib/libldap_r.so.2...done.
Loaded symbols for /usr/lib/libldap_r.so.2
Reading symbols from /usr/lib/liblber.so.2...done.
Loaded symbols for /usr/lib/liblber.so.2
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /usr/lib/libsasl2.so.2...done.
Loaded symbols for /usr/lib/libsasl2.so.2
Reading symbols from /usr/lib/libgnutls.so.11...done.
Loaded symbols for /usr/lib/libgnutls.so.11
Reading symbols from /lib/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 14546)]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /usr/lib/libtasn1.so.2...done.
Loaded symbols for /usr/lib/libtasn1.so.2
Reading symbols from /usr/lib/libgcrypt.so.11...done.
Loaded symbols for /usr/lib/libgcrypt.so.11
Reading symbols from /usr/lib/libgpg-error.so.0...done.
Loaded symbols for /usr/lib/libgpg-error.so.0
Reading symbols from /usr/lib/sasl2/libsasldb.so.2...done.
Loaded symbols for /usr/lib/sasl2/libsasldb.so.2
Reading symbols from /usr/lib/libdb-4.2.so...done.
Loaded symbols for /usr/lib/libdb-4.2.so
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
0x7019982c in epoll_wait () from /lib/libc.so.6
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(gdb) g
Ambiguous command "g": gcore, generate-core-file.
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 14546)]
ngx_epoll_process_events (cycle=<value optimized out>, timer=4294967295, flags=1) at src/event/modules/ngx_epoll_module.c:454
454            if (c->fd == -1 || rev->instance != instance) {
(gdb) bt
#0 ngx_epoll_process_events (cycle=<value optimized out>, timer=4294967295, flags=1) at src/event/modules/ngx_epoll_module.c:454 #1 0x0001c59c in ngx_process_events_and_timers (cycle=0x74cb0) at src/event/ngx_event.c:246 #2 0x00023a24 in ngx_worker_process_cycle (cycle=0x74cb0, data=0x0) at src/os/unix/ngx_process_cycle.c:728 #3 0x000216a8 in ngx_spawn_process (cycle=0x74cb0, proc=0x2373c <ngx_worker_process_cycle>, data=0x0, name=0x4efa0 "worker process", respawn=-2) at src/os/unix/ngx_process.c:187 #4 0x00022888 in ngx_start_worker_processes (cycle=0x74cb0, n=1, type=-2) at src/os/unix/ngx_process_cycle.c:327 #5 0x00022e44 in ngx_master_process_cycle (cycle=0x74cb0) at src/os/unix/ngx_process_cycle.c:119 #6 0x00012220 in main (argc=<value optimized out>, argv=0xefcc7b84) at src/core/nginx.c:295
(gdb)

Если что сделал не правильно, то могу переделать - только вопрос как ;-)



Игорь Сысоев
http://sysoev.ru



--
Andrey Chernomyrdin







 




Copyright © Lexa Software, 1996-2009.