ПРОЕКТЫ 


  АРХИВ 


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]

nginx & core dump 3


  • To: nginx-ru@xxxxxxxxx
  • Subject: nginx & core dump 3
  • From: "ak84" <nginx-forum@xxxxxxxx>
  • Date: Mon, 29 Oct 2012 18:13:28 -0400
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tigger.jlkhosting.com; s=x; h=Date:Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=sZdR6zIy+yXv/sKm99oMhwbKEonGlOeQk99j/KGyWDE=; b=ZFA2w/w1SoWiBcKFdeI2h1XZjYZOADXbZ8FDjFQuqq2cXEwyWhM5wfRgECSn3haxbMHKq9yc7KuCm1027DjEy299lPq3GO8OP3/lEksluY9WCrS42Dtxc2QV53XzpPlz;

Добый день.

В этой теме http://forum.nginx.org/read.php?21,231434 выяснили, что core
dump может возникать из-за некорректного использования if и set
nginx обновлён:
nginx version: nginx/1.2.4
TLS SNI support enabled
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt='-I
/usr/local/include' --with-ld-opt='-L /usr/local/lib'
--conf-path=/usr/local/etc/nginx/nginx.conf
--sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid
--error-log-path=/var/log/nginx-error.log --user=www --group=www
--with-debug --http-client-body-temp-path=/var/tmp/nginx/client_body_temp
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp
--http-proxy-temp-path=/var/tmp/nginx/proxy_temp
--http-scgi-temp-path=/var/tmp/nginx/scgi_temp
--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp
--http-log-path=/var/log/nginx-access.log
--add-module=/usr/ports/www/nginx/work/agentzh-headers-more-nginx-module-6586984
--with-http_image_filter_module
--add-module=/usr/ports/www/nginx/work/yaoweibin-ngx_http_substitutions_filter_module-27a01b3
--with-http_stub_status_module --with-pcre --with-http_ssl_module


Поправил конфиги, core dump'ов стало меньше, но появляются следующе
сообщения:

По top'у видно, что память отъедает nginx

pid 9123 (nginx), uid 80: exited on signal 11
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(8): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(5): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(5): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(5): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(5): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(5): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(5): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(5): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(5): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(9): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(3): failed
swap_pager_getswapspace(3): failed
pid 9139 (nginx), uid 80, was killed: out of swap space
pid 5248 (nginx), uid 80: exited on signal 11
pid 14513 (nginx), uid 80: exited on signal 10 (core dumped)
pid 14287 (nginx), uid 80: exited on signal 11
pid 20986 (nginx), uid 80: exited on signal 11
pid 14289 (nginx), uid 80: exited on signal 11
pid 32879 (nginx), uid 80: exited on signal 11
pid 32881 (nginx), uid 80: exited on signal 11
pid 37883 (nginx), uid 80: exited on signal 11
pid 32878 (nginx), uid 80: exited on signal 10 (core dumped)
pid 32880 (nginx), uid 80: exited on signal 11
pid 37880 (nginx), uid 80: exited on signal 11
pid 64793 (nginx), uid 80: exited on signal 11 (core dumped)


Как можно выяснить, почему отъедается память и почему nginx падает в корку?

Пример bt ( signal 10):
 gdb /usr/local/sbin/nginx nginx.core.32878 
GNU gdb 6.1.1 [FreeBSD]
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 "amd64-marcel-freebsd"...
Core was generated by `nginx'.
Program terminated with signal 10, Bus error.
Reading symbols from /lib/libcrypt.so.5...done.
Loaded symbols for /lib/libcrypt.so.5
Reading symbols from /usr/local/lib/libpcre.so.1...done.
Loaded symbols for /usr/local/lib/libpcre.so.1
Reading symbols from /usr/lib/libssl.so.6...done.
Loaded symbols for /usr/lib/libssl.so.6
Reading symbols from /lib/libcrypto.so.6...done.
Loaded symbols for /lib/libcrypto.so.6
Reading symbols from /lib/libz.so.5...done.
Loaded symbols for /lib/libz.so.5
Reading symbols from /usr/local/lib/libgd.so.4...done.
Loaded symbols for /usr/local/lib/libgd.so.4
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/libfontconfig.so.1...done.
Loaded symbols for /usr/local/lib/libfontconfig.so.1
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /usr/local/lib/libpng15.so.15...done.
Loaded symbols for /usr/local/lib/libpng15.so.15
Reading symbols from /usr/local/lib/libjpeg.so.11...done.
Loaded symbols for /usr/local/lib/libjpeg.so.11
Reading symbols from /usr/local/lib/libfreetype.so.9...done.
Loaded symbols for /usr/local/lib/libfreetype.so.9
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libthr.so.3...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /usr/lib/libbz2.so.4...done.
Loaded symbols for /usr/lib/libbz2.so.4
Reading symbols from /usr/local/lib/libexpat.so.6...done.
Loaded symbols for /usr/local/lib/libexpat.so.6
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x00000008010c8790 in memcpy () from /lib/libc.so.7
[New Thread 801e041c0 (LWP 104625)]
[New LWP 100667]

(gdb) bt
#0  0x00000008010c8790 in memcpy () from /lib/libc.so.7
#1  0x000000000049efa4 in ngx_http_proxy_create_request (r=0x801f8de00) at
src/http/modules/ngx_http_proxy_module.c:1174
#2  0x0000000000468b91 in ngx_http_upstream_init_request (r=0x801f8de00) at
src/http/ngx_http_upstream.c:505
#3  0x0000000000468924 in ngx_http_upstream_init (r=0x801f8de00) at
src/http/ngx_http_upstream.c:446
#4  0x000000000045eca3 in ngx_http_read_client_request_body (r=0x801f8de00,
post_handler=0x468840 <ngx_http_upstream_init>) at
src/http/ngx_http_request_body.c:59
#5  0x000000000049d9dc in ngx_http_proxy_handler (r=0x801f8de00) at
src/http/modules/ngx_http_proxy_module.c:702
#6  0x00000000004469cd in ngx_http_core_content_phase (r=0x801f8de00,
ph=0x802079780) at src/http/ngx_http_core_module.c:1396
#7  0x0000000000445502 in ngx_http_core_run_phases (r=0x801f8de00) at
src/http/ngx_http_core_module.c:877
#8  0x000000000044547d in ngx_http_handler (r=0x801f8de00) at
src/http/ngx_http_core_module.c:860
#9  0x0000000000453d94 in ngx_http_process_request (r=0x801f8de00) at
src/http/ngx_http_request.c:1685
#10 0x0000000000452795 in ngx_http_process_request_headers (rev=0x804a138d0)
at src/http/ngx_http_request.c:1135
#11 0x0000000000451f26 in ngx_http_process_request_line (rev=0x804a138d0) at
src/http/ngx_http_request.c:933
#12 0x0000000000451128 in ngx_http_init_request (rev=0x804a138d0) at
src/http/ngx_http_request.c:519
#13 0x000000000042d47c in ngx_event_process_posted (cycle=0x801e55050,
posted=0x5f0a60) at src/event/ngx_event_posted.c:40
#14 0x000000000042af25 in ngx_process_events_and_timers (cycle=0x801e55050)
at src/event/ngx_event.c:274
#15 0x0000000000438264 in ngx_worker_process_cycle (cycle=0x801e55050,
data=0x0) at src/os/unix/ngx_process_cycle.c:808
#16 0x0000000000435261 in ngx_spawn_process (cycle=0x801e55050,
proc=0x438070 <ngx_worker_process_cycle>, data=0x0, name=0x4c1869 "worker
process", respawn=-4)
    at src/os/unix/ngx_process.c:198
#17 0x00000000004370ca in ngx_start_worker_processes (cycle=0x801e55050,
n=4, type=-4) at src/os/unix/ngx_process_cycle.c:365
#18 0x0000000000436c92 in ngx_master_process_cycle (cycle=0x801e55050) at
src/os/unix/ngx_process_cycle.c:250
#19 0x00000000004066d3 in main (argc=1, argv=0x7fffffffed68) at
src/core/nginx.c:410

bt full:
#0  0x00000008010c8790 in memcpy () from /lib/libc.so.7
No symbol table info available.
#1  0x000000000049efa4 in ngx_http_proxy_create_request (r=0x801f8de00) at
src/http/modules/ngx_http_proxy_module.c:1174
        len = 17
        uri_len = 20
        loc_len = 0
        body_len = 0
        escape = 0
        b = (ngx_buf_t *) 0x802228f88
        method = {len = 4, data = 0x801e4dc00 "GET /images/menu.png
HTTP/1.0\r\nX-Real-Remote-Addr"}
        i = 0
        unparsed_uri = 1
        cl = (ngx_chain_t *) 0x802228fd8
        body = (ngx_chain_t *) 0x0
        part = (ngx_list_part_t *) 0x802228c68
        header = (ngx_table_elt_t *) 0x802278050
        u = (ngx_http_upstream_t *) 0x8022783e0
        ctx = (ngx_http_proxy_ctx_t *) 0x802228db8
        code = 0x465e70 <ngx_http_script_copy_code>
        e = {ip = 0x8027f86a8 "220; smartphone; sda/1.0 profile/midp-2.0
configuration/cldc-1.1)", 
  pos = 0x80227879e "X-Real-Remote-Addr: 192.168.0.10\r\nX-Forwarded-For:
192.168.0.10\r\nX-LAC: 1E82\r\nX-CI: 13F5\r\nX-3GPP-SGSN-MCC-MNC:
10002\r\nAccept: application/vnd.wap.wmlscriptc, text/vnd.wap.wml,
applic"..., sp = 0x0, buf = {len = 0, data = 0x0}, line = {len = 0, data =
0x0}, args = 0x0, flushed = 1, 
  skip = 0, quote = 0, is_args = 0, log = 0, status = 0, request =
0x801f8de00}
        le = {ip = 0x8027f8928 "", pos = 0x21b1e75 <Address 0x21b1e75 out of
bounds>, sp = 0x1, buf = {len = 0, data = 0x800000000 <Address 0x800000000
out of bounds>}, 
  line = {len = 1431655766, data = 0x0}, args = 0x0, flushed = 1, skip = 0,
quote = 0, is_args = 0, log = 0, status = 34391514115, request =
0x801f8de00}
        plcf = (ngx_http_proxy_loc_conf_t *) 0x8025f36f0
        lcode = 0x465e40 <ngx_http_script_copy_len_code>
#2  0x0000000000468b91 in ngx_http_upstream_init_request (r=0x801f8de00) at
src/http/ngx_http_upstream.c:505
        host = (ngx_str_t *) 0x801ef2000
        i = 34426990232
        ctx = (ngx_resolver_ctx_t *) 0x7fffffffe570
        temp = {next = 0x0, resolver = 0x0, udp_connection = 0x0, ident =
140737488348416, state = 34399257320, type = 2, name = {len =
140737488348512, 
    data = 0x7fffffffed78 "f????\177"}, naddrs = 97, addrs = 0x78, addr =
4294967273, handler = 0xe, data = 0x0, timeout = 37, quick =
18446744073709551614, 
  recursion = 34443704528, event = 0x7fffffffe570}
        cln = (ngx_http_cleanup_t *) 0x43af3a
        u = (ngx_http_upstream_t *) 0x8022783e0
        clcf = (ngx_http_core_loc_conf_t *) 0x20
        uscf = (ngx_http_upstream_srv_conf_t *) 0xfffffffffffffffe
        uscfp = (ngx_http_upstream_srv_conf_t **) 0x8050138d0
        umcf = (ngx_http_upstream_main_conf_t *) 0x802228f58
#3  0x0000000000468924 in ngx_http_upstream_init (r=0x801f8de00) at
src/http/ngx_http_upstream.c:446
        c = (ngx_connection_t *) 0x804022e98
#4  0x000000000045eca3 in ngx_http_read_client_request_body (r=0x801f8de00,
post_handler=0x468840 <ngx_http_upstream_init>) at
src/http/ngx_http_request_body.c:59
        preread = 34395553792
        size = 34395557464
        b = (ngx_buf_t *) 0x802228000
        cl = (ngx_chain_t *) 0x7fffffffe620
        next = (ngx_chain_t **) 0x40996a
---Type <return> to continue, or q <return> to quit---
        tf = (ngx_temp_file_t *) 0x100
        rb = (ngx_http_request_body_t *) 0x802228f58
        clcf = (ngx_http_core_loc_conf_t *) 0x0
#5  0x000000000049d9dc in ngx_http_proxy_handler (r=0x801f8de00) at
src/http/modules/ngx_http_proxy_module.c:702
        rc = 34391556280
        u = (ngx_http_upstream_t *) 0x8022783e0
        ctx = (ngx_http_proxy_ctx_t *) 0x802228db8
        plcf = (ngx_http_proxy_loc_conf_t *) 0x8025f36f0
#6  0x00000000004469cd in ngx_http_core_content_phase (r=0x801f8de00,
ph=0x802079780) at src/http/ngx_http_core_module.c:1396
        root = 18446744073709551611
        rc = 0
        path = {len = 34393790312, data = 0x801f8de00 "HTTP"}
#7  0x0000000000445502 in ngx_http_core_run_phases (r=0x801f8de00) at
src/http/ngx_http_core_module.c:877
        rc = -2
        ph = (ngx_http_phase_handler_t *) 0x802079690
        cmcf = (ngx_http_core_main_conf_t *) 0x801e567a0
#8  0x000000000044547d in ngx_http_handler (r=0x801f8de00) at
src/http/ngx_http_core_module.c:860
        cmcf = (ngx_http_core_main_conf_t *) 0x804a138d0
#9  0x0000000000453d94 in ngx_http_process_request (r=0x801f8de00) at
src/http/ngx_http_request.c:1685
        c = (ngx_connection_t *) 0x804022e98
#10 0x0000000000452795 in ngx_http_process_request_headers (rev=0x804a138d0)
at src/http/ngx_http_request.c:1135
        p = (u_char *) 0x10 <Address 0x10 out of bounds>
        len = 34395553792
        n = 281
        rc = 0
        rv = 0
        h = (ngx_table_elt_t *) 0x802278020
        c = (ngx_connection_t *) 0x804022e98
        hh = (ngx_http_header_t *) 0x0
        r = (ngx_http_request_t *) 0x801f8de00
        cscf = (ngx_http_core_srv_conf_t *) 0x8021cd078
        cmcf = (ngx_http_core_main_conf_t *) 0x801e567a0
#11 0x0000000000451f26 in ngx_http_process_request_line (rev=0x804a138d0) at
src/http/ngx_http_request.c:933
        host = (u_char *) 0x802228000 "?\217\"\002\b"
        n = 1024
        rc = 0
        rv = 560
        c = (ngx_connection_t *) 0x804022e98
        r = (ngx_http_request_t *) 0x801f8de00
        cscf = (ngx_http_core_srv_conf_t *) 0x802228568
#12 0x0000000000451128 in ngx_http_init_request (rev=0x804a138d0) at
src/http/ngx_http_request.c:519
        tp = (ngx_time_t *) 0x5ee5e0
        i = 34359738384
        c = (ngx_connection_t *) 0x804022e98
        r = (ngx_http_request_t *) 0x801f8de00
        sin = (struct sockaddr_in *) 0x218021c5020
        port = (ngx_http_port_t *) 0x80207afd0
        addr = (ngx_http_in_addr_t *) 0x80207afe0
---Type <return> to continue, or q <return> to quit---
        ctx = (ngx_http_log_ctx_t *) 0x802158fa0
        addr_conf = (ngx_http_addr_conf_t *) 0x80207afe8
        hc = (ngx_http_connection_t *) 0x802158fb8
        cscf = (ngx_http_core_srv_conf_t *) 0x8021cd078
        clcf = (ngx_http_core_loc_conf_t *) 0x8021cd110
        cmcf = (ngx_http_core_main_conf_t *) 0x801e567a0
#13 0x000000000042d47c in ngx_event_process_posted (cycle=0x801e55050,
posted=0x5f0a60) at src/event/ngx_event_posted.c:40
        ev = (ngx_event_t *) 0x804a138d0
#14 0x000000000042af25 in ngx_process_events_and_timers (cycle=0x801e55050)
at src/event/ngx_event.c:274
        flags = 2
        timer = 18446744073709551615
        delta = 0
#15 0x0000000000438264 in ngx_worker_process_cycle (cycle=0x801e55050,
data=0x0) at src/os/unix/ngx_process_cycle.c:808
        i = 1
        c = (ngx_connection_t *) 0x7fffffffe9e0
#16 0x0000000000435261 in ngx_spawn_process (cycle=0x801e55050,
proc=0x438070 <ngx_worker_process_cycle>, data=0x0, name=0x4c1869 "worker
process", respawn=-4)
    at src/os/unix/ngx_process.c:198
        on = 1
        pid = 0
        s = 0
#17 0x00000000004370ca in ngx_start_worker_processes (cycle=0x801e55050,
n=4, type=-4) at src/os/unix/ngx_process_cycle.c:365
        i = 0
        ch = {command = 1, pid = 32452488, slot = 6111520, fd = 6219400}
#18 0x0000000000436c92 in ngx_master_process_cycle (cycle=0x801e55050) at
src/os/unix/ngx_process_cycle.c:250
        title = 0x8023fe6cc ""
        p = (u_char *) 0x8023fe6f0 "????????"
        size = 37
        i = 1
        n = 6
        sigio = 0
        set = {__bits = {0, 0, 0, 0}}
        itv = {it_interval = {tv_sec = 0, tv_usec = 0}, it_value = {tv_sec = 0,
tv_usec = 0}}
        live = 1
        delay = 0
        ls = (ngx_listening_t *) 0x6
        ccf = (ngx_core_conf_t *) 0x801e55f88
#19 0x00000000004066d3 in main (argc=1, argv=0x7fffffffed68) at
src/core/nginx.c:410
        i = 52
        log = (ngx_log_t *) 0x5ee040
        cycle = (ngx_cycle_t *) 0x801e55050
        init_cycle = {conf_ctx = 0x0, pool = 0x801e49800, log = 0x5ee040, 
new_log =
{log_level = 0, file = 0x0, connection = 0, handler = 0, data = 0x0, action
= 0x0}, 
  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}, pathes = {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 = 31, data = 0x4bd9f0
"/usr/local/etc/nginx/nginx.conf"}, 
  conf_param = {len = 0, data = 0x0}, conf_prefix = {len = 21, data =
0x4bd9f0 "/usr/local/etc/nginx/nginx.conf"}, prefix = {len = 21, 
    data = 0x4bd9d8 "/usr/local/etc/nginx/"}, lock_file = {len = 0, data =
0x0}, hostname = {len = 0, data = 0x0}}
        ccf = (ngx_core_conf_t *) 0x801e56040


Пример bt ( signal 11):
gdb /usr/local/sbin/nginx nginx.core.64793 
GNU gdb 6.1.1 [FreeBSD]
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 "amd64-marcel-freebsd"...
Core was generated by `nginx'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.5...done.
Loaded symbols for /lib/libcrypt.so.5
Reading symbols from /usr/local/lib/libpcre.so.1...done.
Loaded symbols for /usr/local/lib/libpcre.so.1
Reading symbols from /usr/lib/libssl.so.6...done.
Loaded symbols for /usr/lib/libssl.so.6
Reading symbols from /lib/libcrypto.so.6...done.
Loaded symbols for /lib/libcrypto.so.6
Reading symbols from /lib/libz.so.5...done.
Loaded symbols for /lib/libz.so.5
Reading symbols from /usr/local/lib/libgd.so.4...done.
Loaded symbols for /usr/local/lib/libgd.so.4
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/libfontconfig.so.1...done.
Loaded symbols for /usr/local/lib/libfontconfig.so.1
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /usr/local/lib/libpng15.so.15...done.
Loaded symbols for /usr/local/lib/libpng15.so.15
Reading symbols from /usr/local/lib/libjpeg.so.11...done.
Loaded symbols for /usr/local/lib/libjpeg.so.11
Reading symbols from /usr/local/lib/libfreetype.so.9...done.
Loaded symbols for /usr/local/lib/libfreetype.so.9
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libthr.so.3...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /usr/lib/libbz2.so.4...done.
Loaded symbols for /usr/lib/libbz2.so.4
Reading symbols from /usr/local/lib/libexpat.so.6...done.
Loaded symbols for /usr/local/lib/libexpat.so.6
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x00000008010c8790 in memcpy () from /lib/libc.so.7
[New Thread 801e041c0 (LWP 104625)]
[New LWP 104661]

#0  0x00000008010c8790 in memcpy () from /lib/libc.so.7
#1  0x000000000049ef0c in ngx_http_proxy_create_request (r=0x801f8d400) at
src/http/modules/ngx_http_proxy_module.c:1170
#2  0x0000000000468b91 in ngx_http_upstream_init_request (r=0x801f8d400) at
src/http/ngx_http_upstream.c:505
#3  0x0000000000468924 in ngx_http_upstream_init (r=0x801f8d400) at
src/http/ngx_http_upstream.c:446
#4  0x000000000045eca3 in ngx_http_read_client_request_body (r=0x801f8d400,
post_handler=0x468840 <ngx_http_upstream_init>) at
src/http/ngx_http_request_body.c:59
#5  0x000000000049d9dc in ngx_http_proxy_handler (r=0x801f8d400) at
src/http/modules/ngx_http_proxy_module.c:702
#6  0x00000000004469cd in ngx_http_core_content_phase (r=0x801f8d400,
ph=0x802079780) at src/http/ngx_http_core_module.c:1396
#7  0x0000000000445502 in ngx_http_core_run_phases (r=0x801f8d400) at
src/http/ngx_http_core_module.c:877
#8  0x000000000044547d in ngx_http_handler (r=0x801f8d400) at
src/http/ngx_http_core_module.c:860
#9  0x0000000000453d94 in ngx_http_process_request (r=0x801f8d400) at
src/http/ngx_http_request.c:1685
#10 0x0000000000452795 in ngx_http_process_request_headers (rev=0x804a013b0)
at src/http/ngx_http_request.c:1135
#11 0x0000000000451f26 in ngx_http_process_request_line (rev=0x804a013b0) at
src/http/ngx_http_request.c:933
#12 0x0000000000451128 in ngx_http_init_request (rev=0x804a013b0) at
src/http/ngx_http_request.c:519
#13 0x000000000042d47c in ngx_event_process_posted (cycle=0x801e55050,
posted=0x5f0a60) at src/event/ngx_event_posted.c:40
#14 0x000000000042af25 in ngx_process_events_and_timers (cycle=0x801e55050)
at src/event/ngx_event.c:274
#15 0x0000000000438264 in ngx_worker_process_cycle (cycle=0x801e55050,
data=0x0) at src/os/unix/ngx_process_cycle.c:808
#16 0x0000000000435261 in ngx_spawn_process (cycle=0x801e55050,
proc=0x438070 <ngx_worker_process_cycle>, data=0x0, name=0x4c1869 "worker
process", respawn=3)
    at src/os/unix/ngx_process.c:198
#17 0x0000000000437c92 in ngx_reap_children (cycle=0x801e55050) at
src/os/unix/ngx_process_cycle.c:622
#18 0x00000000004369e6 in ngx_master_process_cycle (cycle=0x801e55050) at
src/os/unix/ngx_process_cycle.c:181
#19 0x00000000004066d3 in main (argc=1, argv=0x7fffffffed68) at
src/core/nginx.c:410

bt full:
#0  0x00000008010c8790 in memcpy () from /lib/libc.so.7
No symbol table info available.
#1  0x000000000049ef0c in ngx_http_proxy_create_request (r=0x801f8d400) at
src/http/modules/ngx_http_proxy_module.c:1170
        len = 17
        uri_len = 20
        loc_len = 0
        body_len = 0
        escape = 0
        b = (ngx_buf_t *) 0x802041f88
        method = {len = 4, data = 0x801e4d400 "GET /images/title.jpg
HTTP/1.0\r\nX-Real-Remote-Addr"}
        i = 0
        unparsed_uri = 1
        cl = (ngx_chain_t *) 0x802041fe8
        body = (ngx_chain_t *) 0x0
        part = (ngx_list_part_t *) 0x802041c68
        header = (ngx_table_elt_t *) 0x80204c050
        u = (ngx_http_upstream_t *) 0x80204c3e0
        ctx = (ngx_http_proxy_ctx_t *) 0x802041db8
        code = 0x465e70 <ngx_http_script_copy_code>
        e = {ip = 0x8027f86a8 "220; smartphone; sda/1.0 profile/midp-2.0
configuration/cldc-1.1)", 
  pos = 0x805600066 "X-Real-Remote-Addr: 192.168.0.11\r\nX-Forwarded-For:
192.168.0.11\r\nX-LAC: 1E82\r\nX-CI: 13F5\r\nX-3GPP-SGSN-MCC-MNC:
10002\r\nAccept: application/vnd.wap.wmlscriptc, text/vnd.wap.wml,
applic"..., sp = 0x0, buf = {len = 0, data = 0x0}, line = {len = 0, data =
0x0}, args = 0x0, flushed = 1, 
  skip = 0, quote = 0, is_args = 0, log = 0, status = 0, request =
0x801f8d400}
        le = {ip = 0x8027f8928 "", pos = 0x508dad7d <Address 0x508dad7d out of
bounds>, sp = 0x1, buf = {len = 0, 
    data = 0x800000000 <Address 0x800000000 out of bounds>}, line = {len =
1431655766, data = 0x0}, args = 0x0, flushed = 1, skip = 0, quote = 0,
is_args = 0, log = 0, 
  status = 34391512067, request = 0x801f8d400}
        plcf = (ngx_http_proxy_loc_conf_t *) 0x8025f36f0
        lcode = 0x465e40 <ngx_http_script_copy_len_code>
#2  0x0000000000468b91 in ngx_http_upstream_init_request (r=0x801f8d400) at
src/http/ngx_http_upstream.c:505
        host = (ngx_str_t *) 0x801ef2000
        i = 34426856232
        ctx = (ngx_resolver_ctx_t *) 0x7fffffffe520
        temp = {next = 0x0, resolver = 0x0, udp_connection = 0x0, ident =
140737488348336, state = 34399257320, type = 2, name = {len =
140737488348432, 
    data = 0x7fffffffed78 "f????\177"}, naddrs = 97, addrs = 0x78, addr =
4294967273, handler = 0xe, data = 0x0, timeout = 37, quick =
18446744073709551614, 
  recursion = 34443629488, event = 0x7fffffffe520}
        cln = (ngx_http_cleanup_t *) 0x43af3a
        u = (ngx_http_upstream_t *) 0x80204c3e0
        clcf = (ngx_http_core_loc_conf_t *) 0x20
        uscf = (ngx_http_upstream_srv_conf_t *) 0xfffffffffffffffe
        uscfp = (ngx_http_upstream_srv_conf_t **) 0x8050013b0
        umcf = (ngx_http_upstream_main_conf_t *) 0x802041f58
#3  0x0000000000468924 in ngx_http_upstream_init (r=0x801f8d400) at
src/http/ngx_http_upstream.c:446
        c = (ngx_connection_t *) 0x804002328

#4  0x000000000045eca3 in ngx_http_read_client_request_body (r=0x801f8d400,
post_handler=0x468840 <ngx_http_upstream_init>) at
src/http/ngx_http_request_body.c:59
        preread = 34393559040
        size = 34393562712
        b = (ngx_buf_t *) 0x802041000
        cl = (ngx_chain_t *) 0x7fffffffe5d0
---Type <return> to continue, or q <return> to quit---
        next = (ngx_chain_t **) 0x40996a
        tf = (ngx_temp_file_t *) 0x100
        rb = (ngx_http_request_body_t *) 0x802041f58
        clcf = (ngx_http_core_loc_conf_t *) 0x0
#5  0x000000000049d9dc in ngx_http_proxy_handler (r=0x801f8d400) at
src/http/modules/ngx_http_proxy_module.c:702
        rc = 34391556280
        u = (ngx_http_upstream_t *) 0x80204c3e0
        ctx = (ngx_http_proxy_ctx_t *) 0x802041db8
        plcf = (ngx_http_proxy_loc_conf_t *) 0x8025f36f0
#6  0x00000000004469cd in ngx_http_core_content_phase (r=0x801f8d400,
ph=0x802079780) at src/http/ngx_http_core_module.c:1396
        root = 18446744073709551611
        rc = 0
        path = {len = 34393790312, data = 0x801f8d400 "HTTP"}
#7  0x0000000000445502 in ngx_http_core_run_phases (r=0x801f8d400) at
src/http/ngx_http_core_module.c:877
        rc = -2
        ph = (ngx_http_phase_handler_t *) 0x802079690
        cmcf = (ngx_http_core_main_conf_t *) 0x801e567a0
#8  0x000000000044547d in ngx_http_handler (r=0x801f8d400) at
src/http/ngx_http_core_module.c:860
        cmcf = (ngx_http_core_main_conf_t *) 0x804a013b0
#9  0x0000000000453d94 in ngx_http_process_request (r=0x801f8d400) at
src/http/ngx_http_request.c:1685
        c = (ngx_connection_t *) 0x804002328
#10 0x0000000000452795 in ngx_http_process_request_headers (rev=0x804a013b0)
at src/http/ngx_http_request.c:1135
        p = (u_char *) 0x10 <Address 0x10 out of bounds>
        len = 34393559040
        n = 281
        rc = 0
        rv = 0
        h = (ngx_table_elt_t *) 0x80204c020
        c = (ngx_connection_t *) 0x804002328
        hh = (ngx_http_header_t *) 0x0
        r = (ngx_http_request_t *) 0x801f8d400
        cscf = (ngx_http_core_srv_conf_t *) 0x8021cd078
        cmcf = (ngx_http_core_main_conf_t *) 0x801e567a0
#11 0x0000000000451f26 in ngx_http_process_request_line (rev=0x804a013b0) at
src/http/ngx_http_request.c:933
        host = (u_char *) 0x802041000 "?\037\004\002\b"
        n = 1024
        rc = 0
        rv = 560
        c = (ngx_connection_t *) 0x804002328
        r = (ngx_http_request_t *) 0x801f8d400
        cscf = (ngx_http_core_srv_conf_t *) 0x802041568
#12 0x0000000000451128 in ngx_http_init_request (rev=0x804a013b0) at
src/http/ngx_http_request.c:519
        tp = (ngx_time_t *) 0x5ee1d8
        i = 34426852432
        c = (ngx_connection_t *) 0x804002328
        r = (ngx_http_request_t *) 0x801f8d400
        sin = (struct sockaddr_in *) 0x17302027020
        port = (ngx_http_port_t *) 0x80207afd0
---Type <return> to continue, or q <return> to quit---
        addr = (ngx_http_in_addr_t *) 0x80207afe0
        ctx = (ngx_http_log_ctx_t *) 0x80239b2a0
        addr_conf = (ngx_http_addr_conf_t *) 0x80207afe8
        hc = (ngx_http_connection_t *) 0x80239b2b8
        cscf = (ngx_http_core_srv_conf_t *) 0x8021cd078
        clcf = (ngx_http_core_loc_conf_t *) 0x8021cd110
        cmcf = (ngx_http_core_main_conf_t *) 0x801e567a0
#13 0x000000000042d47c in ngx_event_process_posted (cycle=0x801e55050,
posted=0x5f0a60) at src/event/ngx_event_posted.c:40
        ev = (ngx_event_t *) 0x804a013b0
#14 0x000000000042af25 in ngx_process_events_and_timers (cycle=0x801e55050)
at src/event/ngx_event.c:274
        flags = 2
        timer = 18446744073709551615
        delta = 0
#15 0x0000000000438264 in ngx_worker_process_cycle (cycle=0x801e55050,
data=0x0) at src/os/unix/ngx_process_cycle.c:808
        i = 1
        c = (ngx_connection_t *) 0x7fffffffe990
#16 0x0000000000435261 in ngx_spawn_process (cycle=0x801e55050,
proc=0x438070 <ngx_worker_process_cycle>, data=0x0, name=0x4c1869 "worker
process", respawn=3)
    at src/os/unix/ngx_process.c:198
        on = 1
        pid = 0
        s = 3
#17 0x0000000000437c92 in ngx_reap_children (cycle=0x801e55050) at
src/os/unix/ngx_process_cycle.c:622
        i = 3
        n = 6
        live = 1
        ch = {command = 2, pid = 37883, slot = 3, fd = -1}
        ccf = (ngx_core_conf_t *) 0x508dad7c
#18 0x00000000004369e6 in ngx_master_process_cycle (cycle=0x801e55050) at
src/os/unix/ngx_process_cycle.c:181
        title = 0x8023fe6cc ""
        p = (u_char *) 0x8023fe6f0 "????????"
        size = 37
        i = 1
        n = 6
        sigio = 0
        set = {__bits = {0, 0, 0, 0}}
        itv = {it_interval = {tv_sec = 0, tv_usec = 0}, it_value = {tv_sec = 0,
tv_usec = 0}}
        live = 1
        delay = 0
        ls = (ngx_listening_t *) 0x6
        ccf = (ngx_core_conf_t *) 0x801e55f88
#19 0x00000000004066d3 in main (argc=1, argv=0x7fffffffed68) at
src/core/nginx.c:410
        i = 52
        log = (ngx_log_t *) 0x5ee040
        cycle = (ngx_cycle_t *) 0x801e55050
        init_cycle = {conf_ctx = 0x0, pool = 0x801e49800, log = 0x5ee040, 
new_log =
{log_level = 0, file = 0x0, connection = 0, handler = 0, data = 0x0, action
= 0x0}, 
  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}, pathes = {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, 
---Type <return> to continue, or q <return> to quit---
  files_n = 0, connections = 0x0, read_events = 0x0, write_events = 0x0,
old_cycle = 0x0, conf_file = {len = 31, data = 0x4bd9f0
"/usr/local/etc/nginx/nginx.conf"}, 
  conf_param = {len = 0, data = 0x0}, conf_prefix = {len = 21, data =
0x4bd9f0 "/usr/local/etc/nginx/nginx.conf"}, prefix = {len = 21, 
    data = 0x4bd9d8 "/usr/local/etc/nginx/"}, lock_file = {len = 0, data =
0x0}, hostname = {len = 0, data = 0x0}}
        ccf = (ngx_core_conf_t *) 0x801e56040

Спасибо!

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,232317,232317#msg-232317

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.