captures in regex location

Vladimir Sopot jd at
Tue Mar 10 22:47:29 MSK 2009

On Mar 10, 2009, at 9:27 PM, Igor Sysoev wrote:

> On Tue, Mar 10, 2009 at 07:34:15PM +0300, Vladimir Sopot wrote:
>> Пока корок не пишется...
>> nginx.conf:
>> .......
>> worker_rlimit_core  100000000;
>> .......
>> может что-то еще надо где-то включить? (после обновления ядра могло
>> что-то где-то не прописаться :)
> Ещё
> working_directory  /path/to/cores;
> Воркеры должны иметь права на запись в этот каталог.

добавил working_directory   /usr/local/nginx/logs;

# ls -la ./logs
drwxr-xr-x  2 nobody root    328 Mar 10 22:01 logs

(в nginx.conf user не указан)

# ./sbin/nginx -V
nginx version: nginx/0.7.40
built by gcc 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux)
configure arguments: --with-http_stub_status_module --without- 
mail_pop3_module --without-mail_imap_module --without-mail_smtp_module  
--without-http_access_module --without-http_autoindex_module --without- 
http_browser_module --without-http_charset_module --without- 
http_limit_zone_module --without-http_map_module --without- 
http_memcached_module --without-http_ssi_module --without- 
http_userid_module --without-http_proxy_module --with-debug

случилась корка

# tail -f ./logs/error.log
2009/03/10 22:29:23 [alert] 14244#0: worker process 14249 exited on  
signal 11 (core dumped)
2009/03/10 22:29:25 [alert] 14244#0: worker process 14249 exited on  
signal 11 (core dumped)
(а нормально, что сообщений - два?)

# gdb ./sbin/nginx ./logs/core.2229
GNU gdb (GDB; openSUSE 11.1)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later < 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show  
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see:

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib64/
Loaded symbols for /lib64/
Reading symbols from /usr/lib64/
Loaded symbols for /usr/lib64/
Reading symbols from /lib64/
Loaded symbols for /lib64/
Reading symbols from /lib64/
Loaded symbols for /lib64/
Reading symbols from /lib64/
Loaded symbols for /lib64/
Core was generated by `nginx: worker process      '.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f441d098c25 in free () from /lib64/
(gdb) bt
#0  0x00007f441d098c25 in free () from /lib64/
#1  0x0000000000414b88 in ngx_close_cached_file (cache=0x675d18,  
file=0x95c460, min_uses=0, log=0x7f3458) at src/core/ 
#2  0x0000000000414c96 in ngx_expire_old_cached_files (cache=0x675d18,  
n=1, log=0x7f3458) at src/core/ngx_open_file_cache.c:722
#3  0x0000000000414d0c in ngx_open_file_cleanup (data=0x992eb8) at src/ 
#4  0x00000000004047cc in ngx_destroy_pool (pool=0x9920e0) at src/core/ 
#5  0x0000000000428c3a in ngx_http_request_done (r=0x929240, error=0)  
at src/http/ngx_http_request.c:2813
#6  0x000000000042b089 in ngx_http_finalize_request (r=<value  
optimized out>, rc=<value optimized out>) at src/http/ 
#7  0x000000000042ab17 in ngx_http_finalize_request (r=0x929240,  
rc=302) at src/http/ngx_http_request.c:1879
#8  0x000000000042647d in ngx_http_core_generic_phase (r=0x929240,  
ph=0x77cd00) at src/http/ngx_http_core_module.c:809
#9  0x0000000000422653 in ngx_http_core_run_phases (r=0x929240) at src/ 
#10 0x000000000042277c in ngx_http_handler (r=0x1) at src/http/ 
#11 0x000000000042bf6d in ngx_http_process_request (r=0x929240) at src/ 
#12 0x000000000042c5b6 in ngx_http_process_request_headers  
(rev=0x9928d0) at src/http/ngx_http_request.c:1018
#13 0x000000000042cb85 in ngx_http_process_request_line  
(rev=0x7f441cbed108) at src/http/ngx_http_request.c:828
#14 0x000000000042981a in ngx_http_init_request (rev=0x7f441cbed108)  
at src/http/ngx_http_request.c:503
#15 0x00000000004299de in ngx_http_keepalive_handler  
(rev=0x7f441cbed108) at src/http/ngx_http_request.c:2549
#16 0x000000000041f213 in ngx_epoll_process_events (cycle=0x6721c8,  
timer=<value optimized out>, flags=<value optimized out>) at src/event/ 
#17 0x00000000004176d7 in ngx_process_events_and_timers  
(cycle=0x6721c8) at src/event/ngx_event.c:245
#18 0x000000000041de46 in ngx_worker_process_cycle (cycle=0x6721c8,  
data=<value optimized out>) at src/os/unix/ngx_process_cycle.c:767
#19 0x000000000041c713 in ngx_spawn_process (cycle=0x6721c8,  
proc=0x41d7cf <ngx_worker_process_cycle>, data=0x0, name=0x44be93  
"worker process", respawn=-2) at src/os/unix/ngx_process.c:187
#20 0x000000000041d2cc in ngx_start_worker_processes (cycle=0x6721c8,  
n=14, type=-2) at src/os/unix/ngx_process_cycle.c:332
#21 0x000000000041e33f in ngx_master_process_cycle (cycle=0x6721c8) at  
#22 0x0000000000403fc4 in main (argc=<value optimized out>,  
argv=0x7fff25c1d1f8) at src/core/nginx.c:363
(gdb) q
Quitting: You can't do that without a process to debug.


> -- 
> Игорь Сысоев

More information about the nginx-ru mailing list