From owner-freebsd-bugs Fri Apr 18 04:20:47 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA25680 for bugs-outgoing; Fri, 18 Apr 1997 04:20:47 -0700 (PDT) Received: from dg-rtp.dg.com (dg-rtp.rtp.dg.com [128.222.1.2]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id EAA25661 for ; Fri, 18 Apr 1997 04:20:43 -0700 (PDT) Received: by dg-rtp.dg.com (5.4R3.10/dg-rtp-v02) id AA05162; Fri, 18 Apr 1997 07:20:09 -0400 Received: from ponds by dg-rtp.dg.com.rtp.dg.com; Fri, 18 Apr 1997 07:20 EDT Received: from lakes.water.net (lakes [10.0.0.3]) by ponds.water.net (8.8.3/8.7.3) with ESMTP id GAA10496; Fri, 18 Apr 1997 06:41:37 -0400 (EDT) Received: (from rivers@localhost) by lakes.water.net (8.8.3/8.6.9) id GAA07390; Fri, 18 Apr 1997 06:48:17 -0400 (EDT) Date: Fri, 18 Apr 1997 06:48:17 -0400 (EDT) From: Thomas David Rivers Message-Id: <199704181048.GAA07390@lakes.water.net> To: ponds!labinfo.iet.unipi.it!luigi, ponds!lakes.water.net!rivers Subject: Re: kern/3304: NFS V2 readdir hangs Cc: ponds!freefall.freebsd.org!freebsd-bugs Content-Type: text Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Luigi Rizzo writes: > > Hi, > > I followed the interesting (and very detailed) analysis of the NFS > problem (PR kern/3304), and I have a possible patch. > > looking at nfs_rcvlock() is implemented, I notice that the only way to > return EALREADY is to have rep->r_mrep != NULL > > The variable comes (via nfs_reply() ) from nfs_request() where the code > is something like the following (I have reported only a few relevant > lines, from a 2.2.1-R system: > > $Id: nfs_socket.c,v 1.18 1996/10/11 10:15:33 dfr Exp $ > > > 923: tryagain: > ... > 933: rep->r_mrep = NULL; > ... > 979: error = nfs_reply(rep); > ... > 1064: goto tryagain; > > the problem is, r_mrep seems only to be set to something != NULL in > nfs_reply(). While I don't understand the code very well, it seems > to me that the initialization in line 933 should be moved outside > the retry loop, before line 923. Otherwise the locking cannot possibly > work because repeated calls to nfs_reply() use the same parameters. Well - what good eyes you have :-) I didn't notice that... > > Can someone (Dave ?) try the above fix and see if it works ? I'll give it a try later this morning (my time, EST ) and let you know. - Dave Rivers -