Subject: kern/32962: kernel panic assertion in sys/kern/subr_pool.c
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 03/01/2006 19:45:00
>Number:         32962
>Category:       kern
>Synopsis:       kernel panic assertion in sys/kern/subr_pool.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 01 19:45:00 +0000 2006
>Originator:     Nicolas Joly
>Release:        NetBSD 3.99.15
>Organization:
Institut Pasteur, Paris.
>Environment:
System: NetBSD lanfeust.sis.pasteur.fr 3.99.15 NetBSD 3.99.15 (LANFEUST) #11: Tue Feb 28 21:12:34 CET 2006 njoly@lanfeust.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/LANFEUST amd64
Architecture: x86_64
Machine: amd64
>Description:
While running the libc regression tests on my -current NetBSD/amd64 machine,
the kernel (GENERIC.MP+DIAGNOSTIC+LOCKDEBUG) paniced :

njoly@lanfeust [src/regress]> make regress
regress ===> games
regress ===> games/factor
[...]
regress ===> lib/libc/ldexp
PASSED
regress ===> lib/libc/siginfo
regress ===> lib/libc/siginfo/sigalrm
./sigalrm
[...PANIC...]

panic: kernel diagnostic assertion "_simple_lock_held((&sched_lock)) == 0" faile
d: file "/local/src/NetBSD/src/sys/kern/subr_pool.c", line 817
Stopped in pid 20463.1 (cc1) at netbsd:cpu_Debugger+0x5:        leave
db{0}> mach cpu 0
using CPU 0
db{0}> bt
cpu_Debugger() at netbsd:cpu_Debugger+0x5
panic() at netbsd:panic+0x1c9
__assert() at netbsd:__assert+0x21
pool_get() at netbsd:pool_get+0x392
ksiginfo_put() at netbsd:ksiginfo_put+0xc0
kpsignal2() at netbsd:kpsignal2+0x372
itimerfire() at netbsd:itimerfire+0x248
realtimerexpire() at netbsd:realtimerexpire+0x15
softclock() at netbsd:softclock+0x339
softintr_dispatch() at netbsd:softintr_dispatch+0xd1
db{0}> mach cpu 1
using CPU 1
db{0}> bt
cpu_switch() at netbsd:cpu_switch+0xc9

NB: I was able to reproduce it on -current NetBSD/i386 system too (Dell
PowerEdge 6300 with 4 CPUs).
>How-To-Repeat:
run `src/regress/lib/libc/siginfo/sigalrm' on a machine running
GENERIC.MP+DIAGNOSTIC+LOCKDEBUG kernel.
>Fix: