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



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.


I hope I've sent this mail to the right place and that it's of some help.
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: NFS locking: lockf freezes (rpc.lockd problem?)
    ... where /mnt is an NFS mount on a FreeBSD 4.11 server, ... I have installed a fresh installation of FreeBSD 6.1 from the CD, ... `make installworld DESTDIR=/mnt`, where /mnt is an NFS mount point on my ... master server, running FreeBSD 4.11-RELEASE-p11. ...
    (freebsd-stable)
  • 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)
  • 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: Updating security fixes without single user mode?
    ... >>At my server I just want to update the system with security fixes, ... >>go into single user mode and make installworld and mergemaster. ...
    (FreeBSD-Security)
  • Re: error while doing installworld
    ... >> on the command line. ... On the 'small' host, NFS mount those directories to /usr/src, /usr/ports ... 'installworld' from single user unless you bring up your networking ...
    (freebsd-current)