From owner-freebsd-current@FreeBSD.ORG Wed Jun 18 20:41:30 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 9D75A37B401 for ; Wed, 18 Jun 2003 20:41:30 -0700 (PDT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6984743F85 for ; Wed, 18 Jun 2003 20:41:28 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.9/8.12.9) with ESMTP id h5J3fFM7056254; Wed, 18 Jun 2003 20:41:20 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200306190341.h5J3fFM7056254@gw.catspoiler.org> Date: Wed, 18 Jun 2003 20:41:15 -0700 (PDT) From: Don Lewis To: chris@Shenton.Org In-Reply-To: <87u1an9cay.fsf@PECTOPAH.shenton.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii 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 03:41:30 -0000 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. I'm going to go ahead and commit this patch.