From owner-freebsd-current@FreeBSD.ORG Wed Jan 16 19:29:57 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 819EE16A41B for ; Wed, 16 Jan 2008 19:29:57 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by mx1.freebsd.org (Postfix) with ESMTP id F2A9913C46E for ; Wed, 16 Jan 2008 19:29:56 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so424246fgg.35 for ; Wed, 16 Jan 2008 11:29:55 -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:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=6bJdl3CguIrRI3SVz90jjMunaPKvjhtg5BBXbKn8HUQ=; b=pD+9FdWmAK7siB3xp8+4y114D89rZ6/osUDvaNI3V+DBp4ag37iBuzb7OMiv4wMwA/mypg3Mr0Ax0FqD7Six5RaC+4VS+oj+MZwqG1w0dHst7R7aCEXDlW6mEd3H+gqttwAKBCWSZniiT7Ox+VA1P2+e4YvD9ihzyUj+UPrj66o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=v2Bhq5H5eC7fQF5kbYPFeA3e3R6rd14e7sLuSg3JhZC04X79w3O9/Fl2wa3ZrioSVyBC71gXECqZoaXdVRfyplHeVFt2YXLUjZdHLU/i06h91od6ecWCgXgGruiKg+6LDNS4VE5cBB+LjBQ2q3HOz7ot4i9eD9h8Vx1AmJml1t4= Received: by 10.86.53.8 with SMTP id b8mr1016255fga.64.1200510254582; Wed, 16 Jan 2008 11:04:14 -0800 (PST) Received: by 10.86.92.1 with HTTP; Wed, 16 Jan 2008 11:04:14 -0800 (PST) Message-ID: <3bbf2fe10801161104h71d2343bgc9980531508fce7@mail.gmail.com> Date: Wed, 16 Jan 2008 20:04:14 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: freebsd-current@freebsd.org, "Kostik Belousov" , "Scot Hetzel" In-Reply-To: <3bbf2fe10801160935v13459273nb93cd06283b5756e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <790a9fff0801150552l542a4238ofc12efe5fdb45fc2@mail.gmail.com> <790a9fff0801152301l5d50461aw3a253608506368e2@mail.gmail.com> <478DD4A2.6020202@FreeBSD.org> <200801161011.34102.jhb@freebsd.org> <3bbf2fe10801160935v13459273nb93cd06283b5756e@mail.gmail.com> X-Google-Sender-Auth: ad9aaa309d2adfdc Cc: Subject: Fwd: 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 19:29:57 -0000 ---------- Forwarded message ---------- From: Attilio Rao Date: 16-gen-2008 18.35 Subject: Re: panic: System call lstat returning with 1 locks held To: John Baldwin 2008/1/16, John Baldwin : > 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. It does really. Should we monitor all lockmgr-side movements on td_lock? Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein -- Peace can only be achieved by understanding - A. Einstein