[Dovecot] mailbox count folders issues

Nikita Koshikov koshikov at gmail.com
Thu Oct 29 12:11:59 EET 2009


On Wed, 28 Oct 2009 14:17:52 -0400
Timo Sirainen <tss at iki.fi> wrote:

> On Wed, 2009-10-28 at 10:39 +0200, Nikita Koshikov wrote:
> > > > Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Panic: data stack: Out of memory when allocating 268435472 bytes
> > > > Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Error: *** glibc detected *** imap: double free or corruption (!prev): 0x0812ba00 ***
> 
> Oh, the double free is because of broken handling of out-of-memory
> error. http://hg.dovecot.org/dovecot-1.2/rev/acfef2f0fec3 probably fixes
> that.

Sorry, but this patch didn't help.

> 
> > > It's anyway related to one of your virtual maiboxes. I suppose you have
> > > a virtual mailbox that includes messages from all real mailboxes?
> > 
> > Yes, I have two virtual mailboxes:
> > all - contains all messages
> > favorites - contains flagged letters
> > 
> > But this user didn't subscribe to any of them.
> 
> Backtrace shows that it crashes while trying to refresh a virtual
> mailbox.
> 
> Hmm. So I guess there's no memory corruption causing this, but I don't
> really see why it would try to allocate that much memory. 268435472 in
> hex is 0x10000010, which is an interesting number but doesn't really
> help much either.
268435456 is 256M which is max mail_process_size config setting, maybe this values is in use ? 

> 
> Can you make sure debugging symbols aren't stripped from imap binary
> (i.e. "file /usr/.../dovecot/imap" says "not stripped", this is the
> default when compiling Dovecot from sources) and get gdb backtrace?
> http://dovecot.org/bugreport.html Then I could see exactly where it's
> crashing and figuring out this would be a lot easier.
I recompile dovecot binaries with debug symbols, but seemed that gdb backtrace is broken.

root at mail dovecot-1.2.6 0:0 # file /usr/libexec/dovecot/imap
/usr/libexec/dovecot/imap: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped

root at mail dovecot-1.2.6 0:130 # gdb /usr/libexec/dovecot/imap /data/mail/domain.com/gozhda.a/core 
GNU gdb 6.8
Copyright (C) 2008 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 "i686-pc-linux-gnu"...
(no debugging symbols found)

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /usr/lib/dovecot/imap/lib10_quota_plugin.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/imap/lib10_quota_plugin.so
Reading symbols from /usr/lib/dovecot/imap/lib11_imap_quota_plugin.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/imap/lib11_imap_quota_plugin.so
Reading symbols from /usr/lib/dovecot/imap/lib11_trash_plugin.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/imap/lib11_trash_plugin.so
Reading symbols from /usr/lib/dovecot/imap/lib20_autocreate_plugin.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/imap/lib20_autocreate_plugin.so
Reading symbols from /usr/lib/dovecot/imap/lib20_expire_plugin.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/imap/lib20_expire_plugin.so
Reading symbols from /usr/lib/dovecot/imap/lib20_virtual_plugin.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/imap/lib20_virtual_plugin.so
Reading symbols from /usr/lib/dovecot/imap/lib20_zlib_plugin.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/imap/lib20_zlib_plugin.so
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libbz2.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libbz2.so.1
Reading symbols from /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1

(no debugging symbols found)
Core was generated by `imap'.
Program terminated with signal 6, Aborted.
[New process 29774]
#0  0xffffe424 in __kernel_vsyscall ()
(gdb) bt full
#0  0xffffe424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7e6e660 in raise () from /lib/libc.so.6
No symbol table info available.
#2  0xb7e6fe98 in abort () from /lib/libc.so.6
No symbol table info available.
#3  0xb7ea983d in ?? () from /lib/libc.so.6
No symbol table info available.
#4  0x0000034f in ?? ()
No symbol table info available.
#5  0xbfdb8624 in ?? ()
No symbol table info available.
#6  0x00000400 in ?? ()
No symbol table info available.
#7  0xb7f69da8 in ?? () from /lib/libc.so.6
No symbol table info available.
#8  0x00000017 in ?? ()
No symbol table info available.
#9  0xbfdb97fb in ?? ()
No symbol table info available.
#10 0x00000004 in ?? ()
No symbol table info available.
#11 0xb7f69dc1 in ?? () from /lib/libc.so.6
No symbol table info available.
#12 0x00000002 in ?? ()
No symbol table info available.
#13 0xb7f69ea0 in ?? () from /lib/libc.so.6
No symbol table info available.
#14 0x00000021 in ?? ()
No symbol table info available.
#15 0xb7f69dc5 in ?? () from /lib/libc.so.6
No symbol table info available.
#16 0x00000004 in ?? ()
No symbol table info available.
#17 0xbfdb8b53 in ?? ()
No symbol table info available.
#18 0x00000008 in ?? ()
No symbol table info available.
#19 0xb7f69dcb in ?? () from /lib/libc.so.6
No symbol table info available.
#20 0x00000005 in ?? ()
No symbol table info available.
#21 0x00000000 in ?? ()
No symbol table info available.
(gdb) quit

Also all *.so libraries have "not stripped".

PS 
provided backtrace includes your patch.



More information about the dovecot mailing list