NetBSD Problem Report #45115
From www@NetBSD.org Mon Jul 4 08:23:50 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 03DAC63CA00
for <gnats-bugs@gnats.NetBSD.org>; Mon, 4 Jul 2011 08:23:50 +0000 (UTC)
Message-Id: <20110704082349.0F51E63BA51@www.NetBSD.org>
Date: Mon, 4 Jul 2011 08:23:49 +0000 (UTC)
From: nonakap@gmail.com
Reply-To: nonakap@gmail.com
To: gnats-bugs@NetBSD.org
Subject: lock error panic when build.sh*3 and daily script is running
X-Send-Pr-Version: www-1.0
>Number: 45115
>Category: kern
>Synopsis: lock error panic when build.sh*3 and daily script is running
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 04 08:25:00 +0000 2011
>Closed-Date: Sat Nov 05 20:00:14 +0000 2011
>Last-Modified: Sat Nov 05 20:00:14 +0000 2011
>Originator: NONAKA Kimihiro
>Release: 5.99.54
>Organization:
>Environment:
NetBSD koharu.myhome.local 5.99.54 NetBSD 5.99.54 (TPX201) #1810: Sun Jul 3 18:56:34 JST 2011 root@koharu.myhome.local:/usr/obj.i386/sys/arch/i386/compile/TPX201 i386
>Description:
NetBSD/i386-current(20110702) panic when build.sh*3 and daily script is running.
-----
Reader / writer lock error: rw_vector_enter: locking against myself
lock address : 0x00000000cead7418
current cpu : 0
current lwp : 0x00000000cc124800
owner/count : 0x00000000cc124800 flags : 0x0000000000000004
panic: lock error
fatal breakpoint trap in supervisor mode
trap type 1 code 0 eip c0202324 cs 8 eflags 246 cr2 bb53a000 ilevel 0
Stopped in pid 9491.1 (find) at netbsd:breakpoint+0x4: popl %ebp
db{0}> bt
breakpoint()
panic()
lockdebug_abort()
rw_abort()
rw_vector_enter() at netbsd:rw_vector_enter+0x315
genfs_lock() at netbsd:genfs_lock+0xa8
layer_bypass() at netbsd:layer_bypass+0xc3
VOP_LOCK() at netbsd:VOP_LOCK+0x62
vclean() at netbsd:vclean+0x97
getcleanvnode() at netbsd:getcleanvnode+0xd4
getnewvnode() at netbsd:getnewvnode+0x70
ffs_vget() at netbsd:ffs_vget+0x57
ufs_lookup() at netbsd:ufs_lookup+0x74a
VOP_LOOKUP() at netbsd:VOP_LOOKUP+0x8b
lookup_once() at netbsd:lookup_once+0x18e
namei_tryemulroot() at netbsd:namei_tryemulroot+0x17c
namei() at netbsd:namei+0x2a
do_sys_stat(): netbsd:do_sys_stat+0x52
sys___lstat50() at netbsd:sys___lstat50+0x2a
syscall() at netbsd:syscall+0xc4
db{0}>
-----
nonaka@koharu:[-]$ mount
/dev/wd0a on / type ffs (log, NFS exported, local)
tmpfs on /tmp type tmpfs (local)
kernfs on /kern type kernfs (local)
procfs on /proc type procfs (local)
procfs on /usr/pkg/emul/linux/proc type procfs (local)
ptyfs on /dev/pts type ptyfs (local)
/home/source/NetBSD/src on /usr/src type null (local)
/home/source/NetBSD/pkgsrc on /usr/pkgsrc type null (local)
/home/source/NetBSD/xsrc on /usr/xsrc type null (local)
nonaka@koharu:[-]$
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Juergen Hannken-Illjes" <hannken@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45115 CVS commit: src/sys/kern
Date: Sun, 2 Oct 2011 13:00:08 +0000
Module Name: src
Committed By: hannken
Date: Sun Oct 2 13:00:07 UTC 2011
Modified Files:
src/sys/kern: vfs_vnode.c
Log Message:
The path getnewvnode()->getcleanvnode()->vclean()->VOP_LOCK() will panic
if the vnode we want to clean is a layered vnode and the caller already
locked its lower vnode.
Change getnewvnode() to always allocate a fresh vnode and add a helper
thread (vdrain) to keep the number of allocated vnodes within desiredvnodes.
Rename getcleanvnode() to cleanvnode() and let it take a vnode from the
lists, clean and free it.
Reviewed by: David Holland <dholland@netbsd.org>
Should fix:
PR #19110 (nullfs mounts over NFS cause lock manager problems)
PR #34102 (ffs panic in NetBSD 3.0_STABLE)
PR #45115 (lock error panic when build.sh*3 and daily script is running)
PR #45355 (Reader/writer lock error: rw_vector_enter: locking against myself)
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/kern/vfs_vnode.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 05 Nov 2011 16:20:07 +0000
State-Changed-Why:
Is this fixed for you?
From: NONAKA Kimihiro <nonakap@gmail.com>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
dholland@netbsd.org
Subject: Re: kern/45115 (lock error panic when build.sh*3 and daily script is running)
Date: Sun, 6 Nov 2011 04:07:16 +0900
I seem this problem is fixed.
Please close this PR.
2011/11/6 <dholland@netbsd.org>:
> Synopsis: lock error panic when build.sh*3 and daily script is running
>
> State-Changed-From-To: open->feedback
> State-Changed-By: dholland@NetBSD.org
> State-Changed-When: Sat, 05 Nov 2011 16:20:07 +0000
> State-Changed-Why:
> Is this fixed for you?
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 05 Nov 2011 20:00:14 +0000
State-Changed-Why:
Confirmed. Thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.