1.3.12 occasional segfaults

It’s a fairly vanilla install of nginx (with the exception of the SPDY
patch). We are seeing roughly 1 segfault every hour or so on each web
server… I didn’t generate a debugging log, because I wasn’t sure how
big
something like that would be for an entire hour, but I can if needed.


nginx -V

nginx version: nginx/1.3.12
built by gcc 4.5.1 20101208 [gcc-4_5-branch revision 167585] (SUSE
Linux)
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx
–pid-path=/var/run/nginx.pid --error-log-path=/usr/log/ngnix/error.log
–http-log-path=/usr/log/ngnix/access.log
–with-openssl=/home/software_source/openssl-1.0.1c --with-cc-opt=‘-I
/usr/local/ssl/include’ --with-ld-opt=‘-L /usr/local/ssl/lib’
–without-http_proxy_module --without-http_ssi_module
–with-http_ssl_module
–with-http_stub_status_module --with-http_spdy_module


backtrace from core dump:

#0 0x00000000004514ea in ngx_http_spdy_send_output_queue (sc=0xd77610)
at
src/http/ngx_http_spdy.c:713
cl =
c = 0x7fe9a5436f90
clcf =
out =
frame = 0xa250d0
fn =
#1 0x00000000004520b2 in ngx_http_spdy_write_handler (wev=) at src/http/ngx_http_spdy.c:644
rc =
c =
fc =
ctx =
r =
stream =
s =
sn =
sc = 0xd77610
#2 0x000000000041a5ba in ngx_event_process_posted (cycle=, posted=0x854a88) at src/event/ngx_event_posted.c:40
ev =
#3 0x000000000041a1d5 in ngx_process_events_and_timers (cycle=0x885a90)
at
src/event/ngx_event.c:276
flags = 3
timer =
delta = 81
#4 0x0000000000420038 in ngx_worker_process_cycle (cycle=0x885a90,
data=) at src/os/unix/ngx_process_cycle.c:807
worker =
i =
c =
#5 0x000000000041e9a3 in ngx_spawn_process (cycle=0x885a90,
proc=0x41ff6c
<ngx_worker_process_cycle>, data=0x2, name=0x59b51a “worker process”,
respawn=-3) at src/os/unix/ngx_process.c:198
on = 1
pid = 0
s = 2
#6 0x000000000041f5f6 in ngx_start_worker_processes (cycle=0x885a90,
n=4,
type=-3) at src/os/unix/ngx_process_cycle.c:362
i =
ch = {command = 1, pid = 6348, slot = 1, fd = 19}
#7 0x00000000004206d1 in ngx_master_process_cycle (cycle=0x885a90) at
src/os/unix/ngx_process_cycle.c:136
title = 0x973f74 “master process /usr/sbin/nginx”
p =
size = 31
i = 1
n =
sigio =
set = {__val = {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}}
itv = {it_interval = {tv_sec = 0, tv_usec = 0}, it_value =
{tv_sec =
0, tv_usec = 0}}
live =
delay =
ls =
ccf = 0x0
#8 0x000000000040546c in main (argc=, argv=) at src/core/nginx.c:412
i =
log = 0x84d7a0
cycle = 0x0
init_cycle = {conf_ctx = 0x0, pool = 0x884fa0, log = 0x84d7a0,
new_log = {log_level = 0, file = 0x0, connection = 0, handler = 0, data

0x0, action = 0x0}, files = 0x1, free_connections = 0x0,
free_connection_n =
0, reusable_connections_queue = {
prev = 0x0, next = 0x0}, listening = {elts = 0x0, nelts = 0,
size = 0, nalloc = 0, pool = 0x0}, paths = {elts = 0x0, nelts = 0, size
= 0,
nalloc = 1, pool = 0x0}, open_files = {last = 0x0, part = {elts = 0x0,
nelts
= 0, next = 0x0}, size = 0,
nalloc = 0, pool = 0x0}, shared_memory = {last = 0x0, part =
{elts = 0x0, nelts = 0, next = 0x0}, size = 1, nalloc = 0, pool = 0x0},
connection_n = 0, files_n = 0, connections = 0x0, read_events = 0x0,
write_events = 0x0, old_cycle = 0x0, conf_file = {
len = 0, data = 0x0}, conf_param = {len = 0, data = 0x0},
conf_prefix = {len = 1, data = 0x0}, prefix = {len = 0, data = 0x0},
lock_file = {len = 0, data = 0x0}, hostname = {len = 0, data = 0x0}}
ccf =

Posted at Nginx Forum:

On Thursday 21 February 2013 11:39:04 digitalpoint wrote:

It’s a fairly vanilla install of nginx (with the exception of the SPDY
patch). We are seeing roughly 1 segfault every hour or so on each web
server… I didn’t generate a debugging log, because I wasn’t sure how big
something like that would be for an entire hour, but I can if needed.

First of all, please update nginx and spdy-patch to the latest versions:
http://nginx.org/download/nginx-1.3.13.tar.gz
http://nginx.org/patches/spdy/patch.spdy-65_1.3.13.txt

It is possible that the problem is already solved.

wbr, Valentin V. Bartenev

http://nginx.org/en/donation.html

–with-openssl=/home/software_source/openssl-1.0.1c --with-cc-opt=‘-I
/usr/local/ssl/include’ --with-ld-opt=‘-L /usr/local/ssl/lib’
–without-http_proxy_module --without-http_ssi_module
–with-http_ssl_module --with-http_stub_status_module
–with-http_spdy_module

[…]

Yeah sorry… I didn’t see 1.3.13 came out the day prior. Either way,
glad
whatever it was seems to have been fixed before I asked… Upgrading to
1.3.13 and the occasional segfaults stopped.

Posted at Nginx Forum: