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

Kostik Belousov kostikbel at gmail.com
Sun Aug 27 14:18:59 UTC 2006


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060827/59c384f4/attachment.pgp


More information about the freebsd-stable mailing list