I had another dbmail process run wild on me today, I was able to attach
gdb and get a stack trace:
$ sudo gdb --pid=32668
Password:
GNU gdb 2002-04-01-cvs
Copyright 2002 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 "sparc-linux".
Attaching to process 32668
Reading symbols from /usr/local/dbmail/bin/dbmail-imapd...done.
Reading symbols from /usr/lib/libmysqlclient.so.10...done.
Loaded symbols for /usr/lib/libmysqlclient.so.10
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_compat.so.2...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnss_db.so.2...done.
Loaded symbols for /lib/libnss_db.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /usr/lib/libdb3.so.3...done.
Loaded symbols for /usr/lib/libdb3.so.3
0x7012c434 in free () from /lib/libc.so.6
(gdb) bt
#0 0x7012c434 in free () from /lib/libc.so.6
#1 0x7012c174 in free () from /lib/libc.so.6
#2 0x7011c574 in fclose () from /lib/libc.so.6
#3 0x00012c88 in PerformChildTask (info=0xeffff3a0) at serverchild.c:339
#4 0x00012964 in CreateChild (info=0xeffff3a0) at serverchild.c:214
#5 0x00012230 in StartServer (conf=0xeffff438) at server.c:122
#6 0x00022fa0 in main (argc=0, argv=0x4a000) at imapd.c:112
(gdb) n
Single stepping until exit from function free,
which has no line number information.
It's been hanging here ever since, not sure what that means, but now
it's gdb that's chewing CPU.
Blake