Bug 7454 - elm/NFS-mounted spool locking problem
elm/NFS-mounted spool locking problem
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: elm (Show other bugs)
6.1
All Linux
low Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-11-30 16:57 EST by bonnevil
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-29 09:34:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description bonnevil 1999-11-30 16:57:59 EST
I'm having a locking problem when attempting to use elm-2.5.1-1.i386.rpm
(Red Hat 6.1) to read a spool file mounted via NFS.  It looks like elm is
trying to use flock to make the lock, which is probably wrong:

  Cannot flock folder "/var/spool/mail/jrandom"! [No locks available]

The kernel syslogs:

  Nov 30 14:37:48 grun kernel: lockd: failed to monitor xxx.xx.x.xx
                            (IP address of NFS server) -^^^^^^^^^^^

I've downloaded elm-2.5.2 source from ftp.virginia.edu and attempted to
build it, but I noticed that the Configure script doesn't seem to be
able to see fcntl locking support under RH 6.1.  Here's that bit:

Configure script looks for F_SETLK definition in
  /usr/include/sys/fcntl.h                (file present on RH 6.1)
  /usr/include/sys/fcntlcom.h
  /usr/include/sys/file.h                 (file present on RH 6.1)
  /usr/include/fcntl.h                    (file present on RH 6.1)
  /usr/include/fcntlbits.h

Under Red Hat 5.2, F_SETLK was defined in /usr/include/fcntlbits.h, but
it's now defined in /usr/include/bits/fcntl.h instead, and the old file
has been removed.

I patched Configure so that it found F_SETLK, but I still get the same
error once the program is compiled.  I told Configure to compile with
support for fcntl and dot-locking.  Was not prompted for flock at all;
saw "flock() found." then "flock locking not available" in Configure.

I can reproduce the problem in Magic mode (-M) when reading any mail
folder with (elm -M -f somemailfile) on a NFS mounted directory.  If
I move the same file to a local directory and try the same command,
it works correctly.

I'm open to suggestions to make this work -- I've got a lot of people
using elm-2.4 to read mail via NFS with Red Hat 5.2 successfully, and
I'd like to upgrade them to RH 6.1.  Thanks.

  Steve Bonneville
  IMA System Administrator
  University of Minnesota


--- Configure   Tue Nov 30 13:34:07 1999
+++ Configure.orig      Tue Nov 30 11:37:15 1999
@@ -2619,9 +2619,6 @@
 elif $contains F_SETLK /usr/include/fcntlbits.h >/dev/null 2>&1; then
     echo 'F_SETLK found, fcntl locking available'
     has_fcntl="$define"
-elif $contains F_SETLK /usr/include/bits/fcntl.h >/dev/null 2>&1; then
-    echo 'F_SETLK found, fcntl locking available'
-    has_fcntl="$define"
 else
     echo 'F_SETLK not found, fcntl locking not available'
     has_fcntl="$undef"
Comment 1 bonnevil 1999-12-01 10:27:59 EST
Communicated with Bill Pemberton (elm maintainer, flash@virginia.edu)
and did further investigation.  It appears that NFS locking had at
some point been turned off on my clients; with statd/lockd running on
the clients properly elm works.  That fixes my main problem.

He also told me that elm-2.5.3 (unreleased) has included a fix similar
to the one I included above for the Configure script in 2.5.2.  I did
not look at the SRPM to see if the change is also there.

Locking seems to have changed from RH 5.2 (dot-locks only) to fcntl
only -- if there's no reason not to, it might be good to configure
both dot-locking and fcntl support.
Comment 2 Jeff Johnson 1999-12-01 10:34:59 EST
The goal since Red Hat 5.2 has been to use *only* fcntl locking in MTA/MUA.
Comment 3 Jeff Johnson 2000-02-29 09:34:59 EST
elm-2.5.3 is in Raw Hide and will be in Red Hat 6.2, and contains a patch
identical to yours above.

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