Nginx fails to accept new connection if active worker crashes
|Reported by:||Fasih||Owned by:||somebody|
|Keywords:||multiple workers, ngx_accept_mutex, accept new connection fails||Cc:|
|uname -a:||Linux faskiri-pc 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:58:24 UTC 2010 x86_64 GNU/Linux|
nginx: nginx version: nginx/1.0.5
nginx: built by gcc 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
nginx: configure arguments: --without-http_ssi_module --without-http_geo_module --without-http_fastcgi_module --without-http_uwsgi_module --without-http_scgi_module --without-http_memcached_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-pcre --with-debug
If nginx is configured with multiple workers, killing the active worker causes nginx to "hang".
Further investigations(with nginx at debug level) showed that all threads are fine but none of the workers are getting the ngx_accept_mutex_lock.
Master tries to release the ngx_accept_mutex_lock if the dead process was holding it [
https://svn.nginx.org/nginx/browser/nginx/trunk/src/os/unix/ngx_process.c?annotate=blame#L503] but doesnt look like the value is set anywhere.
I think https://svn.nginx.org/nginx/changeset/612/nginx broke it.
I have been using nginx only for a couple of months now so I am not very sure of the diagnosis, please feel free to correct.