Subject: kern/31461: NetBSD 2.0.2/softdep: panic allocdirect_merge: ob %lld != nb %lld || lbn %lld >= %d ||\nosize %ld != nsize %ld
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <Frank.Kardel@Acrys.com>
List: netbsd-bugs
Date: 10/04/2005 07:12:00
>Number:         31461
>Category:       kern
>Synopsis:       NetBSD 2.0.2/softdep: panic allocdirect_merge: ob %lld != nb %lld || lbn %lld >= %d ||\nosize %ld != nsize %ld
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 04 07:12:00 +0000 2005
>Originator:     Frank.Kardel@Acrys.com
>Release:        NetBSD 2.0.2
>Organization:
>Environment:
System: NetBSD Orcus 2.0.2 NetBSD 2.0.2 (ORCUS32) #5: Thu Aug 25 07:59:16 CEST 2005 kardel@Orcus:/usr/src/sys/arch/i386/compile/obj.i386/ORCUS32 i386
Architecture: i386
Machine: i386
>Description:
	Softdep panic: allocdirect_merge: ob %lld != nb %lld || lbn %lld >= %d ||\nosize %ld != nsize %ld

	Core & netbsd.gdb available on request.

#1  0xc03e2ab7 in cpu_reboot (howto=260, bootstr=0x0)
    at /usr/src/sys/arch/i386/i386/machdep.c:745
#2  0xc035a74c in panic (fmt=0xc06e8a60 "lockmgr: locking against myself")
    at /usr/src/sys/kern/subr_prf.c:242
#3  0xc033fac5 in lockmgr (lkp=0xd6cd80c0, flags=65554, interlkp=0xd6cd8050)
    at /usr/src/sys/kern/kern_lock.c:856
#4  0xc0387189 in genfs_lock (v=0xd221d864)
    at /usr/src/sys/miscfs/genfs/genfs_vnops.c:324
#5  0xc0386118 in VOP_LOCK (vp=0xd6cd8050, flags=65554)
    at /usr/src/sys/kern/vnode_if.c:1082
#6  0xc0385771 in vn_lock (vp=0xd6cd8050, flags=65554)
    at /usr/src/sys/kern/vfs_vnops.c:782
#7  0xc037d313 in vget (vp=0xd6cd8050, flags=65554)
    at /usr/src/sys/kern/vfs_subr.c:1247
#8  0xc02fc212 in ffs_sync (mp=<incomplete type>, waitfor=2, cred=0xc5cb3080, 
    p=0xd3b88000) at /usr/src/sys/ufs/ffs/ffs_vfsops.c:1282
#9  0xc0380126 in sys_sync (l=0xd632a9e8, v=0x0, retval=0x0)
    at /usr/src/sys/kern/vfs_syscalls.c:616
#10 0xc037e86b in vfs_shutdown () at /usr/src/sys/kern/vfs_subr.c:2637
#11 0xc03e2acb in cpu_reboot (howto=256, bootstr=0x0)
    at /usr/src/sys/arch/i386/i386/machdep.c:731
#12 0xc035a74c in panic (
    fmt=0xc06e5bc0 "allocdirect_merge: ob %lld != nb %lld || lbn %lld >= %d ||\nosize %ld != nsize %ld") at /usr/src/sys/kern/subr_prf.c:242
#13 0xc02f2bff in allocdirect_merge (adphead=0xdee9072c, newadp=0xd241cd4c, 
    oldadp=0xd241c70c) at /usr/src/sys/ufs/ffs/ffs_softdep.c:1630
#14 0xc02f7d7b in merge_inode_lists (inodedep=0xdee906e8)
    at /usr/src/sys/ufs/ffs/ffs_softdep.c:4667
#15 0xc02f7b74 in softdep_update_inodeblock (ip=0xdf1ea794, bp=0xc60f070c, 
    waitfor=1) at /usr/src/sys/ufs/ffs/ffs_softdep.c:4614
#16 0xc02ef67f in ffs_update (v=0xd221dad4)
    at /usr/src/sys/ufs/ffs/ffs_inode.c:133
#17 0xc03863fc in VOP_UPDATE (vp=0xd6cd8050, access=0x0, modify=0x0, flags=1)
    at /usr/src/sys/kern/vnode_if.c:1526
#18 0xc02ee480 in ffs_balloc_ufs2 (v=0xd221dc84)
    at /usr/src/sys/ufs/ffs/ffs_balloc.c:1038
#19 0xc0386326 in VOP_BALLOC (vp=0xd6cd8050, startoffset=196608, size=16384, 
    cred=0xc5cb3080, flags=0, bpp=0x0) at /usr/src/sys/kern/vnode_if.c:1398
#20 0xc0319f67 in ufs_gop_alloc (vp=0xd6cd8050, off=196608, len=16384, 
    flags=0, cred=0xc5cb3080) at /usr/src/sys/ufs/ufs/ufs_vnops.c:2152
#21 0xc02fd648 in ffs_write (v=0xd221de24)
    at /usr/src/sys/ufs/ufs/ufs_readwrite.c:349
#22 0xc0385cd0 in VOP_WRITE (vp=0xd6cd8050, uio=0xd221dec4, ioflag=1, 
    cred=0xc5cb3080) at /usr/src/sys/kern/vnode_if.c:428
#23 0xc0385328 in vn_write (fp=0xd1e08900, offset=0xd1e08928, uio=0xd221dec4, 
    cred=0xc5cb3080, flags=1) at /usr/src/sys/kern/vfs_vnops.c:564
#24 0xc035e1fd in dofilewrite (p=0xd3b88000, fd=4, fp=0xd1e08900, 
    buf=0x83eb000, nbyte=16384, offset=0xd1e08928, flags=1, retval=0xd221df5c)
    at /usr/src/sys/kern/sys_generic.c:358
#25 0xc035e16d in sys_write (l=0xd632a9e8, v=0xd221df64, retval=0xd221df5c)
    at /usr/src/sys/kern/sys_generic.c:314
#26 0xc03ec5ae in syscall_plain (frame=0xd221dfa8)
    at /usr/src/sys/arch/i386/i386/syscall.c:156

(gdb) print *newadp
$1 = {ad_list = {wk_list = {le_next = 0x0, le_prev = 0xc6869f5c}, wk_type = 5, 
    wk_state = 13}, ad_next = {tqe_next = 0xd241c70c, tqe_prev = 0xd241cbcc}, 
  ad_lbn = 12, ad_newblkno = 7478024, ad_oldblkno = 0, ad_newsize = 16384, 
  ad_oldsize = 0, ad_deps = {le_next = 0x0, le_prev = 0xd29b8694}, 
  ad_buf = 0x0, ad_inodedep = 0xdee906e8, ad_freefrag = 0x0, ad_newdirblk = {
    lh_first = 0x0}}

(gdb) print *oldadp
$2 = {ad_list = {wk_list = {le_next = 0x0, le_prev = 0xc6869f5c}, wk_type = 5, 
    wk_state = 13}, ad_next = {tqe_next = 0x0, tqe_prev = 0xd241cd5c}, 
  ad_lbn = 12, ad_newblkno = 7478024, ad_oldblkno = 0, ad_newsize = 16384, 
  ad_oldsize = 0, ad_deps = {le_next = 0x0, le_prev = 0xd29b8694}, 
  ad_buf = 0x0, ad_inodedep = 0xdee906e8, ad_freefrag = 0x0, ad_newdirblk = {
    lh_first = 0x0}}


>How-To-Repeat:
	Let 2.0.2 run for a while in production...

>Fix:
	?

>Unformatted: