Subject: kern/11489: panic: "_simple_lock_held((&sched_lock)) == 0" failed
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mjl@emsi.priv.at>
List: netbsd-bugs
Date: 11/14/2000 02:49:11
>Number:         11489
>Category:       kern
>Synopsis:       panic: "_simple_lock_held((&sched_lock)) == 0" failed
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 14 02:49:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Martin J. Laubach
>Release:        1.5I as of 06-NOV-2000
>Organization:
>Environment:
System: NetBSD asparagus 1.5I NetBSD 1.5I (ASPARAGUS) #0: Mon Nov 6 16:27:42 CET 2000 mjl@asparagus:/home/temp/devel/cvs/src/sys/arch/i386/compile/ASPARAGUS i386


>Description:

  My machine suddenly panicked with:

panic: kernel diagnostic assertion "_simple_lock_held((&sched_lock)) == 0" failed: file "../../../../kern/kern_sig.c", line 771

syncing disks... simple_lock: lock held
lock: 0xc02ad274, currently at: ../../../../kern/kern_synch.c:1013
last locked: ../../../../kern/kern_synch.c:398
last unlocked: ../../../../kern/kern_sig.c:970
14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 13 13 12 12 12 12 12 giving up

dumping to dev 4,1 offset 33463
dump 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 


asparagus# gdb netbsd.gdb
GNU gdb 4.17
[...]
(gdb) target kcore /var/crash/netbsd.1.core
panic: kernel %sassertion "%s" failed: file "%s", line %d

#0  0xc029ec00 in freebsd_emul_path ()
(gdb) where
#0  0xc029ec00 in freebsd_emul_path ()
#1  0x2c52000 in ?? ()
#2  0xc022600f in cpu_reboot (howto=256, bootstr=0x0)
    at ../../../../arch/i386/i386/machdep.c:1343
#3  0xc013ec73 in panic () at ../../../../kern/subr_prf.c:240
#4  0xc0268741 in __assert () at ../../../../../../lib/libkern/__assert.c:47
#5  0xc0134196 in psignal1 (p=0xc45f9b18, signum=20, dolock=1)
    at ../../../../kern/kern_sig.c:771
#6  0xc013477b in issignal (p=0xc45f9984) at ../../../../kern/kern_sig.c:1112
#7  0xc01366b6 in ltsleep (ident=0xc02d3f40, priority=281, 
    wmesg=0xc0272c6e "ttybg", timo=0, interlock=0x0)
    at ../../../../kern/kern_synch.c:447
#8  0xc01477d6 in ttysleep (tp=0xc43ca470, chan=0xc02d3f40, pri=281, 
    wmesg=0xc0272c6e "ttybg", timo=0) at ../../../../kern/tty.c:2155
#9  0xc0146678 in ttread (tp=0xc43ca470, uio=0xc4618eec, flag=0)
    at ../../../../kern/tty.c:1378
#10 0xc014816d in ptsread (dev=1281, uio=0xc4618eec, flag=0)
    at ../../../../kern/tty_pty.c:369
#11 0xc016234c in spec_read (v=0xc4618ea0)
    at ../../../../miscfs/specfs/spec_vnops.c:271
#12 0xc020e401 in ufsspec_read (v=0xc4618ea0)
    at ../../../../ufs/ufs/ufs_vnops.c:1703
#13 0xc015eefe in vn_read (fp=0xc4582b44, offset=0xc4582b60, uio=0xc4618eec, 
    cred=0xc050d200, flags=1) at ../../../../sys/vnode_if.h:353
#14 0xc01405bb in dofileread (p=0xc45f9984, fd=0, fp=0xc4582b44, 
    buf=0xbfbfd5d4, nbyte=1024, offset=0xc4582b60, flags=1, retval=0xc4618f80)
    at ../../../../kern/sys_generic.c:145
#15 0xc014051f in sys_read (p=0xc45f9984, v=0xc4618f88, retval=0xc4618f80)
    at ../../../../kern/sys_generic.c:96
#16 0xc022c2d8 in syscall (frame={tf_es = 31, tf_ds = 31, 
      tf_edi = -1077945900, tf_esi = -1077946924, tf_ebp = -1077945884, 
      tf_ebx = 0, tf_edx = -1077946924, tf_ecx = 2, tf_eax = 3, tf_trapno = 3, 
      tf_err = 2, tf_eip = 1208862119, tf_cs = 23, tf_eflags = 582, 
      tf_esp = -1077946956, tf_ss = 31, tf_vm86_es = 0, tf_vm86_ds = 0, 
      tf_vm86_fs = 0, tf_vm86_gs = 0}) at ../../../../arch/i386/i386/trap.c:765
#17 0xc0100dc9 in syscall1 ()
can not access 0xbfbfd9e4, invalid translation (invalid PDE)
can not access 0xbfbfd9e4, invalid translation (invalid PDE)
Cannot access memory at address 0xbfbfd9e4.


asparagus# ps -alw -M /var/crash/netbsd.1.core
UID  PID PPID CPU PRI NI     VSZ RSS WCHAN  STAT TT     TIME COMMAND
999 4052    0   0   3  0   26460   0 -      Ts+  p1  0:00.00 (tcsh)
999 4942    0   2   2  0  218620   0 select T    p1  0:02.00 (rsh)
999 4944    0   1  -5  0  223996   0 -      T    p1  0:01.00 (rsh)
999 4945    0   4   3  0  224252   0 ttybg  R    p1  0:04.00 (rsh)
 39  183    0  14   2  0 1990172   0 select T    E0- 0:14.00 (netplan)
  0  233    0  18   3  0   17244   0 ttyin  Ts+  E0  0:18.00 (getty)
  0  234    0  18   3  0   17756   0 ttyin  Ts+  E1  0:18.00 xdm: :0 session (getty)
  0  235    0  18   3  0   18780   0 ttyin  Ts+  E2  0:18.00 /usr/libexec/getty Pc ttyE0 
  0  236    0  18   3  0   18268   0 ttyin  Ts+  E3  0:18.00 /usr/libexec/getty Pc ttyE1 


  A kernel with symbols is still available if you need more information.

>How-To-Repeat:
  
  I accidentially typed "rsh asparagus mt offline &" when that happened
(ie rsh to itself), but that is probably just a coincidence.

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: