From owner-freebsd-current@FreeBSD.ORG Thu Jun 19 02:31:53 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 05F3237B401; Thu, 19 Jun 2003 02:31:53 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4CD843F3F; Thu, 19 Jun 2003 02:31:51 -0700 (PDT) (envelope-from se@freebsd.org) Received: from [212.227.126.162] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19Svln-0007a5-00; Thu, 19 Jun 2003 11:31:51 +0200 Received: from [80.132.227.162] (helo=Gatekeeper.FreeBSD.org) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 19Svlm-0000Cw-00; Thu, 19 Jun 2003 11:31:50 +0200 Received: from StefanEsser.FreeBSD.org (StefanEsser [10.0.0.1]) by Gatekeeper.FreeBSD.org (Postfix) with ESMTP id F37E45F0C; Thu, 19 Jun 2003 11:31:46 +0200 (CEST) Received: by StefanEsser.FreeBSD.org (Postfix, from userid 200) id A07051E88; Thu, 19 Jun 2003 11:31:46 +0200 (CEST) Date: Thu, 19 Jun 2003 11:31:46 +0200 From: Stefan =?iso-8859-1?Q?E=DFer?= To: Don Lewis Message-ID: <20030619093146.GA1489@StefanEsser.FreeBSD.org> Mail-Followup-To: Stefan =?iso-8859-1?Q?E=DFer?= , Don Lewis , chris@Shenton.Org, current@freebsd.org References: <87u1an9cay.fsf@PECTOPAH.shenton.org> <200306190341.h5J3fFM7056254@gw.catspoiler.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306190341.h5J3fFM7056254@gw.catspoiler.org> User-Agent: Mutt/1.5.4i cc: chris@Shenton.Org cc: current@freebsd.org Subject: Re: 5.1-CURRENT hangs on disk i/o? sysctl_old_user() non-sleepable locks 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: Thu, 19 Jun 2003 09:31:53 -0000 On 2003-06-18 20:41 -0700, Don Lewis wrote: > On 18 Jun, Chris Shenton wrote: > > Don Lewis writes: > > > >> Try the very untested patch below ... > > > >> RCS file: /home/ncvs/src/sys/kern/uipc_syscalls.c,v > >> retrieving revision 1.150 > >> Try the very untested patch below ... > >> diff -u -r1.150 uipc_syscalls.c > >> --- uipc_syscalls.c 12 Jun 2003 05:52:09 -0000 1.150 > >> +++ uipc_syscalls.c 18 Jun 2003 03:14:42 -0000 > >> @@ -1775,10 +1775,13 @@ > >> */ > >> if ((error = fgetvp_read(td, uap->fd, &vp)) != 0) > >> goto done; > >> + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); > >> if (vp->v_type != VREG || VOP_GETVOBJECT(vp, &obj) != 0) { > >> error = EINVAL; > >> + VOP_UNLOCK(vp, 0, td); > >> goto done; > >> } > >> + VOP_UNLOCK(vp, 0, td); > > > > Tried it, rebuilt kernel, rebooted, no affect :-( > > > > You were correct about apache using it. Doing a simple > > > > fetch http://pectopah/ > > > > causes the error, dropping me into ddb if panic enabled. A "tr" shows > > the same trace as I submitted yesterday :-( > > Wierd ... I just tested the patch with ftpd which also uses sendfile() > and didn't get any complaints from DEBUG_VFS_LOCKS. Not sure whether the following applies, but I think the patch should be commited anyway: In PR kern/46652 I reported, that DEBUG_VFS_LOCKS does never check the **vpp parameters. A patch is included in the PR and it does generate the missing tests. I asked for feedback on the hackers mail list (IIRC), but did not get any replies. Any objections against me committing the patch now ? (A different fix is mentioned in the PR, the patch I suggested was the minimal change to the code which made it work, the alternative seems cleaner to me ...) Please read PR kern/46652 ! If nobody complains, I'll do the commit tomorrow. Regards, STefan Index: /usr/src/sys/tools/vnode_if.awk =================================================================== RCS file: /usr/cvs/src/sys/tools/vnode_if.awk,v retrieving revision 1.37 diff -u -u -4 -r1.37 vnode_if.awk --- /usr/src/sys/tools/vnode_if.awk 26 Sep 2002 04:48:43 -0000 1.37 +++ /usr/src/sys/tools/vnode_if.awk 31 Dec 2002 13:37:20 -0000 @@ -64,8 +64,10 @@ function printh(s) {print s > hfile;} function add_debug_code(name, arg, pos) { + if (arg == "vpp") + arg = "*vpp"; if (lockdata[name, arg, pos]) { printh("\tASSERT_VI_UNLOCKED("arg", \""uname"\");"); # Add assertions for locking if (lockdata[name, arg, pos] == "L")