Bug 173906 - imap index tree corruption on NFS mounted homedirs
imap index tree corruption on NFS mounted homedirs
Product: Fedora
Classification: Fedora
Component: dovecot (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: John Dennis
Depends On:
  Show dependency treegraph
Reported: 2005-11-22 09:31 EST by Fabrice Bellet
Modified: 2014-01-21 17:53 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-11-22 11:37:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Fabrice Bellet 2005-11-22 09:31:49 EST
Description of problem:

dovecot is accessed with squirrelmail with the imap protocol, on an up-to-date
fedora core 4. When performing (delete) "move to trash" operation with
squirrelmail, the following error message appears in the mailog, and the move
operation is aborted :

Nov 22 14:56:10 tux imap(bellet): Corrupted binary tree file
/misc/raid/bellet/mail/.imap/Trash/.imap.index.tree: UID to be inserted isn't
higher than existing (273 <= 274)

Refreshing the view of the inbox allows to continue with the imap session.

This error is not 100% reproductible, but occurs more frequently, when :
  . large amount of messages are deleted in the webmail
  . new messages are delivered to the inbox in parallel.

The particularity of the homedir is that it is mounted over NFS, via the
automounter, with the following options :

disk.creatis.insa-lyon.fr:/mnt/raid /misc/raid nfs
0 0

A simple way to reproduce this problem is to setup an NFS mounted home
directory, deliver mail to this user on a periodic interval, and delete these
messages in parallel with squirrelmail.

dovecot.conf contains these options :
protocols = imap imaps pop3 pop3s
imap_listen = [::]
pop3_listen = [::]
imaps_listen = [::]
pop3s_listen = [::]
ssl_cert_file = /etc/pki/dovecot/dovecot.pem
ssl_key_file = /etc/pki/dovecot/private/dovecot.pem
login_dir = /var/run/dovecot-login
login = imap
login = pop3
first_valid_uid = 100
mbox_locks = fcntl
auth = default
auth_mechanisms = plain
auth_userdb = passwd
auth_passdb = pam
auth_user = root
Comment 1 Timo Sirainen 2005-11-22 10:07:54 EST
0.99.x Dovecot doesn't support having index files in NFS mounted directories,
don't do it.

1.0-alpha versions support it with setting mmap_disable=yes, but it still has
some problems.

Append eg. :INDEX=/var/indexes/%u to default_mail_env to move indexes elsewhere.
Comment 2 Fabrice Bellet 2005-11-22 11:37:43 EST
Thanks for the hint ! I didn't read the documentation carefully and missed this
point. I appended ":INDEX=MEMORY" instead, because the machine has many
accounts, and I'm a lazy sysadmin :-) I think I can live with the cpu overhead.
Now it works.  

Note You need to log in before you can comment on or make changes to this bug.