NFS file locking problem, rpc.lockd seems to be leaking ports?

Palle Girgensohn girgen at pingpong.net
Wed Feb 15 01:15:10 PST 2006


Hi!

I'm having a problem with rpc.lockd

Clients are mainly FreeBSD 5.4-stable, server is FreeBSD-4.11-RELEASE-p13.

/home is nfs mounted via amd.

rpc.statd and rpc.lockd is on for both clients and server

Since we started using eclipse (which requires file locking to operate) we 
get problems where the number of open priviledged UDP ports on the server 
are exhausted.

running sockstat | grep rpc.lock show over 400 lines like this:

root     rpc.lock   174  440 udp4   *:580                 *:*

The default setting for FreeBSD-4.11 seems to be a portrange of 400 ports, 
I've bumped this by lowering net.inet.ip.portrange.lowlast from 600 -> 500, 
but eventually they will all be in use too. I have not found good way to 
free them properly apart from rebooting the server.

All nfs traffic is UDP only, perhaps that is a problem?

nfsiod -n 4 on all clients

nfs_server_flags="-u -n 12" on the server, perhaps it is too low?

There are only six workstations attached to the server. Each have about ten 
rpc.lockd sockets open, while the server has about 400, so it seems to be a 
leakage in the server?


I have lived with this, planning an upgrade of the server to freebsd-6, 
hoping it will fix it, but now I've upgraded one of the workstations to 
freebsd-6, and nfs file locking does not work at all for this client. I 
have to turn if off completely to even get firefox, or a a buildworld with 
src nfs-mounted (local objdir), to work, and it is not a problem of "out of 
ports" on the server, there are enough left. It seems nfs locking with -6 
client and -4.11 server is broken? Will an upgrade of the server help? Has 
anyone else seen this problem?

Regards,

Palle



More information about the freebsd-net mailing list