Opened 8 years ago

Closed 8 years ago

#1095 closed defect (worksforme)

nginx crashed

Reported by: bobykus@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.6.x
Keywords: Cc:
uname -a: Linux mailproxy01.some.net 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.6.2
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-z,relro --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-auth-pam --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-dav-ext-module --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-echo --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-upstream-fair --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/ngx_http_substitutions_filter_module

Description

Server crashing periodically

tail -f /var/log/nginx/error.log | grep signal
2016/10/05 14:09:58 [notice] 7463#0: signal 15 (SIGTERM) received, exiting

Debian GNU/Linux 8 \n \l

dpkg -l | grep nginx
ii nginx 1.6.2-5+deb8u2 all small, powerful, scalable web/proxy server
ii nginx-common 1.6.2-5+deb8u2 all small, powerful, scalable web/proxy server - common files
ii nginx-full 1.6.2-5+deb8u2+b1 amd64 nginx web/proxy server (standard version)
ii nginx-full-dbg 1.6.2-5+deb8u2+b1 amd64 nginx web/proxy server (standard version) - debugging symbols

Here is core dump backtrace

gdb /usr/sbin/nginx /tmp/core-nginx-11-33-33-9530-1475669436

GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/nginx...Reading symbols from /usr/lib/debug/.build-id/d2/c82927fb61b1497e9123e35f6db0aee695a6a1.debug...done.
done.
[New LWP 9530]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `nginx:'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f6612080be3 in epoll_wait_nocancel () at ../sysdeps/unix/syscall-template.S:81
81 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) bt
#0 0x00007f6612080be3 in
epoll_wait_nocancel () at ../sysdeps/unix/syscall-template.S:81
#1 0x000000000042b921 in ngx_epoll_process_events (cycle=0x890a20, timer=500, flags=0) at src/event/modules/ngx_epoll_module.c:579
#2 0x0000000000422737 in ngx_process_events_and_timers (cycle=cycle@entry=0x890a20) at src/event/ngx_event.c:248
#3 0x0000000000429a4a in ngx_worker_process_cycle (cycle=cycle@entry=0x890a20, data=data@entry=0x0) at src/os/unix/ngx_process_cycle.c:816
#4 0x00000000004283fa in ngx_spawn_process (cycle=cycle@entry=0x890a20, proc=proc@entry=0x429990 <ngx_worker_process_cycle>, data=data@entry=0x0, name=name@entry=0x4ac11e "worker process",

respawn=respawn@entry=-3) at src/os/unix/ngx_process.c:198

#5 0x0000000000429c84 in ngx_start_worker_processes (cycle=0x890a20, n=2, type=-3) at src/os/unix/ngx_process_cycle.c:364
#6 0x000000000042aa4b in ngx_master_process_cycle (cycle=0x890a20) at src/os/unix/ngx_process_cycle.c:136
#7 0x0000000000408b13 in main (argc=<optimized out>, argv=<optimized out>) at src/core/nginx.c:407
(gdb)

here is config

cat /etc/nginx/nginx.conf
user www-data;
pid /var/run/nginx.pid;
worker_processes 2;
worker_cpu_affinity 01 10;
timer_resolution 50ms; # Save gettimeofday calls
worker_rlimit_nofile 131072;

error_log /var/log/nginx/error.log info;
#error_log /var/log/nginx/error.log debug;

#addint to enable core dump
worker_rlimit_core 500M;
working_directory /tmp/;

events {

worker_connections 20000;
multi_accept on;

}

mail {

server_name mail.some.com;
resolver off;
auth_http 127.0.0.1:1080/mail-auth;
auth_http_timeout 60s;

proxy_pass_error_message on;
proxy_timeout 6h;

imap_auth login plain cram-md5;
imap_capabilities IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE;

pop3_auth plain cram-md5 apop;
pop3_capabilities CAPA TOP UIDL RESP-CODES PIPELINING USER;

smtp_auth login plain cram-md5;
smtp_capabilities ETRN ENHANCEDSTATUSCODES 8BITMIME DSN "SIZE 52428800";

ssl_certificate /etc/nginx/ssl/STAR.some.com.full;
ssl_certificate_key /etc/nginx/ssl/STAR.some.com.key;
ssl_session_cache shared:SSL:50m;
ssl_session_timeout 15m;
ssl_session_tickets on;

# modern configuration. tweak to your needs.
# Outlook 2010 only supports TLSv1
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK';
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;

server {

listen 110;
starttls on;
protocol pop3;

}
server {

listen 995;
ssl on;
protocol pop3;

}
server {

listen 143;
starttls on;
protocol imap;

}
server {

listen 993;
ssl on;
protocol imap;

}
server {

listen 587;
starttls on;
protocol smtp;

}
server {

listen 465;
starttls on;
protocol smtp;

}

}

http {

server {

listen 0.0.0.0:80;
server_name mail.some.com;
server_tokens off;
return 301 https://webmail.some.com/;

Change History (6)

comment:1 by Maxim Dounin, 8 years ago

Please try to reproduce the problem without any 3rd party modules compiled in.

comment:2 by bobykus@…, 8 years ago

I am very sure nginx does not have any 3rd party modules compiled in but the ones coming with deb package. What exactly modules you mean?

in reply to:  2 comment:3 by Valentin V. Bartenev, 8 years ago

Replying to bobykus@…:

I am very sure nginx does not have any 3rd party modules compiled in but the ones coming with deb package. What exactly modules you mean?

These are the 3rd-party modules compiled in:

--add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-auth-pam --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-dav-ext-module --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-echo --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-upstream-fair --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/ngx_http_substitutions_filter_module

The fact that they are coming with the deb package you are using does not make them official nor improves their stability.

comment:4 by Maxim Dounin, 8 years ago

Resolution: fixed
Status: newclosed

Feedback timeout.

comment:5 by Maxim Dounin, 8 years ago

Resolution: fixed
Status: closedreopened

comment:6 by Maxim Dounin, 8 years ago

Resolution: worksforme
Status: reopenedclosed
Note: See TracTickets for help on using tickets.