Nginx stuck processes

Maxim Dounin mdounin at mdounin.ru
Wed Nov 23 13:12:04 UTC 2011


Hello!

On Wed, Nov 23, 2011 at 08:38:26AM +0100, Sandesh K. wrote:

> Maxim Dounin wrote in post #1033042:
> > Hello!
> >
> > On Tue, Nov 22, 2011 at 06:51:56AM +0100, Sandesh K. wrote:
> >
> >>
> >> --without-mail_smtp_module
> > [...]
> >
> >> (gdb) backtrace
> >> #0 0x0031ebba in _int_malloc () from /lib/tls/libc.so.6
> >> #1 0x0031f89c in _int_memalign () from /lib/tls/libc.so.6
> >> #2 0x0031e2c7 in memalign () from /lib/tls/libc.so.6
> >> #3 0x00320367 in posix_memalign () from /lib/tls/libc.so.6
> >> #4 0x0805da38 in ngx_memalign (alignment=16, size=4069528, log=0x108) at
> >> src/os/unix/ngx_alloc.c:56
> >
> > The "size=4069528" looks really strange...
> >
> >> #5 0x0804b917 in ngx_palloc_block (pool=0x8d0b9b0, size=52) at
> >> src/core/ngx_palloc.c:184
> >
> > Could you please show
> >
> > fr 5
> > p *pool
> >
> > output from gdb?

[...]

> (gdb) fr 5
> #5  0x0804b917 in ngx_palloc_block (pool=0x90f58e0, size=128) at
> src/core/ngx_palloc.c:184
> 184         m = ngx_memalign(NGX_POOL_ALIGNMENT, psize, pool->log);
> (gdb) p *pool
> $1 = {d = {last = 0x90f599c
> "xxxx at fx.xxx.1xx.2xx.8x.8x.mail.xx.xx.com\r\t\b\001", end = 0x90f59e0
> "\b\001", next = 0x910cb20, failed = 0}, max = 216,
>   current = 0x90f58e0, chain = 0x0, large = 0x0, cleanup = 0x0, log =
> 0x90f5918}

Ok, it looks like pool is ok (pool->d.end - pool == 0x100).  
Probably the cause of strange arguments is either corrupted stack 
or some compiler optimizations.

> (gdb) backtrace
> #0  0x00f36130 in _int_malloc () from /lib/tls/libc.so.6
> #1  0x00f36b3c in _int_memalign () from /lib/tls/libc.so.6
> #2  0x00f354f7 in memalign () from /lib/tls/libc.so.6
> #3  0x00f37607 in posix_memalign () from /lib/tls/libc.so.6
> #4  0x0805da3c in ngx_memalign (alignment=16, size=16751288, log=0x108)
> at src/os/unix/ngx_alloc.c:56
> #5  0x0804b917 in ngx_palloc_block (pool=0x90f58e0, size=128) at
> src/core/ngx_palloc.c:184

For now I tend to think the problem is somewhere in (g)libc.  You may 
want to update it, and if it doesn't help - recompile with debug 
and dig into it further.

Maxim Dounin



More information about the nginx mailing list