Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
segmentation fault в перле
- To: nginx-ru@xxxxxxxxx
- Subject: segmentation fault в перле
- From: "Pavel Krush" <pavel.krush@xxxxxxxxxxxxxx>
- Date: Mon, 1 Sep 2008 21:02:24 +0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=KJcRykXcZL5D3sV+SZDfigY4440072km3XQHSqmKnq0=; b=wqL7unRBNL0My23NvaBCJebT209SDf71wPkL2ku87wuQSrlKpXB7DG3bdZt0MKoWMg K55lZGA0SLvXvGNrPejkZc0oHmFQLIeRFCRqy9J6P5DmkrX0CtLJzoSDnz/xCWrWnC4s RAYTx7BQtBhTroDCH3mCMdThY9znPImehB6u0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=xeWUzUtp0l9c00NvvOiuTblHLBUHL9P7BIX6vNkVd+F815cgHmq5EQHtopJ+1ivo+t 6VooIFhgCsuN9srPgbjlcFkb/Iq8HaaTtzNYe+TC2siGbWlTfAU5NiQKg2VJZVX7msyz 24m/ygMv7ytkT93078CVV6O6CCxtJ/biw75o0=
Конфиг:
worker_processes 10;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
perl_modules html;
perl_require handler_segv.pl;
server {
listen 80;
server_name xx.xxxxxxx.xxx;
autoindex on;
location / {
root html;
index index.html;
perl XX::handler;
}
}
}
хэндлер
package XX;
use strict;
use warnings;
use nginx;
sub handler {
my $request = shift;
if ( $request->request_method eq 'GET' ) {
$request->send_http_header( 'text/html' );
$request->print("GET");
}
elsif ( $request->request_method eq 'POST' ) {
$request->send_http_header( 'text/html' );
$request->has_request_body( \&XX::GetPostParams );
$request->print("POST");
}
else {
return DECLINED;
}
return HTTP_OK;
}
sub GetPostParams {
my $r = shift;
return OK;
}
42;
с GET вс нормально, но если послать POST запрос, функция GetPostParams
выполняется, а потом воркер сегфолтится. видел, что похожая ошибка
была пофикшена в 0.6.22, но потом либо снова появилась, либо это
что-то другое.
пробовал на nginx-0.6.31, 0.6.32 и 0.7.13
ось: CentOS 5.1
на 0.7.13 в логе перед сегфолтом вылазит вот такое:
*** glibc detected *** nginx: worker process: malloc(): memory
corruption: 0x080d9af0 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7d0666b]
/lib/libc.so.6(__libc_malloc+0x7e)[0xb7d07d8e]
nginx: worker process(ngx_alloc+0x11)[0x806c2b5]
nginx: worker process[0x80520f8]
nginx: worker process(ngx_palloc+0x8b)[0x8051f5f]
nginx: worker process[0x8080919]
nginx: worker process(ngx_event_process_posted+0x53)[0x806957b]
nginx: worker process(ngx_process_events_and_timers+0x13a)[0x8067cae]
nginx: worker process[0x80706cd]
nginx: worker process(ngx_spawn_process+0x545)[0x806e275]
nginx: worker process[0x806fda3]
nginx: worker process(ngx_master_process_cycle+0x285)[0x806f6ad]
nginx: worker process(main+0x3c0)[0x8050154]
/lib/libc.so.6(__libc_start_main+0xdc)[0xb7cb5dec]
nginx: worker process[0x804fd11]
======= Memory map: ========
08048000-080bf000 r-xp 00000000 00:2f 13238724
/opt/nginx/sbin/nginx
080bf000-080c7000 rw-p 00077000 00:2f 13238724
/opt/nginx/sbin/nginx
080c7000-0817d000 rw-p 080c7000 00:00 0 [heap]
b7b00000-b7b21000 rw-p b7b00000 00:00 0
b7b21000-b7c00000 ---p b7b21000 00:00 0
b7c5e000-b7c69000 r-xp 00000000 00:2f 12926006
/lib/libgcc_s-4.1.1-20070105.so.1
b7c69000-b7c6a000 rw-p 0000a000 00:2f 12926006
/lib/libgcc_s-4.1.1-20070105.so.1
b7c6a000-b7c73000 r-xp 00000000 00:2f 12926062
/lib/libnss_files-2.5.so
b7c73000-b7c74000 r--p 00008000 00:2f 12926062
/lib/libnss_files-2.5.so
b7c74000-b7c75000 rw-p 00009000 00:2f 12926062
/lib/libnss_files-2.5.so
b7c7d000-b7ca0000 rw-p b7c7d000 00:00 0
b7ca0000-b7dd7000 r-xp 00000000 00:2f 12925978
/lib/libc-2.5.so
b7dd7000-b7dd9000 r--p 00137000 00:2f 12925978
/lib/libc-2.5.so
b7dd9000-b7dda000 rw-p 00139000 00:2f 12925978
/lib/libc-2.5.so
b7dda000-b7ddd000 rw-p b7dda000 00:00 0
b7ddd000-b7df0000 r-xp 00000000 00:2f 12926090
/lib/libpthread-2.5.so
b7df0000-b7df1000 r--p 00012000 00:2f 12926090
/lib/libpthread-2.5.so
b7df1000-b7df2000 rw-p 00013000 00:2f 12926090
/lib/libpthread-2.5.so
b7df2000-b7df4000 rw-p b7df2000 00:00 0
b7df4000-b7df6000 r-xp 00000000 00:2f 12925960
/lib/libutil-2.5.so
b7df6000-b7df7000 r--p 00001000 00:2f 12925960
/lib/libutil-2.5.so
b7df7000-b7df8000 rw-p 00002000 00:2f 12925960
/lib/libutil-2.5.so
b7df8000-b7e1d000 r-xp 00000000 00:2f 12925994
/lib/libm-2.5.so
b7e1d000-b7e1e000 r--p 00024000 00:2f 12925994
/lib/libm-2.5.so
b7e1e000-b7e1f000 rw-p 00025000 00:2f 12925994
/lib/libm-2.5.so
b7e1f000-b7e21000 r-xp 00000000 00:2f 12925958
/lib/libdl-2.5.so
b7e21000-b7e22000 r--p 00001000 00:2f 12925958
/lib/libdl-2.5.so
b7e22000-b7e23000 rw-p 00002000 00:2f 12925958
/lib/libdl-2.5.so
b7e23000-b7e24000 rw-p b7e23000 00:00 0
b7e24000-b7e36000 r-xp 00000000 00:2f 12926036
/lib/libnsl-2.5.so
b7e36000-b7e37000 r--p 00012000 00:2f 12926036
/lib/libnsl-2.5.so
b7e37000-b7e38000 rw-p 00013000 00:2f 12926036
/lib/libnsl-2.5.so
b7e38000-b7e3a000 rw-p b7e38000 00:00 0
b7e3a000-b7e49000 r-xp 00000000 00:2f 12925930
/lib/libresolv-2.5.so
b7e49000-b7e4a000 r--p 0000e000 00:2f 12925930
/lib/libresolv-2.5.so
b7e4a000-b7e4b000 rw-p 0000f000 00:2f 12925930
/lib/libresolv-2.5.so
b7e4b000-b7e4d000 rw-p b7e4b000 00:00 0
b7e4d000-b7f77000 r-xp 00000000 00:2f 5901745
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so
b7f77000-b7f7c000 rw-p 0012a000 00:2f 5901745
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so
b7f7c000-b7f7e000 rw-p b7f7c000 00:00 0
b7f7e000-b7f90000 r-xp 00000000 00:2f 12925300
/usr/lib/libz.so.1.2.3
b7f90000-b7f91000 rw-p 00011000 00:2f 12925300
/usr/lib/libz.so.1.2.3
b7f91000-b7fad000 r-xp 00000000 00:2f 12925912
/lib/libpcre.so.0.0.1
b7fad000-b7fae000 rw-p 0001b000 00:2f 12925912
/lib/libpcre.so.0.0.1
b7fae000-b7fb3000 r-xp 00000000 00:2f 12926092
/lib/libcrypt-2.5.so
b7fb3000-b7fb4000 r--p 00004000 00:2f 12926092
/lib/libcrypt-2.5.so
b7fb4000-b7fb5000 rw-p 00005000 00:2f 12926092
/lib/libcrypt-2.5.so
b7fb5000-b7fdd000 rw-p b7fb5000 00:00 0
b7fdd000-b7fde000 rw-s 00000000 00:32 162430980
b7fde000-b7fe4000 r-xp 00000000 00:2f 14615144
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/nginx/nginx.so
b7fe4000-b7fe5000 rw-p 00005000 00:2f 14615144
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/nginx/nginx.so
b7fe5000-b7ffe000 r-xp 00000000 00:2f 12926094
/lib/ld-2.5.so
b7ffe000-b7fff000 r--p 00018000 00:2f 12926094
/lib/ld-2.5.so
b7fff000-b8000000 rw-p 00019000 00:2f 12926094
/lib/ld-2.5.so
bfdf3000-bfdf9000 rw-p bfdf3000 00:00 0 [stack]
2008/09/01 20:56:37 [alert] 30643#0: worker process 30645 exited on signal 6
|