nginx 1.0.4 crashes

meris nginx-forum at nginx.us
Thu Jul 14 20:07:15 MSD 2011


Hi, I'm experiencing some random crashes. My server is Ubuntu 10.04,
with glibc 2.11.1-0ubuntu7.8. Here is an excerpt from the log file:

*** glibc detected *** nginx: worker process: double free or corruption
(!prev): 0x00000000009f9ad0 ***
======= Backtrace: =========
/lib/libc.so.6(+0x775b6)[0x7fde690ab5b6]
/lib/libc.so.6(cfree+0x73)[0x7fde690b1e83]
nginx: worker process(ngx_destroy_pool+0x10c)[0x41829c]
nginx: worker process[0x4441ac]
nginx: worker process[0x44441b]
nginx: worker process[0x44662d]
nginx: worker process[0x4556a4]
nginx: worker process[0x455bbd]
nginx: worker process[0x436424]
nginx: worker process(ngx_process_events_and_timers+0x5e)[0x42d54e]
nginx: worker process[0x434ad5]
nginx: worker process(ngx_spawn_process+0x194)[0x432de4]
nginx: worker process[0x433f12]
nginx: worker process(ngx_master_process_cycle+0x1b4)[0x435034]
nginx: worker process(main+0x947)[0x417517]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7fde69052c4d]
nginx: worker process[0x415d09]
[...]
[alert] 17175#0: worker process 17180 exited on signal 6 (core dumped)


After loading dumped core with gdb & doing "bt" I get this:

(gdb) bt
#0  0x00007fde69067a75 in raise () from /lib/libc.so.6
#1  0x00007fde6906b5c0 in abort () from /lib/libc.so.6
#2  0x00007fde690a14fb in ?? () from /lib/libc.so.6
#3  0x00007fde690ab5b6 in ?? () from /lib/libc.so.6
#4  0x00007fde690af6d8 in ?? () from /lib/libc.so.6
#5  0x00007fde690b058e in malloc () from /lib/libc.so.6
#6  0x00007fde690b18f9 in posix_memalign () from /lib/libc.so.6
#7  0x0000000000430b3c in ngx_memalign ()
#8  0x000000000041837c in ngx_create_pool ()
#9  0x000000000042e8f0 in ngx_event_accept ()
#10 0x000000000042dd84 in ngx_event_process_posted ()
#11 0x000000000042d57c in ngx_process_events_and_timers ()
#12 0x0000000000434ad5 in ?? ()
#13 0x0000000000432de4 in ngx_spawn_process ()
#14 0x00000000004354f6 in ngx_master_process_cycle ()
#15 0x0000000000417517 in main ()


More info about my nginx version:
nginx -V
nginx: nginx version: nginx/1.0.4
nginx: TLS SNI support enabled
nginx: configure arguments: --prefix=/etc/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-log-path=/var/log/nginx/access.log
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-scgi-temp-path=/var/lib/nginx/scgi
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi
--lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid
--with-debug --with-http_addition_module --with-http_dav_module
--with-http_flv_module --with-http_geoip_module
--with-http_gzip_static_module --with-http_image_filter_module
--with-http_perl_module --with-http_random_index_module
--with-http_realip_module --with-http_secure_link_module
--with-http_stub_status_module --with-http_ssl_module
--with-http_sub_module --with-http_xslt_module --with-ipv6
--with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl
--with-mail --with-mail_ssl_module
--add-module=/build/buildd/nginx-1.0.4/debian/modules/nginx-development-kit
--add-module=/build/buildd/nginx-1.0.4/debian/modules/nginx-upstream-fair
--add-module=/build/buildd/nginx-1.0.4/debian/modules/nginx-echo
--add-module=/build/buildd/nginx-1.0.4/debian/modules/nginx-lua
--add-module=/build/buildd/nginx-1.0.4/debian/modules/nginx-http-push
--add-module=/build/buildd/nginx-1.0.4/debian/modules/nginx-upload-progress
--add-module=/build/buildd/nginx-1.0.4/debian/modules/nginx-secure-download


The biggest problem is that the server process is still alive, but it no
longer handles connections.
It's necessary to restart it manually to make it work again. I thought
nginx had master/worker
architecture to prevent such cases - a worker would die, but the rest
should remain safe.

Anyway - is there any way to fix it? What can cause it?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,212400,212400#msg-212400




More information about the nginx mailing list