Re: NFS locking: lockf freezes (rpc.lockd problem?)



On Sun, Aug 27, 2006 at 11:24:13AM +0000, Michael Abbott wrote:
I've been trying to make some sense of the "NFS locking" issue. I am
trying to run
# make installworld DESTDIR=/mnt
where /mnt is an NFS mount on a FreeBSD 4.11 server, but I am unable to
get past a call to `lockf`.

On this mailing list I've seen a thread starting with this message:
http://lists.freebsd.org/pipermail/freebsd-stable/2006-August/027561.html
and elsewhere I've seen this thread:
http://www.gatago.com/mpc/lists/freebsd/stable/21851805.html

The gist seems to be that rpc.lockd is badly behaved and broken and nobody
knows how to fix it. So, in case my experience is any help, here is what
I can report.

1. I have installed a fresh installation of FreeBSD 6.1 from the CD,
6.1-RELEASE-i386-disc1.iso, and have run `cd /usr/src; make buildworld;
make buildkernel` successfully (takes nearly 8 hours, but then it is a
fanless machine). The full distribution (as installed by sysinstall) is
present, but nothing else.

2. Intending to experiment with network booting, I've attempted
`make installworld DESTDIR=/mnt`, where /mnt is an NFS mount point on my
master server, running FreeBSD 4.11-RELEASE-p11.

3. This fails when invoking lockf. To work around this, I have started
rpc.lockd on the 4.11 server and configured all of the following lines in
rc.conf:
rpcbind_enable="YES"
nfs_client_enable="YES"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"

4. Now here is the behaviour:

# mount $MY_SERVER:$MY_PATH /mnt
# lockf /mnt/test ls
This works just fine
# cd /usr/src; make installworld DESTDIR=/mnt
This hangs in lockf, and is unkillable (even `kill -9` is no good, and ps
shows state = D+). So let's start another shell (Alt-F2):
# lockf /mnt/test ls
Also hangs.

Rebooting the test machine clears the problem, returning to the state at
the start of point (4), and the problem is completely repeatable in my
configuration.


Some observations:

- Hanging in "uninterruptible sleep" is not good. No doubt it's quite
possible that my 4.11 server has a broken rpc.lockd (or maybe I've not
configured it right: I just started rpc.lockd, rather than restarting the
server), but the behaviour of 6.1 is exceptionally unfriendly. In
particular, unkillable processes look like outright bugs to me.

- The conversation on mpc.lists.freebsd.stable (and elsewhere) looks
alarming. I get the impression that this part of FreeBSD 6.1 is really
rather broken and that there's no real sense of what to do about it.

Make sure that rpc.statd is running.
For debugging purposes, tcpdump of the corresponding communications would
be quite useful. Besides this, output of ps auxww | grep 'rpc\.' may be
interesting.

Attachment: pgpDYCPVViq8c.pgp
Description: PGP signature



Relevant Pages

  • Make installworld in single-user mode all the time?
    ... I'd like to patch a production server, with about 10 jails, running FreeBSD ... Documentation mentions that a reboot in single-user mode is necessary. ... you boot into single user mode to do the installworld. ...
    (freebsd-questions)
  • Re: Make installworld in single-user mode all the time?
    ... I'd like to patch a production server, with about 10 jails, running FreeBSD ... Documentation mentions that a reboot in single-user mode is necessary. ... you boot into single user mode to do the installworld. ...
    (freebsd-questions)
  • NFS locking: lockf freezes (rpc.lockd problem?)
    ... where /mnt is an NFS mount on a FreeBSD 4.11 server, but I am unable to get past a call to `lockf`. ... `make installworld DESTDIR=/mnt`, where /mnt is an NFS mount point on my master server, running FreeBSD 4.11-RELEASE-p11. ... This fails when invoking lockf. ...
    (freebsd-stable)
  • make release vs. installworld
    ... When upgrading a server to the ... However, installworld will fail, as it looks like some binaries are not ... And why is the FreeBSD release build process so complex? ...
    (freebsd-stable)
  • RE: freebsd-questions Digest, Vol 52, Issue 3
    ... To subscribe or unsubscribe via the World Wide Web, ... bypassing a proxy server ... > As some of you may recall, I'm engaged in an ongoing saga trying to set> up a FreeBSD machine on a school's network. ...
    (freebsd-questions)