Re: Error: Corrupted record in index cache file
On 12/5/18 12:19 PM, Aki Tuomi wrote: > >> On 05 December 2018 at 20:54 Orion Poplawski wrote: >> >> >> With dovecot-2.2.36-3.el7.x86_64 we had a couple hours where mail_plugins did >> not properly include zlib for all of the needed services. This seems to have >> led to some corruption in our mdbox mailboxes. >> >> I've run doveadm force-resync on a number of users, but I'm still seeing >> messages like this: >> >> dovecot[13563]: imap(USER): Error: Corrupted record in index cache file >> /var/spool/imap/USER/mailboxes/INBOX/dbox-Mails/dovecot.index.cache: UID >> 67976: Broken physical size in mailbox INBOX: >> read(zlib(/var/spool/mail/USER/storage/m.1203)) failed: Cached message size >> smaller than expected (2978 < 8192, box=INBOX, UID=67976) >> >> Is there anything that can be done about this? Can I safely delete the >> dovecot.index.cache file? I'm hesitant to do so since I understand that the >> mdbox format uses the index to store mailbox information and deleting at >> least >> some index files is a destructive operation. >> >> Thanks! > > Erasing the cache file causes dovecot to recache the mails on access. It can > cause performance issues, but no data loss. > > Aki Thank you for the confirmation. Removing those cache files appears to have fixed the corruption users were seeing on their clients. Resting much more easily now - Orion -- Orion Poplawski Manager of NWRA Technical Systems 720-772-5637 NWRA, Boulder/CoRA Office FAX: 303-415-9702 3380 Mitchell Lane or...@nwra.com Boulder, CO 80301 https://www.nwra.com/
Error: Corrupted record in index cache file
With dovecot-2.2.36-3.el7.x86_64 we had a couple hours where mail_plugins did not properly include zlib for all of the needed services. This seems to have led to some corruption in our mdbox mailboxes. I've run doveadm force-resync on a number of users, but I'm still seeing messages like this: dovecot[13563]: imap(USER): Error: Corrupted record in index cache file /var/spool/imap/USER/mailboxes/INBOX/dbox-Mails/dovecot.index.cache: UID 67976: Broken physical size in mailbox INBOX: read(zlib(/var/spool/mail/USER/storage/m.1203)) failed: Cached message size smaller than expected (2978 < 8192, box=INBOX, UID=67976) Is there anything that can be done about this? Can I safely delete the dovecot.index.cache file? I'm hesitant to do so since I understand that the mdbox format uses the index to store mailbox information and deleting at least some index files is a destructive operation. Thanks! -- Orion Poplawski Manager of NWRA Technical Systems 720-772-5637 NWRA, Boulder/CoRA Office FAX: 303-415-9702 3380 Mitchell Lane or...@nwra.com Boulder, CO 80301 https://www.nwra.com/
Re: Segmentation fault in pigeonhole lib-sieve
On 12/30/2014 03:04 PM, Stephan Bosch wrote: On 12/29/2014 10:02 PM, Orion Poplawski wrote: The sieve plugin for Thundirbird likes to rapidly compile work in progress sieve scripts to continually give feedback on any errors in the script. This can trigger segmentation faults in lib-sieve with certain pathologically incomplete sieve scripts. One example: Yes. This is a very straightforward problem. Here's a completely naive attempt at a patch: That is a good fix. However, lib-sieve has a utility function for verifications like this and that should have been used. Comparator handling predates this function, so I must have forgot to change comparator validation accordingly, which would have fixed this problem implicitly. Well, it is fixed now: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/b6c55ac6460d Thanks! Regards, Stephan. Excellent, thanks for the quick fix! -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA/CoRA DivisionFAX: 303-415-9702 3380 Mitchell Lane or...@cora.nwra.com Boulder, CO 80301 http://www.cora.nwra.com
Segmentation fault in pigeonhole lib-sieve
The sieve plugin for Thundirbird likes to rapidly compile work in progress sieve scripts to continually give feedback on any errors in the script. This can trigger segmentation faults in lib-sieve with certain pathologically incomplete sieve scripts. One example: #0 tag_comparator_validate (valdtr=0x7f291aa713a0, arg=0x7fff5c3cfa58, cmd=0x7f291aa69360) at sieve-comparators.c:143 143 if ( (*arg)-type != SAAT_STRING ) { Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-12.el7.x86_64 glibc-2.17-55.el7_0.3.x86_64 sssd-client-1.11.2-68.el7_0.6.x86_64 zlib-1.2.7-13.el7.x86_64 (gdb) list 138 *arg = sieve_ast_argument_next(*arg); 139 140 /* Check syntax: 141 * :comparator comparator-name: string 142 */ 143 if ( (*arg)-type != SAAT_STRING ) { 144 sieve_argument_validate_error(valdtr, *arg, 145 :comparator tag requires one string argument, but %s was found, 146 sieve_ast_argument_name(*arg) ); 147 return FALSE; (gdb) print arg $1 = (struct sieve_ast_argument **) 0x7fff5c3cfa58 (gdb) print *arg $2 = (struct sieve_ast_argument *) 0x0 So sieve_ast_argument_next() is returning NULL and we're trying to dereference it without checking. Here's a completely naive attempt at a patch: --- dovecot-2.2.15/dovecot-2.2-pigeonhole-0.4.3/src/lib-sieve/sieve-comparators.c.null 2014-01-01 15:46:39.0 -0700 +++ dovecot-2.2.15/dovecot-2.2-pigeonhole-0.4.3/src/lib-sieve/sieve-comparators.c 2014-12-29 14:01:00.233436697 -0700 @@ -140,6 +140,11 @@ static bool tag_comparator_validate /* Check syntax: * :comparator comparator-name: string */ + if ( *arg == NULL ) { + sieve_argument_validate_error(valdtr, *arg, + :comparator tag requires one string argument, but none was found); + return FALSE; + } if ( (*arg)-type != SAAT_STRING ) { sieve_argument_validate_error(valdtr, *arg, :comparator tag requires one string argument, but %s was found, -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA, Boulder/CoRA Office FAX: 303-415-9702 3380 Mitchell Lane or...@nwra.com Boulder, CO 80301 http://www.nwra.com
Is the mdbox format backwards compatible?
I'm contemplating using dsync with dovecot-2.2.10 (el7) and then transferring the resulting mdbox files to a dovecot-2.0.9 (el6) server. Is the mdbox format backwards compatible between the two versions? Thanks, Orion -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA, Boulder/CoRA Office FAX: 303-415-9702 3380 Mitchell Lane or...@nwra.com Boulder, CO 80301 http://www.nwra.com