[Dovecot] imap segfaults in dovecot 1.2 on logout

Sascha Wilde wilde at intevation.de
Thu Oct 16 16:06:58 EEST 2008


Timo Sirainen <tss at iki.fi> writes:
> On Thu, 2008-10-16 at 13:49 +0200, Sascha Wilde wrote:
>> Timo Sirainen <tss at iki.fi> writes:
>> > On Oct 15, 2008, at 5:57 PM, Sascha Wilde wrote:
>> >
>> >> #1  0x0806ab6c in command_unregister (name=0x815b9ab "LOGOUT") at
>> >> commands.c:83
>> >> 83                      if (strcasecmp(cmd[i].name, name) == 0) {
>> >> (gdb) p cmd[i]
>> >> $1 = {name = 0xb7e65ce7 <Address 0xb7e65ce7 out of bounds>, func =
>> >> 0xb7e6432d, flags = 0}
>> >>      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> >>
>> >> For some reasons this does _not_ happen when I simply close the
>> >> connection (without explicitly logging out)...
>> >
>> > Your plugin isn't probably unregistering some command it registered
>> > and the plugin is unloaded before commands_deinit() is called.
>> 
>> As said in my other mail, that was indeed the problem and it is now
>> solved.  The question still left is: why didn't I see the segfoult in
>> the logs when the connection was closed hard?
>> 
>> A quick look with gdb shows, that the deinit stuff is called in both
>> cases, so I'd guess its an logging issue?
>
> I've no idea really. Perhaps it was just luck? :)

No, this was really reproducible, I did it a couple of times, it always
looked like this:
With IMAP "LOGOUT"  command:
  <info> dovecot[22653]: IMAP(1 at example.com): Disconnected: Logged out bytes=31/953
  <error> dovecot[22653]: child 22687 (imap) killed with signal 11

Connection closed without LOGOUT:
  <info> dovecot[22653]: IMAP(1 at example.com): Connection closed bytes=0/272
and no hint of signal 11...

cheers
sascha
-- 
Sascha Wilde                                          OpenPGP key: 4BB86568
http://www.intevation.de/~wilde/                  http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück; AG Osnabrück, HR B 18998
Geschäftsführer:   Frank Koormann,  Bernhard Reiter,  Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20081016/c92b2418/attachment.bin 


More information about the dovecot mailing list