[Dovecot] Segfault in imap_bodystructure_write when searching

Timo Sirainen tss at iki.fi
Sun Jun 1 19:33:21 EEST 2008


On Jun 1, 2008, at 7:17 PM, Christer Mjellem Strand wrote:

> This latest crash I can reproduce by just trying to open the  
> mailbox, no searching necessary.

Is it with the files you sent me or some other mailbox?

>> One way to maybe avoid gdb backtrace corruption is to attach gdb  
>> while
>> the process is still running. Like:
>>
>> 1. Log in so imap process exists
>> 2. gdb /usr/lib/dovecot/imap `pidof imap`
>> 3. cont
>> 4. make it crash
>> 5. bt full
>
> I have very limited gdb experience, and can't seem to make this work  
> as intended. I've restarted dovecot and logged in so only one imap  
> process exists, and attached to that. However, it seems that this  
> process keeps on running, and instead spawns children, and they're  
> the ones that die immediately.
> The main process stays alive, and no backtrace is generated when I  
> just kill dovecot to stop the loop..

Only dovecot process forks new processes. I guess it's possible that  
your IMAP client works by first creating one connection (first imap  
process) and then when selecting the mailbox logs in using a new  
connection.

> Any pointers as to how I could attach gdb to any of those processes,  
> or other ways to proceed?

How about manually:

telnet localhost 143
a login user pass
<< gdb attach >>
b select mailbox

> Please excuse my ignorance here. I've found a successful workaround  
> (just regenerating the index files), but since you state that you  
> wish to fix every crasher, I'll gladly help debug this until you've  
> pinpointed it, if you have the patience to bear with me.. :)

Yes, fixing the crash would be good.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080601/07ec4e2a/attachment.bin 


More information about the dovecot mailing list