Segfault nginx 1.1.19
mikevmk
nginx-forum на nginx.us
Пн Апр 23 16:16:29 UTC 2012
Здравствуйте!
После обновления с 1.1.18 до 1.1.19 (с
аналогичными параметрами сборки)
воркеры начали падать с 11 сигналом на
двух location. Добавил --with-debug при сборке,
'error_log error.log debug;' в конфиг, получил кору.
Вот локейшены:
location ~ ^/m/(.*)/(.*)? {
set $username $1;
set $newuri $2;
root /var/www/DOCROOT/mass-username-sites/$username;
try_files /$newuri /index.html =404;
}
location ~ /m/(.*)$ {
rewrite ^(.*) $1/ last;
}
location ~ ^/s/(.*)/(.*)? {
set $userdomain $1;
set $newuri $2;
root /var/www/DOCROOT/mass-domain-sites/$userdomain;
try_files /$newuri /index.html =404;
}
location ~ /s/(.*)$ {
rewrite ^(.*) $1/ last;
}
Вот кусочек еггог-лога после включения
дебага по запросу /m/test (на /m/test/anything та
же реакция):
2012/04/23 09:12:28 [notice] 13702#0: *47 "^(.*)" matches "/m/test",
client: X.X.X.X, server: domain.tld, request: "GET /m/test HTTP/1.1",
host: "domain.tld"
2012/04/23 09:12:28 [notice] 13702#0: *47 rewritten data: "/m/test/",
args: "", client: X.X.X.X, server: domain.tld, request: "GET /m/test
HTTP/1.1", host: "domain.tld"
2012/04/23 09:12:28 [alert] 11927#0: worker process 13702 exited on
signal 11 (core dumped)
От реального наличия и отсутствия
директории указанной в root падение не
зависит (падает все равно). В 1.1.18
работало. Вот бэктрейс:
# gdb -c core /opt/bin/nginx
GNU gdb (GDB) 7.4-debian
Copyright (C) 2012 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".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/opt/bin/nginx...done.
[New LWP 11928]
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `nginx: worker p'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f82f3ddcfc1 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007f82f3ddcfc1 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x000000000043b5e4 in ngx_http_script_copy_code (e=<optimized out>)
at src/http/ngx_http_script.c:750
#2 0x000000000042f198 in ngx_http_core_try_files_phase (r=0x2089440,
ph=<optimized out>) at src/http/ngx_http_core_module.c:1271
#3 0x0000000000429523 in ngx_http_core_run_phases (r=0x2089440) at
src/http/ngx_http_core_module.c:877
#4 0x000000000042961d in ngx_http_handler (r=<optimized out>) at
src/http/ngx_http_core_module.c:860
#5 0x0000000000433005 in ngx_http_process_request (r=0x2089440) at
src/http/ngx_http_request.c:1670
#6 0x00000000004335c1 in ngx_http_process_request_headers
(rev=<optimized out>) at src/http/ngx_http_request.c:1114
#7 0x0000000000433ac3 in ngx_http_process_request_line (rev=0x228b798)
at src/http/ngx_http_request.c:914
#8 0x0000000000430ebb in ngx_http_init_request (rev=0x228b798) at
src/http/ngx_http_request.c:519
#9 0x000000000041c0d2 in ngx_event_process_posted (cycle=<optimized
out>, posted=0x69f9c0) at src/event/ngx_event_posted.c:40
#10 0x000000000041bceb in ngx_process_events_and_timers
(cycle=0x207c0a0) at src/event/ngx_event.c:273
#11 0x0000000000421b02 in ngx_worker_process_cycle (cycle=0x207c0a0,
data=<optimized out>) at src/os/unix/ngx_process_cycle.c:806
#12 0x00000000004203a2 in ngx_spawn_process (cycle=0x207c0a0,
proc=0x421a31 <ngx_worker_process_cycle>, data=0x0,
name=0x4737b3 "worker process", respawn=-3) at
src/os/unix/ngx_process.c:198
#13 0x0000000000421236 in ngx_start_worker_processes (cycle=0x207c0a0,
n=4, type=-3) at src/os/unix/ngx_process_cycle.c:365
#14 0x00000000004221bb in ngx_master_process_cycle (cycle=0x207c0a0) at
src/os/unix/ngx_process_cycle.c:137
#15 0x0000000000407254 in main (argc=<optimized out>, argv=<optimized
out>) at src/core/nginx.c:410
(gdb)
Помогите, пожалуйста, разобраться,
товарищи ученые. Не попробовать ли мне
свежую ветку 1.2? Спасибо.
Posted at Nginx Forum: http://forum.nginx.org/read.php?21,225681,225681#msg-225681
Подробная информация о списке рассылки nginx-ru