This problem really stems from a poorly designed mount protocol. When using ONC/RPC over UDP, RPC requests and responses are limited to 8kbytes of data. If a RPC response can not fit into that limited space the RPC will fail. The mountd protocol has a procedure MOUNTPROC_EXPORT that returns a list of all exported file systems and which machines are allowed to import it. If a server has many clients and exports many file systems this RPC reply will no longer fit into 8kbytes! Fortunately, only the list of exported file systems is relevant to programs such as the automounter. It is thus possible to return an abbreviated reply that uses a placeholder for the hosts lists. Fix: The fix below first try to send a regular RPC reply, only when this fails, an abbreviated reply is sent. The fix has been verified on 3.5 and 4.2 hosts. How-To-Repeat: Set up a FreeBSD NFS file server and export many file systems to many hosts. Verify that the output from showmount -e your.nfs.server is really long (longer than 8k). From a IRIX host, try ls /hosts/your.file.server/. The ls will eventually fail. On the file server you will find a syslog entry "can't send reply".
Responsible Changed From-To: freebsd-bugs->alfred I'll take a look at this, I think we should make sure we have an error related to RPC size before sending an abbreviated reply, I'll see if we can do that easily before committing the attached patch.
State Changed From-To: open->closed Patch committed in version 1.66 of mountd.c