From owner-freebsd-current@FreeBSD.ORG Fri May 16 17:28:34 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3457637B401 for ; Fri, 16 May 2003 17:28:34 -0700 (PDT) Received: from mail.imp.ch (mail.imp.ch [157.161.1.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16ED243F93 for ; Fri, 16 May 2003 17:28:33 -0700 (PDT) (envelope-from mb@imp.ch) Received: from cvs.imp.ch (cvs.imp.ch [157.161.4.9]) by mail.imp.ch (8.12.6p2/8.12.3) with ESMTP id h4H0SUkP069352; Sat, 17 May 2003 02:28:30 +0200 (CEST) (envelope-from Martin.Blapp@imp.ch) Date: Sat, 17 May 2003 02:28:30 +0200 (CEST) From: Martin Blapp To: fvdl@netbsd.org In-Reply-To: <20030515020716.Q47986@cvs.imp.ch> Message-ID: <20030517015411.L1023@cvs.imp.ch> References: <20030515011311.M47986@cvs.imp.ch> <20030515020716.Q47986@cvs.imp.ch> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: non blocking RPC-code, found reproducable error X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2003 00:28:34 -0000 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