From owner-freebsd-current@FreeBSD.ORG Fri Feb 1 06:41:32 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D5EE16A421 for ; Fri, 1 Feb 2008 06:41:32 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.freebsd.org (Postfix) with ESMTP id A7F9713C46B for ; Fri, 1 Feb 2008 06:41:31 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so887358uge.37 for ; Thu, 31 Jan 2008 22:41:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=KUodEO8o0UFCbkV8oL68gYySZygVRCe1aeydxbTMmK0=; b=x1QnrMv/6kPJlWLuqvM6or4pp02UelN4kFcH2zqJ7WCgYni6ala5gJwHZMcflyN/rTMFMXRwtZ91ie7hZAD2uGVa7lAT3mplKDVi+4QWox2S3hqJa7dsetdNV40pZlx+TY2RcaKKi94D4jOGWAM1Kz8NdFlo9KPp/VVyWOV7u4Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Xx8czyLyfIcZX8lDUljMJ6g2fPCwwpTNQabDdcJ1/owo7xwsOBoPkxWF1izJABEBf8nLa2hOrTTCsQw05ucXBs9S+xnVCeYxHGMpTpuUtCNlcKW+62mqxWDUrpoihjpYE0PrgwLvP4TNO0GFXKhIqtxSuuHTI9S7NxRqLrN0Nvo= Received: by 10.66.251.20 with SMTP id y20mr5096723ugh.67.1201848090285; Thu, 31 Jan 2008 22:41:30 -0800 (PST) Received: by 10.86.99.17 with HTTP; Thu, 31 Jan 2008 22:41:30 -0800 (PST) Message-ID: <790a9fff0801312241s346068b6s40fcae71ebbf546@mail.gmail.com> Date: Fri, 1 Feb 2008 00:41:30 -0600 From: "Scot Hetzel" To: "Attilio Rao" In-Reply-To: <3bbf2fe10801310504j486924bdm86e0436597a42b09@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <479BBDAA.6000008@FreeBSD.org> <3bbf2fe10801270642m5ec609d8xb29add77ced36d8a@mail.gmail.com> <479FA3E8.10606@FreeBSD.org> <3bbf2fe10801291411v302dd33at54ebe538397e8fac@mail.gmail.com> <20080130130820.GA88429@comp.chem.msu.su> <3bbf2fe10801300707u3fd121c0k199605c2f0be6cbf@mail.gmail.com> <790a9fff0801301352xa91a69ci3f08488dfcfc982@mail.gmail.com> <3bbf2fe10801310243tddedfeckbc4c94be87f0a4ca@mail.gmail.com> <20080131130210.GA37090@comp.chem.msu.su> <3bbf2fe10801310504j486924bdm86e0436597a42b09@mail.gmail.com> Cc: Kostik Belousov , Yar Tikhiy , Doug Barton , freebsd-current@freebsd.org Subject: Re: panic: System call lstat returning with 1 locks held X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 01 Feb 2008 06:41:32 -0000 On 1/31/08, Attilio Rao wrote: > 2008/1/31, Yar Tikhiy : > > > On Thu, Jan 31, 2008 at 11:43:10AM +0100, Attilio Rao wrote: > > > > > > The assertion failing should not happen now. > > > Could you please hand-add a check in _lockmgr_disown() > > > (kern/kern_lock.c) in order to check for the panicstr before to call > > > WITNESS? I cannot access to perforce now and produce a suitable diff, > > > so you can just do this by hand: > > > > > > if (lkp->lk_lockholder == td) { > > > if (panicstr != NULL) > > > WITNESS_UNLOCK(&lkp->lk_object, LOP_EXCLUSIVE, file, line); > > > td->td_locks--; > > > } > > > > > > Shouldn't the test for panicstr be inverse: `panicstr == NULL'? > > I guess we shouldn't call WITNESS when panicing, should we? > > Sorry if I got it wrong. > > > Weee, you are right, sorry! > > I added this change to kern/kern_lock.c, but I'm still getting this panic after mounting the ntfs filesystem, and using cvsup to update the local mirror: Fatal trap 9: general protection fault while in kernel mode cpuid = 0; apic id = 00 instruction pointer = 0x8:0xffffffff80301051 stack pointer = 0x10:0xffffffffd43b9100 frame pointer = 0x10:0xffffffffd43b9190 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = resume, IOPL = 0 current process = 1229 (cvsup) panic: Assertion !mtx_owned(&w_mtx) failed at ../../../kern/subr_witness.c:959 cpuid = 0 Uptime: 4m38s Physical memory: 2031 MB Dumping 324 MB: 309 293 277 261 245 229 213 197 181 165 149 133 117 101 85 69 53 37 21 5 Scot