From owner-freebsd-current@FreeBSD.ORG Wed Jan 16 15:13:34 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 5D94216A419; Wed, 16 Jan 2008 15:13:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 4556613C455; Wed, 16 Jan 2008 15:13:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id A5EB41A4D8C; Wed, 16 Jan 2008 07:10:12 -0800 (PST) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 16 Jan 2008 10:11:33 -0500 User-Agent: KMail/1.9.7 References: <790a9fff0801150552l542a4238ofc12efe5fdb45fc2@mail.gmail.com> <790a9fff0801152301l5d50461aw3a253608506368e2@mail.gmail.com> <478DD4A2.6020202@FreeBSD.org> In-Reply-To: <478DD4A2.6020202@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801161011.34102.jhb@freebsd.org> Cc: Kostik Belousov , Scot Hetzel 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: Wed, 16 Jan 2008 15:13:34 -0000 On Wednesday 16 January 2008 04:55:46 am Kris Kennaway wrote: > Scot Hetzel wrote: > > On 1/15/08, Kostik Belousov wrote: > >> On Tue, Jan 15, 2008 at 07:52:12AM -0600, Scot Hetzel wrote: > >>> When I boot a Jan 13th or Jan 15th kernel, and then run > >>> /usr/local/etc/cvsup/update.sh to update the local CVS repository, I > >>> get the following panic: > >>> > >>> panic: System call lstat returning with 1 locks held > >>> cpuid = 0 > >>> KDB: enter: panic > >>> [thread ; pid 1240 tid 10031] > >>> stopped at kdb_enter+0x3d: movq $0,0x41b048(%rip) > >>> db> show alllocks > >>> db> show locks > >>> db> bt > >>> tracing pid 1240 tid 10031 td 0xffffff001c1ad360 > >>> kdb_enter() at kdb_enter+0x3d > >>> panic() at panic+0x176 > >>> syscalls() at syscalls+0x66d > >>> Xfast_syscalls() at Xfast_syscalls+0xab > >>> --- syscall (0, FreeBSD ELF64, nosys), rip = 0x8009e87ec, rsp= > >>> 0x72ec50, rbp = 0x72ed28 --- > >>> > >> I think this could be related to the recent vn_lock()/VOP_LOCK() KPI changes. > >> Please, add DEBUG_VFS_LOCKS to the kernel config, and do the > >> show lockedvnods > >> from the ddb prompt when the panic occurs. The witness does not track > >> the lockmgr locks. > >> > > I added DEBUG_VFS_LOCKS to the kernel config file, rebuilt and > > installed the kernel. After rebooting the system, I started the cvsup > > update for my local mirror, when the panic occured I received a > > similar panic to the one above. When I used 'show lockedvnods' the > > only thing that was displayed was 'Locked vnodes' and that was it. > > > > I'm going to try a binary search to see if I can narrow the problem down. > > Do you also have witness enabled? It could be that lockmgr_disown() doesn't update curthread->td_locks which is checked by INVARIANTS. Not sure if it needs to update td_locks, but it might. -- John Baldwin