Nginx core dump

Hi

We are using the nginx imap mail module and we are seeing coredumps

Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for
details.
This GDB was configured as “amd64-marcel-freebsd”…
Core was generated by `nginx’.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /home/y/lib/libssl.so.3…done.
Loaded symbols for /home/y/lib/libssl.so.3
Reading symbols from /home/y/lib/libcrypto.so.3…done.
Loaded symbols for /home/y/lib/libcrypto.so.3
Reading symbols from /usr/lib32/compat/libc.so.4…done.
Loaded symbols for /usr/lib32/compat/libc.so.4
Reading symbols from /libexec/ld-elf32.so.1…done.
Loaded symbols for /libexec/ld-elf32.so.1
#0 0x0101f169 in ngx_ssl_write (c=0x1098040,
data=0xffffffff , size=20532628)
at src/event/ngx_event_openssl.c:1079
1079 src/event/ngx_event_openssl.c: No such file or directory.
in src/event/ngx_event_openssl.c
(gdb) bt
#0 0x0101f169 in ngx_ssl_write (c=0x1098040,
data=0xffffffff , size=20532628)
at src/event/ngx_event_openssl.c:1079
#1 0x01022345 in ngx_mail_send (wev=0x1396e28)
at src/mail/ngx_mail_handler.c:559
#2 0x01025ad6 in ngx_mail_imap_auth_state (rev=0x126ae28)
at src/mail/ngx_mail_imap_handler.c:360
#3 0x0101dcd9 in ngx_kqueue_process_events (cycle=0x1050028, timer=500,

flags=1) at src/event/modules/ngx_kqueue_module.c:689

#4 0x01014ca9 in ngx_process_events_and_timers (cycle=0x1050028)
at src/event/ngx_event.c:245
#5 0x0101b969 in ngx_worker_process_cycle (cycle=0x1050028, data=0x0)
at src/os/unix/ngx_process_cycle.c:791
#6 0x01019ee7 in ngx_spawn_process (cycle=0x1050028,
proc=0x101b89c , data=0x0,
name=0x1030d3e “worker process”, respawn=Cannot access memory at
address 0xffffdc18
) at src/os/unix/ngx_process.c:194
#7 0x0101b66d in ngx_reap_children (cycle=0x1050028)
at src/os/unix/ngx_process_cycle.c:612
#8 0x0101abbb in ngx_master_process_cycle (cycle=0x1050028)
at src/os/unix/ngx_process_cycle.c:180
#9 0x0100350a in main (argc=3, argv=0xffffde40) at
src/core/nginx.c:396

'any ideas on debugging this?

thanks!

Posted at Nginx Forum:

-bash-3.2$ nginx -V
nginx version: nginx/0.7.65
built by gcc 2.95.3 20010315 (release)
TLS SNI support disabled
configure arguments: --prefix=/home/y
–conf-path=/home/y/conf/ymail_nginx/nginx.conf
–pid-path=/home/y/var/run/ymail_nginx.pid
–lock-path=/home/y/var/run/ymail_nginx.lock
–error-log-path=/home/y/logs/ymail_nginx/error.log --without-http
–without-http_rewrite_module --with-mail --with-mail_ssl_module
–with-debug --user=nobody --with-cc=/home/y/bin/gcc
–with-cc-opt=-I/home/y/include --with-ld-opt=‘-L/home/y/lib -Wl,-rpath
/home/y/lib’

Posted at Nginx Forum:

Hello!

On Wed, Sep 01, 2010 at 06:20:42PM -0400, iceman wrote:

We are using the nginx imap mail module and we are seeing coredumps

[…]

(gdb) bt
#0 0x0101f169 in ngx_ssl_write (c=0x1098040,
data=0xffffffff , size=20532628)
at src/event/ngx_event_openssl.c:1079
#1 0x01022345 in ngx_mail_send (wev=0x1396e28)
at src/mail/ngx_mail_handler.c:559
#2 0x01025ad6 in ngx_mail_imap_auth_state (rev=0x126ae28)
at src/mail/ngx_mail_imap_handler.c:360

In 0.7.65 (as you claim in next message)
src/mail/ngx_mail_imap_handler.c:360 isn’t in
ngx_mail_imap_auth_state() function, it’s in
ngx_mail_imap_authenticate(). And the only call to
ngx_mail_send() in ngx_mail_imap_auth_state() is at line 298.

Do you have any patches applied?

Maxim D.

yes we have some changes.

#6 0x01019ee7 in ngx_spawn_process (cycle=0x1050028,
proc=0x101b89c , data=0x0,
name=0x1030d3e “worker process”, respawn=Cannot access memory at
address 0xffffdbf8

what does this mean? is this similar to
http://nginx.org/pipermail/nginx-ru/2009-October/029210.html

i can give you the dumps of any variables you would like us to examine.

thanks again for your help

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