[Dovecot] index-related crash in dovecot 1.0.0
Hi, dovecot crashes with the following trace when accessing some Maildirs:
dovecot: 2007-05-16 13:30:09 Error: IMAP(6126360): file index-mail-headers.c: line 260 (index_mail_parse_header): assertion failed: (part != NULL) dovecot: 2007-05-16 13:30:09 Error: IMAP(6126360): Raw backtrace: imap [6126360] [0x80b6d6b] -> imap [6126360] [0x80b6769] -> imap [6126360] [0x808abda] -> imap 6126360 [0x80b2166] -> imap 6126360 [0x808ad03] -> imap [6126360] [0x80891bb] -> imap 6126360 [0x8089632] -> imap [6126360] [0x806dc3b] -> imap 6126360 [0x80a7cf6] -> imap [6126360] [0x805dc2f] -> imap 6126360 [0x805d7b3] -> imap 6126360 [0x805845f] -> imap 6126360 [0x805b272] -> imap [6126360] [0x805be65] -> imap [6126360] [0x805bddb] -> imap 6126360 [0x805bf4d] -> imap 6126360 [0x80bd1a8] -> imap 6126360 [0x80bc618] -> imap 6126360 [0x80645c9] -> /lib/libc.so.6(__libc_start_main+0x9e) [0x400383be] -> imap [6126360] [0x8056a01] dovecot: 2007-05-16 13:30:09 Error: child 6845 (imap) killed with signal 6
The command leading to the crash is (line wrapped for readability):
UID FETCH 1:214748367 (UID ENVELOPE BODYSTRUCTURE INTERNALDATE RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (Importance X-Priority Priority X-PIM-INFOS Content-Type Date)])
When I connect to dovecot and simply fetch with the following command:
UID FETCH 1:* (ENVELOPE)
dovecot seems to updates its dovecot.index.cache files and the crash never appears again. I have a mailbox that can be used to reproduce the error.
Best wishes, Jörg
# dovecot --version 1.0.0 # dovecot -n # /etc/dovecot/dovecot.conf base_dir: /var/run/dovecot/ log_path: /var/log/dovecot-error.out info_log_path: /var/log/dovecot.out log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap ssl_disable: yes disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login login_greeting: DVAG IMAP server ready login_process_per_connection: no login_chroot: no login_greeting_capability: yes login_processes_count: 5 login_max_connections: 2048 max_mail_processes: 2048 verbose_proctitle: yes mail_extra_groups: mail default_mail_env: maildir:%h/Maildir mail_location: maildir:%h/Maildir mail_read_mmaped: yes maildir_copy_with_hardlinks: yes mail_drop_priv_before_exec: yes mail_executable: /usr/local/bin/dovecot-postlogin mail_plugins: quota imap_quota acl namespace: type: private separator: . prefix: INBOX. location: maildir:%h/Maildir inbox: yes auth default: mechanisms: plain login master_user_separator: * worker_max_count: 64 passdb: driver: passwd-file args: /etc/dovecot/dovecot-master.pwd master: yes passdb: driver: checkpassword args: /usr/local/bin/checkpassword-zob userdb: driver: ldap args: /etc/dovecot/dovecot-ldap.conf plugin: quota: maildir:storage=0 acl: vfile:/etc/dovecot/acls
Sicherheit - Verfügbarkeit - Kontinuität
IT-Service-Management von
ScanPlus GmbH Tel. +49 731 92013 150 Lise-Meitner-Straße 5, D-89081 Ulm, Germany Fax. +49 731 92013 29 150 Web: http://www.scan-plus.de/ Mail: wendland@scan-plus.de
On Wed, 2007-05-16 at 13:44 +0200, J.Wendland@scan-plus.de wrote:
Hi, dovecot crashes with the following trace when accessing some Maildirs:
dovecot: 2007-05-16 13:30:09 Error: IMAP(6126360): file index-mail-headers.c: line 260 (index_mail_parse_header): assertion failed: (part != NULL) .. dovecot seems to updates its dovecot.index.cache files and the crash never appears again. I have a mailbox that can be used to reproduce the error.
Could you send me the mailbox privately? I can't reproduce this with my mailboxes, so it would make it easier for me to fix this.
On Wed, 2007-05-16 at 13:44 +0200, J.Wendland@scan-plus.de wrote:
dovecot: 2007-05-16 13:30:09 Error: IMAP(6126360): file index-mail-headers.c: line 260 (index_mail_parse_header): assertion failed: (part != NULL)
I'm still not sure how you managed to cause this, but I think this will fix it: http://dovecot.org/list/dovecot-cvs/2007-May/008821.html
Hi, more info:
Timo Sirainen <tss@iki.fi> schrieb am 16.05.2007 15:58:06:
On Wed, 2007-05-16 at 13:44 +0200, J.Wendland@scan-plus.de wrote:
dovecot: 2007-05-16 13:30:09 Error: IMAP(6126360): file index-mail-headers.c: line 260 (index_mail_parse_header): assertion failed: (part != NULL)
I'm still not sure how you managed to cause this, but I think this will fix it: http://dovecot.org/list/dovecot-cvs/2007-May/008821.html
I'll try this patch. The mailbox was used with rc15 with which the crash appeared. I then upgraded to 1.0.0 hoping that this version would not crash anymore but the error persisted. So it may be that rc15 did something wrong to the index files that causes the crash.
Jörg
-- Sicherheit - Verfügbarkeit - Kontinuität
IT-Service-Management von
ScanPlus GmbH Tel. +49 731 92013 150 Lise-Meitner-Straße 5, D-89081 Ulm, Germany Fax. +49 731 92013 29 150 Web: http://www.scan-plus.de/ Mail: wendland@scan-plus.de
On Fri, 2007-05-18 at 12:28 +0200, J.Wendland@scan-plus.de wrote:
Hi, more info:
Timo Sirainen <tss@iki.fi> schrieb am 16.05.2007 15:58:06:
On Wed, 2007-05-16 at 13:44 +0200, J.Wendland@scan-plus.de wrote:
dovecot: 2007-05-16 13:30:09 Error: IMAP(6126360): file index-mail-headers.c: line 260 (index_mail_parse_header): assertion failed: (part != NULL)
I'm still not sure how you managed to cause this, but I think this will fix it: http://dovecot.org/list/dovecot-cvs/2007-May/008821.html
I'll try this patch. The mailbox was used with rc15 with which the crash appeared. I then upgraded to 1.0.0 hoping that this version would not crash anymore but the error persisted. So it may be that rc15 did something wrong to the index files that causes the crash.
The problem isn't with index files, but how Dovecot initializes message parsing. Different code paths are used when headers are already found from indexes than when they're not. Also different code paths are used depending on what fields you want to fetch. So Dovecot always tries to minimize the amount of work needed to be done.
Hi Timo,
Timo Sirainen <tss@iki.fi> schrieb am 16.05.2007 15:58:06:
On Wed, 2007-05-16 at 13:44 +0200, J.Wendland@scan-plus.de wrote:
dovecot: 2007-05-16 13:30:09 Error: IMAP(6126360): file index-mail-headers.c: line 260 (index_mail_parse_header): assertion failed: (part != NULL)
I'm still not sure how you managed to cause this, but I think this will fix it: http://dovecot.org/list/dovecot-cvs/2007-May/008821.html
This patch fixes the issue. Thank you for your support.
Jörg
-- Sicherheit - Verfügbarkeit - Kontinuität
IT-Service-Management von
ScanPlus GmbH Tel. +49 731 92013 150 Lise-Meitner-Straße 5, D-89081 Ulm, Germany Fax. +49 731 92013 29 150 Web: http://www.scan-plus.de/ Mail: wendland@scan-plus.de
participants (2)
-
J.Wendland@scan-plus.de
-
Timo Sirainen