NetBSD Problem Report #38732

From oster@scrooge.localdomain  Fri May 23 18:35:38 2008
Return-Path: <oster@scrooge.localdomain>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id E70F563B9E1
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 23 May 2008 18:35:37 +0000 (UTC)
Message-Id: <20080523172021.A0D0A114045@scrooge.localdomain>
Date: Fri, 23 May 2008 11:20:21 -0600 (CST)
From: oster@netbsd.org
Reply-To: oster@netbsd.org
To: gnats-bugs@gnats.NetBSD.org
Subject: proplib locking error
X-Send-Pr-Version: 3.95

>Number:         38732
>Category:       kern
>Synopsis:       proplib has locking issues
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    yamt
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 23 18:40:00 +0000 2008
>Closed-Date:    Mon Jun 27 22:00:35 +0000 2016
>Last-Modified:  Mon Oct 17 01:15:01 +0000 2016
>Originator:     oster@netbsd.org
>Release:        NetBSD 4.99.63
>Organization:
>Environment:
System: NetBSD hapi 4.99.63 NetBSD 4.99.63 (GENERICLD) #0: Thu May 22 15:58:15 CST 2008  root@hapi:/u1/builds/build203/src/sys/arch/amd64/compile/GENERICLD amd64
Architecture: amd64
Machine: amd64
>Description:
	proplib seems to have some locking issues... 

Reader / writer lock error: lockdebug_wantlock: locking against myself

lock address : 0xffff800064a11fa0 type     :     sleep/adaptive
shared holds :                  1 exclusive:                  0
shares wanted:                  1 exclusive:                  0
current cpu  :                  3 last held:                  3
current lwp  : 0xffff80007568b800 last held: 0xffff80007568b800
last locked  : 0xffffffff8071c607 unlocked : 0xffffffff8071c645
initialized  : 0xffffffff8071d0af
owner/count  : 0x0000000000000010 flags    : 0x0000000000000008

Turnstile chain at 0xffffffff80c6ee00.
=> No active turnstile for this lock.

panic: LOCKDEBUG
Stopped in pid 2085.1 (envstat) at      netbsd:breakpoint+0x5:  leave
db{3}> tr
breakpoint() at netbsd:breakpoint+0x5
panic() at netbsd:panic+0x260
lockdebug_abort1() at netbsd:lockdebug_abort1+0xd3
rw_vector_enter() at netbsd:rw_vector_enter+0x2f1
prop_dictionary_iterator() at netbsd:prop_dictionary_iterator+0x77
_prop_dictionary_externalize() at netbsd:_prop_dictionary_externalize+0xba
prop_dictionary_externalize() at netbsd:prop_dictionary_externalize+0x40
_prop_object_copyout_ioctl() at netbsd:_prop_object_copyout_ioctl+0x12e
sysmonioctl_envsys() at netbsd:sysmonioctl_envsys+0x4da
VOP_IOCTL() at netbsd:VOP_IOCTL+0x6b
vn_ioctl() at netbsd:vn_ioctl+0x6d
sys_ioctl() at netbsd:sys_ioctl+0x134
syscall() at netbsd:syscall+0x9a
db{3}> 



>How-To-Repeat:
	run GENERIC+LOCKDEBUG/DEBUG/DIAGNOSTIC kernel on amd64
	do something like 'envstat -d mfi0'
	*boom*

	Additional details available upon request.

>Fix:
	dunno.

>Release-Note:

>Audit-Trail:
From: Christoph Egger <Christoph_Egger@gmx.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, 
 netbsd-bugs@netbsd.org
Subject: Re: kern/38732: proplib locking error
Date: Fri, 23 May 2008 23:34:17 +0200

 oster@netbsd.org wrote:
 >> Number:         38732
 >> Category:       kern
 >> Synopsis:       proplib has locking issues
 >> Confidential:   no
 >> Severity:       critical
 >> Priority:       high
 >> Responsible:    kern-bug-people
 >> State:          open
 >> Class:          sw-bug
 >> Submitter-Id:   net
 >> Arrival-Date:   Fri May 23 18:40:00 +0000 2008
 >> Originator:     oster@netbsd.org
 >> Release:        NetBSD 4.99.63
 >> Organization:
 >> Environment:
 > System: NetBSD hapi 4.99.63 NetBSD 4.99.63 (GENERICLD) #0: Thu May 22 15:58:15 CST 2008  root@hapi:/u1/builds/build203/src/sys/arch/amd64/compile/GENERICLD amd64
 > Architecture: amd64
 > Machine: amd64
 >> Description:
 > 	proplib seems to have some locking issues... 
 > 
 > Reader / writer lock error: lockdebug_wantlock: locking against myself
 >  
 > lock address : 0xffff800064a11fa0 type     :     sleep/adaptive
 > shared holds :                  1 exclusive:                  0
 > shares wanted:                  1 exclusive:                  0
 > current cpu  :                  3 last held:                  3
 > current lwp  : 0xffff80007568b800 last held: 0xffff80007568b800
 > last locked  : 0xffffffff8071c607 unlocked : 0xffffffff8071c645
 > initialized  : 0xffffffff8071d0af
 > owner/count  : 0x0000000000000010 flags    : 0x0000000000000008
 >  
 > Turnstile chain at 0xffffffff80c6ee00.
 > => No active turnstile for this lock.
 >  
 > panic: LOCKDEBUG
 > Stopped in pid 2085.1 (envstat) at      netbsd:breakpoint+0x5:  leave
 > db{3}> tr
 > breakpoint() at netbsd:breakpoint+0x5
 > panic() at netbsd:panic+0x260
 > lockdebug_abort1() at netbsd:lockdebug_abort1+0xd3
 > rw_vector_enter() at netbsd:rw_vector_enter+0x2f1
 > prop_dictionary_iterator() at netbsd:prop_dictionary_iterator+0x77
 > _prop_dictionary_externalize() at netbsd:_prop_dictionary_externalize+0xba
 > prop_dictionary_externalize() at netbsd:prop_dictionary_externalize+0x40
 > _prop_object_copyout_ioctl() at netbsd:_prop_object_copyout_ioctl+0x12e
 > sysmonioctl_envsys() at netbsd:sysmonioctl_envsys+0x4da
 > VOP_IOCTL() at netbsd:VOP_IOCTL+0x6b
 > vn_ioctl() at netbsd:vn_ioctl+0x6d
 > sys_ioctl() at netbsd:sys_ioctl+0x134
 > syscall() at netbsd:syscall+0x9a
 > db{3}> 
 > 
 > 
 > 
 >> How-To-Repeat:
 > 	run GENERIC+LOCKDEBUG/DEBUG/DIAGNOSTIC kernel on amd64
 > 	do something like 'envstat -d mfi0'
 > 	*boom*
 > 
 > 	Additional details available upon request.
 > 
 >> Fix:

 See http://mail-index.netbsd.org/port-amd64/2008/05/19/msg000275.html
 and follow ups for the solution.

 Christoph

Responsible-Changed-From-To: kern-bug-people->yamt
Responsible-Changed-By: yamt@NetBSD.org
Responsible-Changed-When: Sat, 24 May 2008 02:34:21 +0000
Responsible-Changed-Why:
i have a patch.


From: YAMAMOTO Takashi <yamt@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/38732 CVS commit: src/common/lib/libprop
Date: Sat, 24 May 2008 14:32:48 +0000 (UTC)

 Module Name:	src
 Committed By:	yamt
 Date:		Sat May 24 14:32:48 UTC 2008

 Modified Files:
 	src/common/lib/libprop: prop_array.c prop_dictionary.c

 Log Message:
 fix recursive read-lock bugs found by lockdebug and reported
 by Geoff C. Wing and others.  ok'ed by Jason Thorpe.
 an earlier version was tested by Sverre Froyen.
 PR/38732 from oster@.


 To generate a diff of this commit:
 cvs rdiff -r1.17 -r1.18 src/common/lib/libprop/prop_array.c
 cvs rdiff -r1.29 -r1.30 src/common/lib/libprop/prop_dictionary.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->analyzed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Mon, 27 Jun 2016 11:09:28 +0000
State-Changed-Why:
A fix for this was committed 8+ years ago, but no follow-up was done (or
at least, not documented in the audit trail).  So we don't know if the
bug was really fixed.  Set PR state to Feedback to trigger notification
Emails, and hopefully someone can confirm that the problem is gone.  If
Unless we get reports of problem still happening on current code, we
should just close this PR.  (The fix is old enough to have already been
picked up on all supported branches, so no pullups are needed!)


State-Changed-From-To: analyzed->closed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Mon, 27 Jun 2016 22:00:35 +0000
State-Changed-Why:
Fix confirmed.


From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/38732 (proplib has locking issues)
Date: Mon, 17 Oct 2016 01:14:13 +0000

 This wasn't sent to gnats.

    ------

 From: Greg Oster <oster@netbsd.org>
 To: pgoyette@NetBSD.org
 Cc: yamt@NetBSD.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org
 Subject: Re: kern/38732 (proplib has locking issues)
 Date: Mon, 27 Jun 2016 09:37:58 -0600

 On Mon, 27 Jun 2016 11:09:28 +0000 (UTC)
 pgoyette@NetBSD.org wrote:

 > Synopsis: proplib has locking issues
 > 
 > State-Changed-From-To: open->analyzed
 > State-Changed-By: pgoyette@NetBSD.org
 > State-Changed-When: Mon, 27 Jun 2016 11:09:28 +0000
 > State-Changed-Why:
 > A fix for this was committed 8+ years ago, but no follow-up was done
 > (or at least, not documented in the audit trail).  So we don't know
 > if the bug was really fixed.  Set PR state to Feedback to trigger
 > notification Emails, and hopefully someone can confirm that the
 > problem is gone.  If Unless we get reports of problem still happening
 > on current code, we should just close this PR.  (The fix is old
 > enough to have already been picked up on all supported branches, so
 > no pullups are needed!)

 Best i can find for audit trail is this thread (mentioned in the PR):

 http://mail-index.netbsd.org/port-amd64/2008/05/19/msg000275.html

 where in this one:

 http://mail-index.netbsd.org/port-amd64/2008/05/20/msg000285.html

 it sounds like things are fixed.  

 I'd say call this ticket successfully resolved.

 Later...

 Greg Oster

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.