misc/88856: XDR/RPC breaks when sending msgs > 9000 bytes

Susan LoVerso sue at sleepycat.com
Fri Nov 11 11:20:17 PST 2005


>Number:         88856
>Category:       misc
>Synopsis:       XDR/RPC breaks when sending msgs > 9000 bytes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 11 19:20:15 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Susan LoVerso
>Release:        5.4
>Organization:
Sleepycat Software
>Environment:
FreeBSD tiffany.bostic.com 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun May  8 07:00:26 UTC 2005     root at portnoy.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64                           
>Description:
 The addition of the non-blocking code to XDR/RPC breaks some
operations, in particular those that have a message that exceeds
9000 bytes (RPC_MAXDATASIZE) when being sent from the client to the
server.  Sending from the server to the client large messages does
not have this problem and succeeds.  The client is sending the full
amount and the server is returning XPRT_DIED from __xdrrec_getrec
because fraglen is the full message size and it is > in_maxrec.

This results in the server closing its end and the client getting ECONNRESET.

             
>How-To-Repeat:
 There is a simple program that simulates what our software is doing.
You can retrieve it from 
     ftp://ftp.sleepycat.com/hidden/rpcbug.tar.gz.
This contains sources and some ktrace output from an earlier failed
run from both client and server halves.

After unpacking it you should just be able to:
% make
% ./file_svc&
% ./rls localhost test/*

The server outputs messages like this :
SVC: Sending file test/file1: size 85
SVC: Received file test/file1: size 85
..

The client program outputs messages like this:
% ./rls localhost test/*
Recv test/file1: 85 bytes
Sent test/file1: 85 bytes
Recv test/file2: 1360 bytes
Sent test/file2: 1360 bytes
Recv test/file3: 8925 bytes
Sent test/file3: 8925 bytes
Recv test/file4: 9010 bytes
localhost: RPC: Unable to receive; errno = Connection reset by peer

You can see that file4 is able to be transferred from server TO
client, with size 9010, but when the client tries to send file4,
it gets ECONNRESET.

You can also use 'Makefile.dbg' which will build with local versions
of instrumented copies of xdr_rec.c and clnt_vc.c which have print
messages in interesting places.

             
>Fix:
no              
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list