nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] folder +./ # Blocks forever where ./ currently mounted


From: Ken Hornstein
Subject: Re: [Nmh-workers] folder +./ # Blocks forever where ./ currently mounted by autofs (NFS4).
Date: Thu, 04 Aug 2016 23:06:27 -0400

>My goal is to have a set of mh folders for archiving old msgs 
>on a remote autofs mounted NFS filesystem. When I run the 'folder'
>command as shown below it hangs (so I have to kill it).

So, this suggests to me:

>fcntl(3, F_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0} 
><unfinished ...>
>+++ killed by SIGKILL +++

You're getting hung up in locking the sequence file.

I'm assuming that nothing else is trying to lock that file (you don't
have any other nmh programs open in another window, do you?).  I don't
know the specifics of your NFS filesystem, but does locking actually
work on it?  I seem to recall you need to run things like rpc.statd and
rpc.lockd to make locking work, at least on NFSv2 and NFSv3.  To me,
that doesn't seem like an nmh problem, exactly ... I mean, from that
system call trace we're not trying to lock that file twice, but we
block hard on the locking call (but other read locks are working earlier
in that trace).

And the more I look at it ... the more I am puzzled.  We are using
F_SETLK, which as I read it should fail immediately if there is a
conflicting lock.  The fact that it's not failing with an error makes
me think something more fundamental is going on.

If you can't figure out what you need to do to make locks work on your
NFS filesystem, well, it's easy to change the locking algorithm.  Check
out the "datalocking" option in mh-profile(5).  The default is fcntl()
locks, but you should have other options.  "dot" locking should always
work, but it's the worse-performing.  You could try lockf or flock locking,
if nmh detected that support was available (they'll be listed in the
mh-profile(5) man page if they are).

--Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]