From owner-freebsd-current Mon Mar 17 14: 7:41 2003 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 8321337B405 for ; Mon, 17 Mar 2003 14:07:39 -0800 (PST) Received: from Math.Berkeley.EDU (gold.Math.Berkeley.EDU [169.229.58.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id B698B43FBD for ; Mon, 17 Mar 2003 14:07:37 -0800 (PST) (envelope-from steve@Math.Berkeley.EDU) Received: from bootjack.math.berkeley.edu (root@bootjack.Math.Berkeley.EDU [169.229.58.46]) by Math.Berkeley.EDU (8.12.8/8.12.8) with ESMTP id h2HM7QeB015429; Mon, 17 Mar 2003 14:07:26 -0800 (PST) Received: from bootjack.math.berkeley.edu (steve@localhost [127.0.0.1]) by bootjack.math.berkeley.edu (8.12.6/8.12.6) with ESMTP id h2HM7QUu098778; Mon, 17 Mar 2003 14:07:26 -0800 (PST) (envelope-from steve@bootjack.math.berkeley.edu) Received: (from steve@localhost) by bootjack.math.berkeley.edu (8.12.6/8.12.6/Submit) id h2HM7QAn098777; Mon, 17 Mar 2003 14:07:26 -0800 (PST) (envelope-from steve) Date: Mon, 17 Mar 2003 14:07:26 -0800 From: Steve Sizemore To: "Andrew P. Lentvorski, Jr." Cc: Dan Nelson , current@FreeBSD.ORG Subject: Re: NFS file unlocking problem Message-ID: <20030317220726.GC51736@math.berkeley.edu> Reply-To: Steve Sizemore References: <20030317060018.GA45288@math.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Mar 17, 2003 at 01:21:19PM -0800, Andrew P. Lentvorski, Jr. wrote: > On Sun, 16 Mar 2003, Steve Sizemore wrote: > > The dump doesn't seem to be attached. However, I note that the request It appears that there are problems sending the raw dump. I've tried twice - once 2 minutes after I sent the original message, and once again when I got this from you. Neither has shown up on the list. I can find another way to make it available if you need to see it. > being sent is SETLKW which is a blocking wait until lock is granted. If > the server thinks the file is already locked, it will hang *and* that is > the proper behavior. > > What is the result of running this locally on the NFS server and > attempting to lock the underlying file? If rpc.lockd is hanging onto a > lock, running that perl script locally on the actual file (not an NFS > mounted image of it) should also hang. It seems to work as expected (at least as I expect) on the server. If no other process has a lock, then the program locks the file, unlocks it, and exits immediately. If the remote client is trying to lock/unlock the file, then running the same program on the server also hangs. One other twist - recently, the behavior is less predictable. A couple of times in the last 24 hours, the lock/unlock on the client has actually worked as it should. The first time it happened, I was so surprised, that I thought I must have locked a local file rather than an NFS mounted file. On other occasions, the program has succeeded after very long hangs, .e.g % time plock xxx Locking xxx Unlocking xxx Done 0.21u 0.05s 55:35.33 0.0% This makes me wonder whether waiting indefinitely would succeed in all cases. (Note, however, that I've frequently waited more than an hour before killing the process or giving up.) > As a side note, you probably want to create a C executable to do this kind > of fcntl fiddling when attempting to test NFS. That way you can use a > locally mounted binary and you won't wind up with all of the Perl access > calls on the NFS wire. Or, at least, use a local copy of Perl. If I trusted my C skills as much as I trust my perl skills, I would do that. The perl stuff is all mounted locally, so there shouldn't be any perl nfs traffic on the wire. Let me know if you still need to see the dump. Steve -- Steve Sizemore , (510) 642-8570 Unix System Manager Dept. of Mathematics and College of Letters and Science University of California, Berkeley To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message