Subject: kern/34895: panic: sched_lock: locked
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <soda@NetBSD.org>
List: netbsd-bugs
Date: 10/24/2006 09:30:00
>Number:         34895
>Category:       kern
>Synopsis:       panic: sched_lock: locked
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 24 09:30:00 +0000 2006
>Originator:     SODA Noriyuki
>Release:        NetBSD 4.99.3
>Organization:
The NetBSD project
>Environment:
System: NetBSD babylon5.netbsd.org 4.99.3 NetBSD 4.99.3 (NBFTP) #0: Mon Oct 23 21:41:23 UTC 2006 tls@ADMIN:/usr/src/sys/arch/amd64/compile/NBFTP amd64
Architecture: x86_64
Machine: amd64
>Description:

The following panic happens repeatedly with -current LOCKDEBUG kernel:

sched_lock lock held

lock heldlock: 0xffffffff804e1f20, currently at: /usr/src/sys/kern/subr_pool.c:933
last locked: /usr/src/sys/kern/kern_sig.c:1169
last unlocked: /usr/src/sys/kern/kern_synch.c:757
fatal page faultsched_lock lock held

lock heldlock: 0xffffffff804e1f20, currently at: /usr/src/sys/kern/kern_synch.c:753
last locked: /usr/src/sys/kern/kern_sig.c:1169
last unlocked: /usr/src/sys/kern/kern_synch.c:757
?() at 0xffff80001bbeed80
?() at 0xffff80001bbefd30
panic: sched_lock: locked
Begin traceback...
timer_filtops() at netbsd:_prop_rb_tree_insert_node+0x3b847
End traceback...
syncing disks... 
simple_lock: lock held
lock: 0xffffffff804e1f20, currently at: /usr/src/sys/kern/kern_synch.c:1228
last locked: /usr/src/sys/kern/kern_sig.c:1169
last unlocked: /usr/src/sys/kern/kern_synch.c:757
fatal page fault in supervisor mode
trap type 6 code 0 rip ffffffff802d46ab cs 8 rflags 10246 cr2  c cpl d rsp ffff800051018430
panic: trap
Begin traceback...
fatal page fault in supervisor mode
trap type 6 code 0 rip ffffffff802d46ab cs 8 rflags 10246 cr2  0 cpl d rsp ffff800051018000
panic: trap
Faulted in mid-traceback; aborting...
dump to dev 19,1 not possible
sched_lock lock held

lock heldlock: 0xffffffff804e1f20, currently at: /usr/src/sys/kern/kern_synch.c:753
last locked: /usr/src/sys/kern/kern_sig.c:1169
last unlocked: /usr/src/sys/kern/kern_synch.c:757
?() at 0xffff800074acf748
panic: sched_lock: locked
Faulted in mid-traceback; aborting...
dump to dev 19,1 not possible



The following one is similar panic:

sched_lock lock held

lock heldlock: 0xffffffff804e1f20, currently at: /usr/src/sys/kern/subr_pool.c:933
last locked: /usr/src/sys/kern/kern_sig.c:1169
last unlocked: /usr/src/sys/kern/kern_synch.c:757
fatal page faultsched_lock lock held

lock heldlock: 0xffffffff804e1f20, currently at: /usr/src/sys/kern/kern_synch.c:753
last locked: /usr/src/sys/kern/kern_sig.c:1169
last unlocked: /usr/src/sys/kern/kern_synch.c:757
?() at 0xffff80001bbefd80
?() at 0xffff80001bbf0d30
panic: sched_lock: locked
Begin traceback...
timer_filtops() at netbsd:_prop_rb_tree_insert_node+0x3b847
End traceback...
syncing disks... 
simple_lock: lock held
lock: 0xffffffff804e1f20, currently at: /usr/src/sys/kern/kern_synch.c:1228
last locked: /usr/src/sys/kern/kern_sig.c:1169
last unlocked: /usr/src/sys/kern/kern_synch.c:757
fatal page fault in supervisor mode
trap type 6 code 0 rip ffffffff802d46ab cs 8 rflags 10246 cr2  c cpl d rsp ffff80005de78120
panic: trap
Begin traceback...
fatal page fault in supervisor mode
trap type 6 code 0 rip ffffffff802d46ab cs 8 rflags 10246 cr2  0 cpl d rsp ffff80005de77cf0
panic: trap
Faulted in mid-traceback; aborting...
dump to dev 19,1 not possible
sched_lock lock held

lock heldlock: 0xffffffff804e1f20, currently at: /usr/src/sys/kern/kern_synch.c:753
last locked: /usr/src/sys/kern/kern_sig.c:1169
last unlocked: /usr/src/sys/kern/kern_synch.c:757
?() at 0xffff80001bade0a8
panic: sched_lock: locked
Faulted in mid-traceback; aborting...
dump to dev 19,1 not possible
rebooting...



FWIW, the version of subr_pool.c and kern_sig.c is following:
$NetBSD: subr_pool.c,v 1.123 2006/10/12 01:32:18 christos Exp $
$NetBSD: kern_sig.c,v 1.231 2006/10/22 20:48:45 mrg Exp $

>How-To-Repeat:

not known.

>Fix: