nginx-0.8.34 with GeoIP enabled segfaulting

Vladimir Getmanshchuk vladget на openfilm.com
Вт Мар 30 21:07:07 MSD 2010


# pkg_info | grep nginx
nginx-devel-0.8.34  Robust and small WWW server

# nginx -V
nginx version: nginx/HOSTNAME
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=wwwuser --group=wwwgrp
--with-file-aio --http-client-body-temp-path=/tmp/nginx/client_body_temp
--http-proxy-temp-path=/usr/local/www/tmp/nginx/proxy_temp
--http-fastcgi-temp-path=/tmp/nginx/fastcgi_temp
--http-log-path=/var/log/nginx-access.log --with-http_flv_module
--with-http_geoip_module --with-http_perl_module --with-http_realip_module
--with-http_stub_status_module
--add-module=/usr/ports/www/nginx-devel/work/nginx_uploadprogress_module-0.8
--with-pcre

# tail -f nginx-error.log
2010/03/30 04:56:33 [alert] 22147#0: worker process 22202 exited on signal
11 (core dumped)
2010/03/30 04:56:38 [alert] 22147#0: worker process 22223 exited on signal
11 (core dumped)
2010/03/30 04:56:42 [alert] 22147#0: worker process 22231 exited on signal
11 (core dumped)
2010/03/30 04:56:47 [alert] 22147#0: worker process 222383 exited on signal
11 (core dumped)

# gdb -c /spool/core/nginx.core.22972 /usr/local/sbin/nginx


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"...(no debugging symbols
found)...
Core was generated by `nginx'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.5...(no debugging symbols
found)...done.
Loaded symbols for /lib/libcrypt.so.5
Reading symbols from /usr/local/lib/libpcre.so.0...(no debugging symbols
found)...done.
Loaded symbols for /usr/local/lib/libpcre.so.0
Reading symbols from /lib/libmd.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libmd.so.5
Reading symbols from /lib/libz.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.5
Reading symbols from /usr/local/lib/libGeoIP.so.5...(no debugging symbols
found)...done.
Loaded symbols for /usr/local/lib/libGeoIP.so.5
Reading symbols from /usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so...(no
debugging symbols found)...done.
Loaded symbols for /usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libutil.so.8...(no debugging symbols
found)...done.
Loaded symbols for /lib/libutil.so.8
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from
/usr/local/lib/perl5/site_perl/5.10.1/mach/auto/nginx/nginx.so...(no
debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.10.1/mach/auto/nginx/nginx.so
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols
found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000800b24c63 in _GeoIP_seek_record () from
/usr/local/lib/libGeoIP.so.5
(gdb)
(gdb)
(gdb) bt
#0  0x0000000800b24c63 in _GeoIP_seek_record () from
/usr/local/lib/libGeoIP.so.5
#1  0x0000000800b25208 in GeoIP_id_by_ipnum () from
/usr/local/lib/libGeoIP.so.5
#2  0x0000000800b25259 in GeoIP_country_code_by_ipnum () from
/usr/local/lib/libGeoIP.so.5
#3  0x0000000000454b4c in ngx_http_file_cache_create_key ()
#4  0x0000000000439568 in ngx_http_get_indexed_variable ()
#5  0x000000000043c341 in ngx_http_script_copy_var_len_code ()
#6  0x000000000045c595 in ngx_http_file_cache_create_key ()
#7  0x0000000000441d93 in ngx_http_upstream_hide_headers_hash ()
#8  0x00000000004386e6 in ngx_http_read_client_request_body ()
#9  0x000000000045b743 in ngx_http_file_cache_create_key ()
#10 0x0000000000460cf9 in ngx_http_upstream_init_ip_hash ()
#11 0x000000000042eb8c in ngx_http_core_content_phase ()
#12 0x000000000042a03d in ngx_http_core_run_phases ()
#13 0x000000000042dc54 in ngx_http_named_location ()
#14 0x000000000042f39c in ngx_http_core_try_files_phase ()
#15 0x000000000042a03d in ngx_http_core_run_phases ()
#16 0x0000000000432edc in ngx_http_test_reading ()
#17 0x0000000000433a05 in ngx_http_test_reading ()
#18 0x000000000041f79a in ngx_event_process_posted ()
#19 0x0000000000424d3a in ngx_single_process_cycle ()
#20 0x000000000042384f in ngx_spawn_process ()
#21 0x0000000000425966 in ngx_master_process_cycle ()
#22 0x000000000040c36a in main ()
(gdb) q


# cat nginx.conf

http {
> ...
>  geoip_country GeoIP.dat;
> ...
>
> location ~ \.php$ {
> ...
> fastcgi_param  GEOIP_COUNTRY_CODE $geoip_country_code;
> ...
> }
> }
>

-- 
Yours sincerely,
Vladimir Getmanshchuk

UNIX System Administrator
Openfilm, LLC

Email: vladget at openfilm.com
Skype: vladimir.getmanshchuk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20100330/fc2417b5/attachment.html>


Подробная информация о списке рассылки nginx-ru