# gdb -c /spool/core/nginx.core.46385 /usr/local/sbin/nginx<br>GNU gdb 6.1.1 [FreeBSD]<br>Copyright 2004 Free Software Foundation, Inc.<br>GDB is free software, covered by the GNU General Public License, and you are<br>welcome to change it and/or distribute copies of it under certain conditions.<br>
Type &quot;show copying&quot; to see the conditions.<br>There is absolutely no warranty for GDB.š Type &quot;show warranty&quot; for details.<br>This GDB was configured as &quot;amd64-marcel-freebsd&quot;...<br>Core was generated by `nginx&#39;.<br>
Program terminated with signal 11, Segmentation fault.<br>Reading symbols from /lib/libcrypt.so.5...done.<br>Loaded symbols for /lib/libcrypt.so.5<br>Reading symbols from /usr/local/lib/libpcre.so.0...done.<br>Loaded symbols for /usr/local/lib/libpcre.so.0<br>
Reading symbols from /lib/libmd.so.5...done.<br>Loaded symbols for /lib/libmd.so.5<br>Reading symbols from /lib/libz.so.5...done.<br>Loaded symbols for /lib/libz.so.5<br>Reading symbols from /usr/local/lib/libGeoIP.so.5...done.<br>
Loaded symbols for /usr/local/lib/libGeoIP.so.5<br>Reading symbols from /usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so...done.<br>Loaded symbols for /usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so<br>Reading symbols from /lib/libm.so.5...done.<br>
Loaded symbols for /lib/libm.so.5<br>Reading symbols from /lib/libutil.so.8...done.<br>Loaded symbols for /lib/libutil.so.8<br>Reading symbols from /lib/libc.so.7...done.<br>Loaded symbols for /lib/libc.so.7<br>Reading symbols from /usr/local/lib/perl5/site_perl/5.10.1/mach/auto/nginx/nginx.so...done.<br>
Loaded symbols for /usr/local/lib/perl5/site_perl/5.10.1/mach/auto/nginx/nginx.so<br>Reading symbols from /libexec/ld-elf.so.1...done.<br>Loaded symbols for /libexec/ld-elf.so.1<br>#0š 0x0000000800b66447 in _GeoIP_seek_record (gi=0x80141d0a0, ipnum=3232261218) at GeoIP.c:635<br>
635šššš GeoIP.c: No such file or directory.<br>ššššššš in GeoIP.c<br>(gdb) bt<br>#0š 0x0000000800b66447 in _GeoIP_seek_record (gi=0x80141d0a0, ipnum=3232261218) at GeoIP.c:635<br>#1š 0x0000000800b67831 in GeoIP_id_by_ipnum (gi=0x80141d0a0, ipnum=3232261218) at GeoIP.c:1092<br>
#2š 0x0000000800b673cd in GeoIP_country_code_by_ipnum (gi=0x80141d0a0, ipnum=3232261218) at GeoIP.c:991<br>#3š 0x000000000048bf05 in ngx_http_geoip_country_variable (r=0x801435c00, v=0x8014496e0, data=4238596) at src/http/modules/ngx_http_geoip_module.c:176<br>
#4š 0x000000000045ad38 in ngx_http_get_indexed_variable (r=0x801435c00, index=26) at src/http/ngx_http_variables.c:406<br>#5š 0x000000000045fded in ngx_http_script_copy_var_len_code (e=0x7fffffffe160) at src/http/ngx_http_script.c:710<br>
#6š 0x0000000000496608 in ngx_http_fastcgi_create_request (r=0x801435c00) at src/http/modules/ngx_http_fastcgi_module.c:740<br>#7š 0x000000000046283e in ngx_http_upstream_init_request (r=0x801435c00) at src/http/ngx_http_upstream.c:478<br>
#8š 0x00000000004625d4 in ngx_http_upstream_init (r=0x801435c00) at src/http/ngx_http_upstream.c:419<br>#9š 0x0000000000459033 in ngx_http_read_client_request_body (r=0x801435c00, post_handler=0x4624f0 &lt;ngx_http_upstream_init&gt;) at src/http/ngx_http_request_body.c:58<br>
#10 0x000000000049617d in ngx_http_fastcgi_handler (r=0x801435c00) at src/http/modules/ngx_http_fastcgi_module.c:618<br>#11 0x000000000044296d in ngx_http_core_content_phase (r=0x801435c00, ph=0x801630ed8) at src/http/ngx_http_core_module.c:1319<br>
#12 0x00000000004416d2 in ngx_http_core_run_phases (r=0x801435c00) at src/http/ngx_http_core_module.c:856<br>#13 0x0000000000441648 in ngx_http_handler (r=0x801435c00) at src/http/ngx_http_core_module.c:839<br>#14 0x000000000044e5f4 in ngx_http_process_request (r=0x801435c00) at src/http/ngx_http_request.c:1625<br>
#15 0x000000000044d0a6 in ngx_http_process_request_headers (rev=0x801c00150) at src/http/ngx_http_request.c:1068<br>#16 0x000000000044c88e in ngx_http_process_request_line (rev=0x801c00150) at src/http/ngx_http_request.c:873<br>
#17 0x000000000044c028 in ngx_http_init_request (rev=0x801c00150) at src/http/ngx_http_request.c:514<br>#18 0x000000000042edcc in ngx_event_process_posted (cycle=0x801424050, posted=0x5c83c0) at src/event/ngx_event_posted.c:39<br>
#19 0x000000000042ca51 in ngx_process_events_and_timers (cycle=0x801424050) at src/event/ngx_event.c:272<br>#20 0x0000000000439167 in ngx_worker_process_cycle (cycle=0x801424050, data=0x0) at src/os/unix/ngx_process_cycle.c:795<br>
#21 0x00000000004362d1 in ngx_spawn_process (cycle=0x801424050, proc=0x438f90 &lt;ngx_worker_process_cycle&gt;, data=0x0, name=0x4a4de1 &quot;worker process&quot;, respawn=-3) at src/os/unix/ngx_process.c:196<br>#22 0x000000000043801a in ngx_start_worker_processes (cycle=0x801424050, n=4, type=-3) at src/os/unix/ngx_process_cycle.c:355<br>
#23 0x00000000004376e9 in ngx_master_process_cycle (cycle=0x801424050) at src/os/unix/ngx_process_cycle.c:136<br>#24 0x000000000040b47c in main (argc=1, argv=0x7fffffffeba8) at src/core/nginx.c:396<br>(gdb) fr 0<br>#0š 0x0000000800b66447 in _GeoIP_seek_record (gi=0x80141d0a0, ipnum=3232261218) at GeoIP.c:635<br>
635šššš in GeoIP.c<br>(gdb) p *gi<br>$1 = {GeoIPDatabase = 0x80133f700, file_path = 0x80144b040 &quot;/usr/local/www/conf/nginx/GeoIP.dat&quot;, cache = 0x801502000 &quot;\\\001&quot;, index_cache = 0x0, databaseSegments = 0x80144c0ac,<br>
š databaseType = 1 &#39;\001&#39;, mtime = 1269938756, flags = 1, size = 959538, record_length = 3 &#39;\003&#39;, charset = 0, record_iter = -1515870811, netmask = -1515870811, last_mtime_check = 1270548268}<br>(gdb) p buf<br>
$2 = (const unsigned char *) 0x8074f6600 &lt;Address 0x8074f6600 out of bounds&gt;<br>(gdb) p stack_buffer<br>$3 = &quot; ĞA\001\b\000\000&quot;<br>(gdb) p depth<br>$4 = 29<br>(gdb)<br><br><br><div class="gmail_quote">2010/4/2 Maxim Dounin <span dir="ltr">&lt;<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello!<br>
<div class="im"><br>
On Fri, Apr 02, 2010 at 06:04:05PM +0300, Vladimir Getmanshchuk wrote:<br>
<br>
&gt; (gdb) bt<br>
&gt; #0 š0x0000000800b66447 in _GeoIP_seek_record (gi=0x80141d0a0,<br>
&gt; ipnum=3232261218) at GeoIP.c:635<br>
<br>
</div>fr 0<br>
p *gi<br>
p buf<br>
p stack_buffer<br>
p depth<br>
<div><div></div><div class="h5"><br>
Maxim Dounin<br>
<br>
_______________________________________________<br>
nginx-ru mailing list<br>
<a href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx-ru" target="_blank">http://nginx.org/mailman/listinfo/nginx-ru</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Yours sincerely,<br>Vladimir Getmanshchuk<br><br>UNIX System Administrator<br>Openfilm, LLC<br><br>Email: <a href="mailto:vladget@openfilm.com">vladget@openfilm.com</a><br>
Skype: vladimir.getmanshchuk<br><br>