NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/45107: KASSERT when mounting v7fs disk image



>Number:         45107
>Category:       kern
>Synopsis:       KASSERT when mounting v7fs disk image
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 30 13:35:00 +0000 2011
>Originator:     Nicolas Joly
>Release:        NetBSD 5.99.54
>Organization:
Insitut Pasteur
>Environment:
System: NetBSD lanfeust.sis.pasteur.fr 5.99.54 NetBSD 5.99.54 (LANFEUST) #5: 
Thu Jun 30 13:39:15 CEST 2011 
njoly%lanfeust.sis.pasteur.fr@localhost:/local/src/NetBSD/obj.amd64/sys/arch/amd64/compile/LANFEUST
 amd64
Architecture: x86_64
Machine: amd64
>Description:
Trying to mount a newly created v7fs disk image results in a KASSERT panic.

njoly@lanfeust [~]> newfs_v7fs -F -s 10000 v7fs.img
njoly@lanfeust [~]> sudo vnconfig vnd0 v7fs.img 
njoly@lanfeust [~]> sudo mount
njoly@lanfeust [~]> sudo mount_v7fs /dev/vnd0d /mnt
[...PANIC...]
panic: kernel diagnostic assertion "vp == vp->v_specnode->sn_dev->sd_bdevvp" fai
led: file "/local/src/NetBSD/src/sys/miscfs/specfs/spec_vnops.c", line 891

#3  0xffffffff80665113 in spec_strategy (v=<value optimized out>) at 
/local/src/NetBSD/src/sys/miscfs/specfs/spec_vnops.c:891
891             KASSERT(vp == vp->v_specnode->sn_dev->sd_bdevvp);
(gdb) p vp
$1 = (struct vnode *) 0xffff800048d21088
(gdb) p vp->v_un.vu_specnode->sn_dev->sd_bdevvp
$4 = (vnode_t *) 0x0

(gdb) bt
#0  0xffffffff804dce14 in cpu_reboot (howto=260, bootstr=<value optimized out>)
    at /local/src/NetBSD/src/sys/arch/amd64/amd64/machdep.c:696
#1  0xffffffff80689431 in panic (fmt=0xffffffff80ad0698 <Address 
0xffffffff80ad0698 out of bounds>)
    at /local/src/NetBSD/src/sys/kern/subr_prf.c:301
#2  0xffffffff807d9b05 in kern_assert (t=0x0, f=0x0, l=0, e=0x0) at 
/local/src/NetBSD/src/sys/lib/libkern/kern_assert.c:50
#3  0xffffffff80665113 in spec_strategy (v=<value optimized out>) at 
/local/src/NetBSD/src/sys/miscfs/specfs/spec_vnops.c:891
#4  0xffffffff8078aff0 in VOP_STRATEGY (vp=0xffff800048d21088, bp=0x0) at 
/local/src/NetBSD/src/sys/kern/vnode_if.c:1197
#5  0xffffffff807681c3 in bio_doread (vp=0xffff800048d21088, blkno=<value 
optimized out>, size=<value optimized out>, 
    cred=<value optimized out>, async=0) at 
/local/src/NetBSD/src/sys/kern/vfs_bio.c:693
#6  0xffffffff8076835f in bread (vp=0x0, blkno=0, size=0, cred=0x0, flags=0, 
bpp=0x0)
    at /local/src/NetBSD/src/sys/kern/vfs_bio.c:732
#7  0xffffffff80762465 in v7fs_os_read (self=<value optimized out>, 
buf=0xffff800003fe0000 "", block=0)
    at /local/src/NetBSD/src/sys/fs/v7fs/v7fs_io_kern.c:188
#8  0xffffffff807620a2 in scratch_read (fs=0xffff800003fe0000, blk=1) at 
/local/src/NetBSD/src/sys/fs/v7fs/v7fs_io.c:78
#9  0xffffffff807626a6 in v7fs_superblock_load (fs=0x0) at 
/local/src/NetBSD/src/sys/fs/v7fs/v7fs_superblock.c:74
#10 0xffffffff80762ad6 in v7fs_mountfs (devvp=0xffff800048d21088, 
mp=0xffff800048b7d000, endian=<value optimized out>)
    at /local/src/NetBSD/src/sys/fs/v7fs/v7fs_vfsops.c:275
#11 0xffffffff80763478 in v7fs_mount (mp=0xffff800048b7d000, 
path=0x7f7fffffd420 <Address 0x7f7fffffd420 out of bounds>, 
    data=0xffff800049c2ccd0, data_len=<value optimized out>) at 
/local/src/NetBSD/src/sys/fs/v7fs/v7fs_vfsops.c:173
#12 0xffffffff807716cf in VFS_MOUNT (mp=0xffff800048b7d000, a=0x7f7fffffd420 
<Address 0x7f7fffffd420 out of bounds>, 
    b=0xffff800049c2ccd0, c=0xffff800048c37c08) at 
/local/src/NetBSD/src/sys/kern/vfs_subr.c:953
#13 0xffffffff8077060e in mount_domount (l=0xffff800048c0f660, 
vpp=0xffff800048c37bb8, vfsops=0xffffffff80d39c00, 
    path=0x7f7fffffd420 <Address 0x7f7fffffd420 out of bounds>, flags=0, 
data=0xffff800049c2ccd0, data_len=0xffff800048c37c08)
    at /local/src/NetBSD/src/sys/kern/vfs_mount.c:703
#14 0xffffffff80777257 in do_sys_mount (l=0xffff800048c0f660, 
vfsops=0xffffffff80d39c00, 
    type=0x4013a7 <Address 0x4013a7 out of bounds>, path=0x7f7fffffd420 
<Address 0x7f7fffffd420 out of bounds>, flags=0, 
    data=0x7f7fffffdc20, data_seg=UIO_USERSPACE, data_len=16, 
retval=0xffff800048c37c30)
    at /local/src/NetBSD/src/sys/kern/vfs_syscalls.c:468
#15 0xffffffff807776f0 in sys___mount50 (l=0x0, uap=<value optimized out>, 
retval=<value optimized out>)
    at /local/src/NetBSD/src/sys/kern/vfs_syscalls.c:388
#16 0xffffffff8069d2b5 in syscall (frame=0xffff800048c37c80) at 
/local/src/NetBSD/src/sys/sys/syscallvar.h:61
#17 0xffffffff801006a8 in Xsyscall ()



>How-To-Repeat:
Build and run a kernel with option DIAGNOSTIC and file-system V7FS.
Create a v7fs file-system image, and try to mount it with help from
vnd(4).
>Fix:



Home | Main Index | Thread Index | Old Index