On Thu, 29 Oct 2009 12:38:22 -0400 Timo Sirainen <t...@iki.fi> wrote:
> On Thu, 2009-10-29 at 12:11 +0200, Nikita Koshikov wrote: > > On Wed, 28 Oct 2009 14:17:52 -0400 > > Timo Sirainen <t...@iki.fi> wrote: > > > > > On Wed, 2009-10-28 at 10:39 +0200, Nikita Koshikov wrote: > > > > > > Oct 26 15:26:38 IMAP(gozhd...@domain.com): Panic: data stack: Out > > > > > > of memory when allocating 268435472 bytes > > > > > > Oct 26 15:26:38 IMAP(gozhd...@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. > > Not with the "out of memory", but did it get rid of the "double free or > corruption" error? The valgrind error is the same. I'll attach current valgrid output. Also, I have noticed, that valgrind writes vgcore.* files in user's homedir, I attach gdb backtrace from that file. > > > > 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 ? > > I guess it's just exponentially increasing the buffer size then until it > reaches mail_process_size. > > > I recompile dovecot binaries with debug symbols, but seemed that gdb > > backtrace is broken. > > Yeah, it is. Hmm. Since the core isn't working, can you attach gdb to > imap process while it's still running? So something like: > > - open the account so imap process starts > - gdb -p <imap process pid> > - gdb command: c > - cause imap to crash -> gdb should stop > - gdb command: bt full > The problem, that webmail don't keep permanent connection, so when I login - there are about 2-3 imap-login\disconnected log entries. And when I try to get directory listing the new process created for this operation and then crushes. Can gdb work in non-interactive mode ? so I can write wrapper to handle debug output ? Also I enable imap_debug feature on webmail client, as you say - it stop working after client trying to access "All" virtual folder. The appropriate imap-session log part is also attached. Note, I can't reproduce panic with Thunderbird, this happens in roundcube only. All virtual folder config is: cat /var/mail/virtual/.all/dovecot-virtual #All messages in all folders * all
vcore-gdb.trace
Description: Binary data
dovecot-error.valgrind
Description: Binary data
=====cut====== [30-Oct-2009 10:30:11 +0200]: S: * LIST (\HasNoChildren) "/" "1" [30-Oct-2009 10:30:11 +0200]: S: * LIST (\HasNoChildren) "/" "Drafts" [30-Oct-2009 10:30:11 +0200]: S: * LIST (\HasChildren) "/" "Dealers" [30-Oct-2009 10:30:11 +0200]: S: * LIST (\HasNoChildren) "/" "Dealers/Kapriz" [30-Oct-2009 10:30:11 +0200]: S: * LIST (\HasNoChildren) "/" "Dealers/1 Inbox" [30-Oct-2009 10:30:11 +0200]: S: * LIST (\HasNoChildren) "/" "Dealers/2 Outbox" [30-Oct-2009 10:30:11 +0200]: S: * LIST (\HasNoChildren) "/" "Spam" [30-Oct-2009 10:30:11 +0200]: S: * LIST (\HasNoChildren) "/" "Trash" [30-Oct-2009 10:30:11 +0200]: S: * LIST (\HasNoChildren) "/" "INBOX" [30-Oct-2009 10:30:11 +0200]: S: * LIST (\Noselect \HasChildren) "/" "Company" [30-Oct-2009 10:30:11 +0200]: S: * LIST (\HasNoChildren) "/" "Company/all" [30-Oct-2009 10:30:11 +0200]: S: * LIST (\HasNoChildren) "/" "Company/favorites" [30-Oct-2009 10:30:11 +0200]: S: lmb OK List completed. [30-Oct-2009 10:30:12 +0200]: C: lsb LSUB "" "*" [30-Oct-2009 10:30:12 +0200]: S: * LSUB () "/" "Sent" [30-Oct-2009 10:30:12 +0200]: S: * LSUB () "/" "Drafts" [30-Oct-2009 10:30:12 +0200]: S: * LSUB () "/" "Spam" [30-Oct-2009 10:30:12 +0200]: S: * LSUB () "/" "1" [30-Oct-2009 10:30:12 +0200]: S: * LSUB () "/" "INBOX" [30-Oct-2009 10:30:12 +0200]: S: * LSUB () "/" "Business correspondence/Inbox" [30-Oct-2009 10:30:12 +0200]: S: * LSUB () "/" "Business correspondence/Outbox" [30-Oct-2009 10:30:12 +0200]: S: * LSUB () "/" "Trash" [30-Oct-2009 10:30:12 +0200]: S: lsb OK Lsub completed. [30-Oct-2009 10:30:12 +0200]: C: sel1 SELECT "INBOX" [30-Oct-2009 10:30:12 +0200]: S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk) [30-Oct-2009 10:30:12 +0200]: S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk \*)] Flags permitted. [30-Oct-2009 10:30:12 +0200]: S: * 37 EXISTS [30-Oct-2009 10:30:12 +0200]: S: * 0 RECENT [30-Oct-2009 10:30:12 +0200]: S: * OK [UIDVALIDITY 1245314909] UIDs valid [30-Oct-2009 10:30:12 +0200]: S: * OK [UIDNEXT 39] Predicted next UID [30-Oct-2009 10:30:12 +0200]: S: * OK [HIGHESTMODSEQ 1] Highest [30-Oct-2009 10:30:12 +0200]: S: sel1 OK [READ-WRITE] Select completed. [30-Oct-2009 10:30:12 +0200]: C: sel1 SELECT "Drafts" [30-Oct-2009 10:30:12 +0200]: S: * OK [CLOSED] Previous mailbox closed. [30-Oct-2009 10:30:12 +0200]: S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) [30-Oct-2009 10:30:12 +0200]: S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted. [30-Oct-2009 10:30:12 +0200]: S: * 0 EXISTS [30-Oct-2009 10:30:12 +0200]: S: * 0 RECENT [30-Oct-2009 10:30:12 +0200]: S: * OK [UIDVALIDITY 1245314913] UIDs valid [30-Oct-2009 10:30:12 +0200]: S: * OK [UIDNEXT 1] Predicted next UID [30-Oct-2009 10:30:12 +0200]: S: * OK [HIGHESTMODSEQ 1] Highest [30-Oct-2009 10:30:12 +0200]: S: sel1 OK [READ-WRITE] Select completed. [30-Oct-2009 10:30:12 +0200]: C: sel1 SELECT "Sent" [30-Oct-2009 10:30:12 +0200]: S: * OK [CLOSED] Previous mailbox closed. [30-Oct-2009 10:30:12 +0200]: S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) [30-Oct-2009 10:30:12 +0200]: S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted. [30-Oct-2009 10:30:12 +0200]: S: * 17 EXISTS [30-Oct-2009 10:30:12 +0200]: S: * 0 RECENT [30-Oct-2009 10:30:12 +0200]: S: * OK [UIDVALIDITY 1245314910] UIDs valid [30-Oct-2009 10:30:12 +0200]: S: * OK [UIDNEXT 18] Predicted next UID [30-Oct-2009 10:30:12 +0200]: S: * OK [HIGHESTMODSEQ 4] Highest [30-Oct-2009 10:30:12 +0200]: S: sel1 OK [READ-WRITE] Select completed. [30-Oct-2009 10:30:12 +0200]: C: sel1 SELECT "Spam" [30-Oct-2009 10:30:12 +0200]: S: * OK [CLOSED] Previous mailbox closed. [30-Oct-2009 10:30:12 +0200]: S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk) [30-Oct-2009 10:30:12 +0200]: S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk \*)] Flags permitted. [30-Oct-2009 10:30:12 +0200]: S: * 2 EXISTS [30-Oct-2009 10:30:12 +0200]: S: * 0 RECENT [30-Oct-2009 10:30:12 +0200]: S: * OK [UIDVALIDITY 1245314912] UIDs valid [30-Oct-2009 10:30:12 +0200]: S: * OK [UIDNEXT 3] Predicted next UID [30-Oct-2009 10:30:12 +0200]: S: * OK [HIGHESTMODSEQ 3] Highest [30-Oct-2009 10:30:12 +0200]: S: sel1 OK [READ-WRITE] Select completed. [30-Oct-2009 10:30:12 +0200]: C: sel1 SELECT "Trash" [30-Oct-2009 10:30:12 +0200]: S: * OK [CLOSED] Previous mailbox closed. [30-Oct-2009 10:30:12 +0200]: S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) [30-Oct-2009 10:30:12 +0200]: S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted. [30-Oct-2009 10:30:12 +0200]: S: * 1 EXISTS [30-Oct-2009 10:30:12 +0200]: S: * 0 RECENT [30-Oct-2009 10:30:12 +0200]: S: * OK [UIDVALIDITY 1245314911] UIDs valid [30-Oct-2009 10:30:12 +0200]: S: * OK [UIDNEXT 2] Predicted next UID [30-Oct-2009 10:30:12 +0200]: S: * OK [HIGHESTMODSEQ 1] Highest [30-Oct-2009 10:30:12 +0200]: S: sel1 OK [READ-WRITE] Select completed. [30-Oct-2009 10:30:12 +0200]: C: sel1 SELECT "1" [30-Oct-2009 10:30:12 +0200]: S: * OK [CLOSED] Previous mailbox closed. [30-Oct-2009 10:30:12 +0200]: S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) [30-Oct-2009 10:30:12 +0200]: S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted. [30-Oct-2009 10:30:12 +0200]: S: * 0 EXISTS [30-Oct-2009 10:30:12 +0200]: S: * 0 RECENT [30-Oct-2009 10:30:12 +0200]: S: * OK [UIDVALIDITY 1245314915] UIDs valid [30-Oct-2009 10:30:12 +0200]: S: * OK [UIDNEXT 1] Predicted next UID [30-Oct-2009 10:30:12 +0200]: S: * OK [HIGHESTMODSEQ 1] Highest [30-Oct-2009 10:30:12 +0200]: S: sel1 OK [READ-WRITE] Select completed. [30-Oct-2009 10:30:12 +0200]: C: sel1 SELECT "Company" [30-Oct-2009 10:30:12 +0200]: S: * OK [CLOSED] Previous mailbox closed. [30-Oct-2009 10:30:12 +0200]: S: sel1 NO [CANNOT] Virtual mailbox missing configuration file [30-Oct-2009 10:30:12 +0200]: C: sel1 SELECT "Company/all"