Subject: kern/23439: ffs panics: locking against myself
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dogcow@babymeat.com>
List: netbsd-bugs
Date: 11/14/2003 09:55:07
>Number:         23439
>Category:       kern
>Synopsis:       ffs panics: locking against myself
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 14 17:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Tom Spindler
>Release:        NetBSD 1.6ZF
>Organization:
	
>Environment:
	
	
System: NetBSD whitey 1.6ZF NetBSD 1.6ZF (WHITEY) #10: Wed Nov 12 20:28:31 PST 2003 dogcow@whitey:/usr/src/sys/arch/i386/compile/WHITEY i386
Architecture: i386
Machine: i386
>Description:
After a couple of hours of intense disk usage, the kernel often either locks
up solid or panics with locking against myself.

#0  0x00000001 in ?? ()
#1  0xc022f62b in cpu_reboot (howto=283820032, bootstr=0x0)
    at ../../../../arch/i386/i386/machdep.c:795
#2  0xc01d0718 in panic (
    fmt=0x1000 "U\211åVWS\036\006\017 \017¨\213E\bf£à\037")
    at ../../../../kern/subr_prf.c:242
#3  0xc01b7e6a in lockmgr (lkp=0x10eab000, flags=283820032, 
    interlkp=0xe42d26dc) at ../../../../kern/kern_lock.c:541
#4  0xc01fa95d in genfs_lock (v=0x0)
    at ../../../../miscfs/genfs/genfs_vnops.c:324
#5  0xc01f997a in vn_lock (vp=0x10eab000, flags=283820032)
    at ../../../../sys/vnode_if.h:1029
#6  0xc01f00af in vget (vp=0x10eac000, flags=0)
    at ../../../../kern/vfs_subr.c:1240
#7  0xc0190bba in ffs_sync (mp=0x1000, waitfor=2, cred=0xc0f7f780, 
    p=0xe412a9c0) at ../../../../ufs/ffs/ffs_vfsops.c:1274
#8  0xc01f2df6 in sys_sync (l=0x0, v=0x0, retval=0x0)
    at ../../../../kern/vfs_syscalls.c:608
#9  0xc01f17f7 in vfs_shutdown () at ../../../../kern/vfs_subr.c:2619
#10 0xc022f63f in cpu_reboot (howto=283820032, bootstr=0x0)
    at ../../../../arch/i386/i386/machdep.c:754
#11 0xc01d0718 in panic (
    fmt=0x1000 "U\211åVWS\036\006\017 \017¨\213E\bf£à\037")
    at ../../../../kern/subr_prf.c:242
#12 0xc02373d4 in trap (frame=0xe45c4ad4)
    at ../../../../arch/i386/i386/trap.c:296
#13 0xc0102c6d in calltrap ()
#14 0xc0195185 in ufs_lookup (v=0xe45c4d84)
    at ../../../../ufs/ufs/ufs_lookup.c:169
#15 0xc01ee53e in lookup (ndp=0xe45c4e74) at ../../../../sys/vnode_if.h:82
#16 0xc01edf38 in namei (ndp=0xe45c4e74) at ../../../../kern/vfs_lookup.c:171
#17 0xc01f6060 in sys___lstat13 (l=0x0, v=0x1000, retval=0xe45c4f5c)
    at ../../../../kern/vfs_syscalls.c:2197
#18 0xc0236d12 in syscall_plain (frame=0xe45c4fa8)
    at ../../../../arch/i386/i386/syscall.c:156

it's somewhat worrisome that in frame #16:
(gdb) print *ndp
can not access 0x8056940, invalid translation (invalid PDE)
can not access 0x8056940, invalid translation (invalid PDE)
can not access 0x8056940, invalid translation (invalid PDE)
can not access 0x8056940, invalid translation (invalid PDE)
can not access 0x8056940, invalid translation (invalid PDE)
can not access 0x8056940, invalid translation (invalid PDE)
$8 = {ni_dirp = 0x8056940 <Address 0x8056940 out of bounds>, 
  ni_segflg = UIO_USERSPACE, ni_startdir = 0x0, ni_rootdir = 0xe331a000, 
  ni_vp = 0x0, ni_dvp = 0xe42d26dc, ni_pathlen = 1, ni_next = 0xe332d809 "", 
  ni_loopcnt = 0, ni_cnd = {cn_nameiop = 0, cn_flags = 49156, 
    cn_proc = 0xe412a9c0, cn_cred = 0xc0f7f780, 
    cn_pnbuf = 0xe332d800 "Xtrans.mm", cn_nameptr = 0xe332d800 "Xtrans.mm", 
    cn_namelen = 9, cn_hash = 1045775029, cn_consume = 0}}

and in frame #17:
(gdb) print l
$15 = (struct lwp *) 0x0

	
>How-To-Repeat:
I generally reproduce this problem by attempting to rebuild userland.
	
>Fix:
none known.
	
>Release-Note:
>Audit-Trail:
>Unformatted: