mmap cache file trouble

Patrick Welche prlw1 at cam.ac.uk
Fri Nov 13 10:10:53 EST 2009


With cyrus-imap (and mutt) code of 11 November, I just got:

IOERROR: mapping cache file for user.prlw1.http: Cannot allocate memory
Fatal error: failed to mmap cache file
 
I think that cyrus can work on systems with no mmap, so if mmap fails, could
mmap-avoiding methods be used instead (read/write)? (Haven't checked the
code...)
 
But there is another side to this which puzzles me. After upgrading the
system, I essentially did
 
reconstruct user/prlw1
opened INBOX (about 233,000 messages) using mutt
tagged 9651 of them
copied the tagged messages to an empty, freshly created user/prlw1/http

During this phase, the imap server failed to mmap the new mailbox's cache
file.

INBOX with all its messages has

-rw-------  1 cyrus  mail  347M Nov 13 05:23 cyrus.cache
-rw-------  1 cyrus  mail  155B Nov 12 10:16 cyrus.header
-rw-------  1 cyrus  mail   20M Nov 13 05:23 cyrus.index
# ls -1 | wc -l
  233797

yet new http folder, which should contain far fewer messages has

-rw-------  1 cyrus  mail  804M Nov 12 21:19 cyrus.cache
-rw-------  1 cyrus  mail  155B Nov 12 18:56 cyrus.header
-rw-------  1 cyrus  mail   41M Nov 12 21:19 cyrus.index
# ls -1 | wc -l
  491568

So what are all these files?
# ls -liS
1167478 -rw-------  4 cyrus  mail   28342472 Jan 28  2008 113844.
1167478 -rw-------  4 cyrus  mail   28342472 Jan 28  2008 260251.
1167478 -rw-------  4 cyrus  mail   28342472 Jan 28  2008 383849.
1149545 -rw-------  4 cyrus  mail   21925261 Sep 24  2007 245262.
1149545 -rw-------  4 cyrus  mail   21925261 Sep 24  2007 368860.
1149545 -rw-------  4 cyrus  mail   21925261 Sep 24  2007 98855.
1233627 -rw-------  5 cyrus  mail   21795046 Jun 12 16:41 160927.
1233627 -rw-------  5 cyrus  mail   21795046 Jun 12 16:41 307334.
1233627 -rw-------  5 cyrus  mail   21795046 Jun 12 16:41 430932.
1233627 -rw-------  5 cyrus  mail   21795046 Jun 12 16:41 474643.
1172884 -rw-------  4 cyrus  mail   20400877 Mar  3  2008 118751.
1172884 -rw-------  4 cyrus  mail   20400877 Mar  3  2008 265158.
1172884 -rw-------  4 cyrus  mail   20400877 Mar  3  2008 388756.

Somehow multiple copies of the same file are being written with
different filenames, yet same inode number.

Any guesses on what is happening? (I have the telemetry log)
(NetBSD-current/i386, ffs+wapbl/raidframe 1 filesystem)

Cheers,

Patrick


More information about the Cyrus-devel mailing list