Subject: kern/11770: Panic with simple_lock held
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jmc@netbsd.org>
List: netbsd-bugs
Date: 12/18/2000 11:00:22
>Number:         11770
>Category:       kern
>Synopsis:       Panic with simple_lock held
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 18 11:00:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     James Chacon
>Release:        20001217
>Organization:
>Environment:
System: NetBSD celeron 1.5N NetBSD 1.5N (QUIX) #2: Sun Dec 17 03:37:59 EST 2000 root@celeron:/usr/obj/sys/arch/i386/compile/QUIX i386
Architecture: i386
Machine: i386
>Description:

I get multiple failures a day with DEBUG enabled and the system panic'ing
with simple_lock held. 

I've placed the kernel core, the gdb version of the kernel and my config file on
ftp.netbsd.org:~jmc/simple_lock

A backtrace from one of these is:

(gdb) bt
#0  0xc035c5c0 in emul_netbsd ()
#1  0x1a56000 in ?? ()
#2  0xc02c768f in cpu_reboot (howto=0x104, bootstr=0x0)
    at /usr/src/sys/arch/i386/i386/machdep.c:1375
#3  0xc01a0ef4 in log (can not access 0x10012, invalid translation (invalid PTE)
can not access 0x10012, invalid translation (invalid PTE)
can not access 0x10012, invalid translation (invalid PTE)
can not access 0x10012, invalid translation (invalid PTE)
level=0xc035c5c0, 
    fmt=0x10012 <Address 0x10012 out of bounds>)
    at /usr/src/sys/kern/subr_prf.c:240
#4  0xc018ff82 in _lockmgr (lkp=0xd4404748, flags=0x10012, 
    interlkp=0xd44046ac, 
    file=0xc0363500 "/usr/src/sys/miscfs/genfs/genfs_vnops.c", line=0x142)
    at /usr/src/sys/kern/kern_lock.c:650
#5  0xc01c49be in genfs_lock (v=0xd3d0097c)
    at /usr/src/sys/miscfs/genfs/genfs_vnops.c:322
#6  0xc01c1ba7 in vn_lock (vp=0xd44046ac, flags=0x10012)
    at /usr/src/sys/sys/vnode_if.h:1008
#7  0xc01ba309 in vget (vp=0xd44046ac, flags=0x10012)
    at /usr/src/sys/kern/vfs_subr.c:1150
#8  0xc029a047 in ffs_sync (mp=0xc0a86400, waitfor=0x2, cred=0xc0a20f00, 
    p=0xd3cec80c) at /usr/src/sys/ufs/ffs/ffs_vfsops.c:955
#9  0xc01bcc16 in sys_sync (p=0xd3cec80c, v=0x0, retval=0x0)
    at /usr/src/sys/kern/vfs_syscalls.c:574
#10 0xc01bbcfc in vfs_shutdown () at /usr/src/sys/kern/vfs_subr.c:2419
#11 0xc02c7667 in cpu_reboot (howto=0x100, bootstr=0x0)
    at /usr/src/sys/arch/i386/i386/machdep.c:1362
#12 0xc01a0ef4 in log (level=0xc03ab900, fmt=0xc035dfcd "diagnostic ")
    at /usr/src/sys/kern/subr_prf.c:240
#13 0xc0341a31 in __assert () at /usr/src/sys/lib/libkern/__assert.c:47
#14 0xc0197b96 in wakeup (ident=0xd34883a4)
    at /usr/src/sys/kern/kern_synch.c:612
#15 0xc01aa4d6 in ptcwakeup (tp=0xd3488354, flag=0x1)
    at /usr/src/sys/kern/tty_pty.c:441
#16 0xc01aa42d in ptsstart (tp=0xd3488354) at /usr/src/sys/kern/tty_pty.c:405
#17 0xc01a85df in ttstart (tp=0xd3488354) at /usr/src/sys/kern/tty.c:1227
#18 0xc01a9955 in tputchar (c=0x73, tp=0xd3488354)
    at /usr/src/sys/kern/tty.c:2119
#19 0xc01a1133 in putchar (c=0x73, flags=0x5, tp=0x0)
    at /usr/src/sys/kern/subr_prf.c:394
#20 0xc01a18f4 in kprintf (fmt0=0xc035ca15 "simple_lock: lock held\n", 
    oflags=0x5, vp=0x0, sbuf=0x0, ap=0xd3d00be0 "g")
    at /usr/src/sys/kern/subr_prf.c:975
#21 0xc01a138c in vprintf (fmt=0xc035ca15 "simple_lock: lock held\n", 
    ap=0xd3d00be0 "g") at /usr/src/sys/kern/subr_prf.c:634
#22 0xc018f6c7 in lock_printf (fmt=0xc035ca15 "simple_lock: lock held\n")
    at /usr/src/sys/kern/kern_lock.c:320
#23 0xc0190ed0 in _simple_lock (alp=0xc03bcbac, 
    id=0xc0360360 "/usr/src/sys/kern/sys_generic.c", l=0x3d3)
    at /usr/src/sys/kern/kern_lock.c:1031
#24 0xc01a3c61 in selwakeup (sip=0xc0a9bca8)
    at /usr/src/sys/kern/sys_generic.c:979
#25 0xc01aa4cd in ptcwakeup (tp=0xd3488354, flag=0x1)
    at /usr/src/sys/kern/tty_pty.c:440
#26 0xc01aa42d in ptsstart (tp=0xd3488354) at /usr/src/sys/kern/tty_pty.c:405
#27 0xc01a85df in ttstart (tp=0xd3488354) at /usr/src/sys/kern/tty.c:1227
#28 0xc01a9955 in tputchar (c=0x73, tp=0xd3488354)
    at /usr/src/sys/kern/tty.c:2119
#29 0xc01a1133 in putch (c=0x73, flags=0x5, tp=0x0)
    at /usr/src/sys/kern/subr_prf.c:394
#30 0xc01a18f4 in kprintf (
    fmt0=0xc035cc00 "switching with held simple_lock %p CPU %lu %s:%d\n", 
    oflags=0x5, vp=0x0, sbuf=0x0, ap=0xd3d00d20 "|[5T")
    at /usr/src/sys/kern/subr_prf.c:975
#31 0xc01a138c in vprintf (
    fmt=0xc035cc00 "switching with held simple_lock %p CPU %lu %s:%d\n", 
    ap=0xd3d00d20 "|[5T") at /usr/src/sys/kern/subr_prf.c:634
#32 0xc018f6c7 in lock_printf (
    fmt=0xc035cc00 "switching with held simple_lock %p CPU %lu %s:%d\n")
    at /usr/src/sys/kern/kern_lock.c:320
#33 0xc01913ab in simple_lock_switchcheck ()
    at /usr/src/sys/kern/kern_lock.c:1238
#34 0xc0198124 in mi_switch (p=0xd3cec80c)
    at /usr/src/sys/kern/kern_synch.c:798
#35 0xc019785a in ltsleep (ident=0xc5cf7df0, priority=0x11, 
    wmesg=0xc03618b5 "biowait", timo=0x0, interlock=0x0)
    at /usr/src/sys/kern/kern_synch.c:465
#36 0xc01b5361 in biowait (bp=0xc5cf7df0) at /usr/src/sys/kern/vfs_bio.c:878
#37 0xc01b4798 in bread (vp=0xd3cf9004, blkno=0x24010, size=0x2000, 
    cred=0xffffffff, bpp=0xd3d00e00) at /usr/src/sys/kern/vfs_bio.c:242
#38 0xc0290f08 in ffs_update (v=0xd3d00e34)
    at /usr/src/sys/ufs/ffs/ffs_inode.c:124
#39 0xc029b960 in ffs_full_fsync (v=0xd3d00ef8)
    at /usr/src/sys/sys/vnode_if.h:1452
#40 0xc029b4bb in ffs_fsync (v=0xd3d00ef8)
    at /usr/src/sys/ufs/ffs/ffs_vnops.c:257
#41 0xc029a0c7 in ffs_sync (mp=0xc0a86400, waitfor=0x3, cred=0xc0a20f00, 
    p=0xd3cec80c) at /usr/src/sys/sys/vnode_if.h:596
#42 0xc01ccb53 in sync_fsync (v=0xd3d00f70)
    at /usr/src/sys/miscfs/syncfs/sync_vnops.c:154
#43 0xc01cc8d1 in sched_sync (v=0xd3cec80c) at /usr/src/sys/sys/vnode_if.h:596
(gdb) 

>How-To-Repeat:
	Load up the system with filesystem activity and wait.
>Fix:
	unknown
>Release-Note:
>Audit-Trail:
>Unformatted: