rpc.lockd leaking memory on 6.3

Bill Moran wmoran at potentialtech.com
Thu Apr 10 14:33:10 UTC 2008

In response to Mark Lastdrager <mark.lastdrager at pine.nl>:
> Recently we updated our main NFS server to FreeBSD 6.3. This machine 
> serves about 10 netboot clients all running FreeBSD 6.2. Since the upgrade 
> we are having some issues with locking. We tried to avoid running the 
> lockd daemons at all but most software on the netboot clients (Apache, 
> Postfix) refuses to run without it.
> On the 6.3 server rpc.lockd leaks memory, somewhat less than 1 meg per 
> hour. This means that every few days we need to restart the daemon. This 
> is quite annoying because we need to stop/start rpc.lockd on both the 
> server and the clients in a controlled fashion. In most cases also the 
> daemons using locking need to be restarted.
> Is this a known issue? I could not find a PR for it. Maybe a workaround? I 
> found some recent posts on the -current list about a complete rewrite of 
> the locking mechanism, will this be ported to 6-STABLE in the future?

I can't say whether your issue is know, but I do have a suggested workaround
until it can be tracked down and fixed.  From the mount_nfs man page:

     -L      Do not forward fcntl(2) locks over the wire.  All locks will be
             local and not seen by the server and likewise not seen by other
             NFS clients.  This removes the need to run the rpcbind(8) service
             and the rpc.statd(8) and rpc.lockd(8) servers on the client.

This has been working acceptably for us for a while.  I expect it will
work for you unless you have applications that rely on locking for
actual shared file access.

As far as the actual issue ... sounds like you should open a PR.

Bill Moran

More information about the freebsd-questions mailing list