Date: Sat, 17 May 2003 02:28:30 +0200 (CEST) From: Martin Blapp <mb@imp.ch> To: fvdl@netbsd.org Cc: current@freebsd.org Subject: Re: non blocking RPC-code, found reproducable error Message-ID: <20030517015411.L1023@cvs.imp.ch> In-Reply-To: <20030515020716.Q47986@cvs.imp.ch> References: <20030515011311.M47986@cvs.imp.ch> <20030515020716.Q47986@cvs.imp.ch>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi
I got a bit futher. It seams that the serializing is broken
somewhat. If the reads on the server side are like:
read() = -1, errorno=EAGAIN (svc_vc.c line 511)
read() = 88, (svc_vc.c line 511)
read() = 4, (svc_vc.c line 511)
it works as it should.
And here it doesn't work.
read() = 88, (svc_vc.c line 511)
read() = 4, (svc_vc.c line 511)
read() = -1, errorno=EAGAIN (svc_vc.c line 511)
The last read happens because svc_vc_stat returns
XPRT_MOREREQS. I'm still investigating why this happens.
Maybe the calculation is still wrong somewhere in xdrrec ?
The tcpdump looks normal, as expected since mountd fails
while reading data, not replying.
In __xdrrec_getrec() rstrm->in_received == rstrm->in_received
In __xdrrec_getrec() rstrm->in_received == 88
In __xdrrec_getrec() rstrm->last_frag == 1
In __xdrrec_getrec() == TRUE (xdr_rec.c line 645)
xdrrec_eof() == FALSE (xdr_rec.c line 517)
svc_vc_stat() == XPRT_MOREREQS
I've found that we missed in svc_vc_recv() a xdrrec_skiprecord after
XDR_DECODE, but that didn't change the behaviour for
this bug.
if (cd->nonblock) {
cd->strm_stat = XPRT_IDLE;
if (!__xdrrec_getrec(xdrs, &cd->strm_stat, TRUE)) {
return FALSE;
}
}
xdrs->x_op = XDR_DECODE;
+ (void)xdrrec_skiprecord(xdrs);
Martin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030517015411.L1023>
