Solaris-8, Qmail, and Funky File Locking Problems?

From: Michael S. Peek (peek@tiem.utk.edu)
Date: Fri Jun 06 2003 - 14:28:49 EDT


Hello everyone.

Here's what I have:

1) A host running Solaris 8 w/ latest Recommended and Security patches applied.
2) This host has a home area for user goober in /export/home/a/goober/
3) When goober logs in, his home area is automounted to /home/goober using
   automountd's loopback filesystem.
4) Mail is delivered for goober@domain to /home/goober/Mailbox via Qmail.
5) Mail is not handled by external programs via ~goober/.qmail before
   delivering to ~goober/Mailbox as an mbox-style mailbox or to
   ~goober/Maildir/ as a Maildir-style mailbox. (Both mailbox methods have
   been tested thoroughly!)

Here's what happens:

1) Mail comes in for goober at the same time that goober calls up OpenWindow's
   mailtool, CDE's dtmail, or KDE 3.x's kmail attempts to update it's message
   list.

2) Qmail gets a lock on /home/goober/Mailbox (or
/home/goober/Maildir/new/<something>, in the case of kmail set up to use
Maildir) at the same time that mailtool/dtmail/kmail tries to get a lock on
the same file. One or the other must wait, and the log files show that Qmail
has spent plenty of time waiting for a lock before delivering. Eventually,
even if Qmail gets the lock first, mailtool/dtmail/kmail gets a lock right
after Qmail is finished delivering it's message, and subsequent messages to be
delivered by Qmail must wait in the queue until mailtool/dtmail/kmail release
their lock. (In the case of OpenWindow's mailtool, mailtool will never
release it's lock until goober presses the "Done" button! Very annoying.)

3) Waiting mail is delivered after the lock is released.

No mail is deleted from /home/goober/Mailbox, the file is simply opened for
reading by the mail reader to update the list of messages contained within.

Here's what goes wrong:

I can blast 300 messages to goober as quickly as possible, and if goober is
using mailtool, dtmail, or kmail (either mbox- or Maildir-style mailbox), then
some messages simply dissappear. In fact, the more goober tries to update the
list of messages in his mail reader, the more messages get dropped.

This only seems to happen with these three mail readers. Using /bin/mail,
/bin/mailx, pine, elm, mh/exmh/xmh, mutt or the (Maildir-only) IMAP/POP server
does not result in dropping messages.

This sounds like there's a bug in mailtool/dtmail/kmail's file locking
mechanism. Anybody have any ideas?

Michael
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:26:33 EDT