"rpc mount export: RPC: Can't decode result" when export list is to long

Andrey Simonenko simon at comsys.ntu-kpi.kiev.ua
Tue Feb 8 10:15:51 UTC 2011


On Mon, Feb 07, 2011 at 05:59:10PM -0500, Rick Macklem wrote:
> > This this the update (this is the minimal version, without optimization):
> > 
> > --- svc_vc.c.orig	2009-08-03 11:13:06.000000000 +0300
> > +++ svc_vc.c	2011-01-31 11:31:28.000000000 +0200
> > @@ -546,7 +546,7 @@ write_vc(xprtp, buf, len)
> >  				cd->strm_stat = XPRT_DIED;
> >  				return (-1);
> >  			}
> > -			if (cd->nonblock && i != cnt) {
> > +			if (cd->nonblock) {
> >  				/*
> >  				 * For non-blocking connections, do not
> >  				 * take more than 2 seconds writing the
> > @@ -560,6 +560,7 @@ write_vc(xprtp, buf, len)
> >  					return (-1);
> >  				}
> >  			}
> > +			i = 0;
> >  		}
> >  	}
> 
> First off, good catch Andrey.
> 
> Second, sorry for taking soo long to respond. I'm in a location where my internet
> access is limited and I missed this message on the first pass through my email.
> 
> I'm somewhat familiar with the kernel RPC, where the RPC messages are all in one
> record, which means they're limited to the size set by svc_vc_create(). I looked
> and see that the userland RPC library does split large messages into multiple
> records over TCP, so the limitation doesn't exist for TCP for userland. (ie. What
> I said before only applies to the UDP case and not the TCP one.)
> 
> I won't be able to commit the above fix until April (due to the limited internet
> access before then), but will commit it then. Thanks for the fix.

I created PR about this mistake:

http://www.freebsd.org/cgi/query-pr.cgi?pr=154505

> 
> W.r.t. The "brief" case, I don't know, but my guess was it was done to help
> make things work for UDP clients, which are limited to 8800 byte RPC messages.
> (That limit could be increased tojust under 64K, but since the message ends up
>  being IP fragmented, it's not a great plan, imho.) I don't know if there are
> any "showmount" commands out there still using UDP only.

This change was made to support some automounter that uses UDP, but such
behaviour for MOUNT EXPORTS request is not mentioned in RFC1813:

http://www.freebsd.org/cgi/query-pr.cgi?pr=26320


More information about the freebsd-fs mailing list