Mail spool file locking problems during mail delivery

Mail spool file locking problems during mail delivery

Post by Tom Marazi » Wed, 12 Oct 1994 03:08:25



Howdy all,

Intermittently, and seemingly with users at random, mail delivery
fails with the error:

mail: /usr/mail/USER.lock not creatable after 10 tries
/usr/mail/USER.lock: Interrupted system call
550 USER... Can't create output

where USER is replaced with the user name of the addressee.  Once
this starts to happen with a particular person, lockd must be
killed and restarted before that person can receive mail again.

This indicates to me that the file has been lockf'd, but was
never subsequently unlocked.   I installed patch PHNE_3424 which
is supposed to fix (amongst other things):

        File/record locks* over NFS (including ksh and mailx)

but it hasn't seemed to help.  Logs from statd and lockd don't
show anything suspicious.

Although many people read their mail from this /usr/spool/mail
parititon via NFS mounts, our sendmail only delivers mail into
the partition on one system.

If this problem sounds familiar to anyone, or anyone has any
suggestions as to where I might look further for a solution, I
would appreciate hearing from you.

Thanks!
Tom

===========================================================================
Tom Marazita            | Center for Computational Sciences and Engineering
                        | 3107 Engineering 1

Tel: 805 893-3221       | Santa Barbara, CA 93106
===========================================================================

 
 
 

Mail spool file locking problems during mail delivery

Post by Brian Hackl » Wed, 12 Oct 1994 08:28:49


|> Howdy all,
|>
|> Intermittently, and seemingly with users at random, mail delivery
|> fails with the error:
|>
|> mail: /usr/mail/USER.lock not creatable after 10 tries
|> /usr/mail/USER.lock: Interrupted system call
|> 550 USER... Can't create output
|>
|> where USER is replaced with the user name of the addressee.  Once
|> this starts to happen with a particular person, lockd must be
|> killed and restarted before that person can receive mail again.
|>
|> This indicates to me that the file has been lockf'd, but was
|> never subsequently unlocked.   I installed patch PHNE_3424 which
|> is supposed to fix (amongst other things):
|>
|>   File/record locks* over NFS (including ksh and mailx)
|>
|> but it hasn't seemed to help.  Logs from statd and lockd don't
|> show anything suspicious.

Don't forget the rpc.lockd patch, PHNE_4056.  Make sure you kill
the rpc.lockd before installing the patch.  Put BOTH patches on
all HP's (server and client).  There is also a kernal lock mgr
fix for S800 9.0 PHKL_4735, S800 9.04 PHKL_4732, which should
also be in the NFS kernal megapatch for S700 9.01 PHKL_4776
S700 9.03 9.05 PHKL_4777.

Hope this helps,

-> Brian

--

Hewlett-Packard Chelmsford Response Center     Mailstop CHD-01-RC
300 Apollo Drive  Chelmsford MA 01824               508-436-4478/
#include <std_disclaimer.h>   Telecommuting for now!   1-436-4478

 
 
 

1. Locking inboxes in /var/mail - without causing local agent (mail) to bounce mail

I am trying to figure out a method to modify inbox files in a /var/mail/
directory.  Specifically I want to do so without causing mail to fail to
deliver any new messages while I am modifying the file.  

It appears that if an inbox file is locked for too long, mail will
bounce the message.  I've looked at the source code for elm, and it
appears to lock the file in the same manner I am trying to lock it
(flock and .lock file).  

It seems that if I copy the file and delete it, then that operation is
quick enough not to step on mail, and all mail will be delivered that
was received during the period it was locked.  However, as this script
should eventually work for a mailbox with possibly 10,000 parcels of
mail in it, it may take too long to copy it, and incoming mail would be
bounced while the file is locked.

I am working on an HP-UX 10.20.  I want to run this script as a normal
user (should I set to mail group?).

I am writing this script in Perl.

Thanks in advance...
Darryl

2. Where's METAL?

3. Mail lock file problem. Help!

4. Active Server Pages and TAPI Urgent

5. NFS/file locking/mail sharing problems on HPUX 9.0.5

6. UNIX/VMS Systems Managers London-City. c £40,000 + Bonus and Excellent Banking Package

7. WANTED: deliver (mail delivery program)

8. Mail file locking

9. /usr/mail/*.lock files get left around

10. mail file (automounted on Sun) locks

11. root.lock problem on NFS mounted /usr/mail

12. Lock problems with /bin/mail over NFS from DEC