NetBSD Problem Report #35723
From ad@razor.hairylemon.org Tue Feb 20 02:41:48 2007
Return-Path: <ad@razor.hairylemon.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 600B663B879
for <gnats-bugs@gnats.NetBSD.org>; Tue, 20 Feb 2007 02:41:48 +0000 (UTC)
Message-Id: <200702200241.l1K2fjse002073@razor.hairylemon.org>
Date: Tue, 20 Feb 2007 02:41:45 GMT
From: ad@netbsd.org
Reply-To: ad@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: LOCKDEBUG doesn't handle leaks very well
X-Send-Pr-Version: 3.95
>Number: 35723
>Category: kern
>Synopsis: LOCKDEBUG doesn't handle leaks very well
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 20 02:45:00 +0000 2007
>Closed-Date: Fri Mar 23 23:31:01 +0000 2007
>Last-Modified: Fri Mar 23 23:31:01 +0000 2007
>Originator: Andrew Doran
>Release: NetBSD 4.99.12
>Organization:
The NetBSD Project
>Environment:
Architecture: i386
Machine: i386
>Description:
xtraeme@ noted the following panic:
panic: lockdebug_lookup: uninitialized lock (1, id=1049007)
lockdebug_more(1001af,c028e84d,0,cfa3db28,c2daf800) at netbsd:lockdebug_more
mutex_vector_enter(ce63c08c,c2641e00,c2655300,c2648360,0) at netbsd:mutex_vector_enter+0x9a
kauth_cred_free(ce63c08c,cfa17200,3b9aca00,0,cfa17200) at netbsd:kauth_cred_free+0x11
nfs_request(cd634c30,c2651b00,12,cfa17200,ce63c114) at netbsd:nfs_request+0x420
nfs_statvfs(c2dae000,c4262000,cfa17200,c2dae000,0) at netbsd:nfs_statvfs+0x12e
dostatvfs(c2dae000,c4262000,cfa17200,1,1) at netbsd:dostatvfs+0x143
sys_statvfs1(cfa17200,cfa3dc48,cfa3dc68,0,c032390f) at netbsd:sys_statvfs1+0x8e
syscall_plain() at netbsd:syscall_plain+0x115
--- syscall (number 357) ---
There are at least three problems:
1. Something in the MI kernel is either leaking memory, or failing to destroy
locks. The "id" above indicates that the system has over 1M active locks.
2. The ID is above the current limit for subr_lockdebug.c (1048576). It may
be allocating more IDs/memory than it should.
3. subr_lockdebug.c should note when the limit is exceeded.
>How-To-Repeat:
Long uptime.
>Fix:
As above.
>Release-Note:
>Audit-Trail:
From: Andrew Doran <ad@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/35723 CVS commit: src/sys
Date: Sat, 10 Mar 2007 15:56:21 +0000 (UTC)
Module Name: src
Committed By: ad
Date: Sat Mar 10 15:56:21 UTC 2007
Modified Files:
src/sys/kern: init_main.c subr_lockdebug.c
src/sys/sys: lockdebug.h
Log Message:
lockdebug:
- Initialize on the first allocation.
- Handle overflow better. PR kern/35723.
To generate a diff of this commit:
cvs rdiff -r1.298 -r1.299 src/sys/kern/init_main.c
cvs rdiff -r1.4 -r1.5 src/sys/kern/subr_lockdebug.c
cvs rdiff -r1.2 -r1.3 src/sys/sys/lockdebug.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: ad@netbsd.org
State-Changed-When: Fri, 23 Mar 2007 23:31:01 +0000
State-Changed-Why:
Fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.