Subject: cgd->vnd panic in BETA_2.0
To: None <tech-kern@netbsd.org>
From: Karl Janmar <karl@utopiafoundation.org>
List: tech-kern
Date: 09/18/2004 20:52:36
Hi!

I have a filesystem mounted on a cgd device, the cgd is on a vnd
device from a file on local fs. I have constistent panics when filling
this filesystem with data using cp. I have captured one panic with kernel
core, the backtrace is following:
#1  0xc039afbb in cpu_reboot (howto=3D260, bootstr=3D0x0)
    at /usr/src/sys/arch/i386/i386/machdep.c:745
#2  0xc02d3b59 in db_reboot_cmd (addr=3D1, have_addr=3D0, count=3D-10693811=
18,
    modif=3D0xc06e184c "=A0\026e=C0c\030n=C0\001") at
/usr/src/sys/ddb/db_command.c:689
#3  0xc02d369f in db_command (last_cmdp=3D0xc05d1684, cmd_table=3D0xc04cfa8=
0)
    at /usr/src/sys/ddb/db_command.c:464
#4  0xc02d33b2 in db_command_loop () at /usr/src/sys/ddb/db_command.c:255
#5  0xc02d647c in db_trap (type=3D1, code=3D0) at
/usr/src/sys/ddb/db_trap.c:101
#6  0xc0398756 in kdb_trap (type=3D1, code=3D0, regs=3D0xc06e1aa0)
    at /usr/src/sys/arch/i386/i386/db_interface.c:225
#7  0xc03a53d3 in trap (frame=3D0xc06e1aa0)
    at /usr/src/sys/arch/i386/i386/trap.c:284
#8  0xc0102cb3 in calltrap ()
#9  0xc0314741 in panic (fmt=3D0xc0561e6d "lockmgr: no context")
    at /usr/src/sys/kern/subr_prf.c:226
#10 0xc02f8bad in lockmgr (lkp=3D0xc84f4968, flags=3D196674,
interlkp=3D0xc84f48f8)
    at /usr/src/sys/kern/kern_lock.c:856
#11 0xc0340541 in genfs_lock (v=3D0xc06e1b78)
    at /usr/src/sys/miscfs/genfs/genfs_vnops.c:324
#12 0xc033f3c8 in VOP_LOCK (vp=3D0xc84f48f8, flags=3D196674)
    at /usr/src/sys/kern/vnode_if.c:1082
#13 0xc033e935 in vn_lock (vp=3D0xc84f48f8, flags=3D131138)
---Type <return> to continue, or q <return> to quit---bt
    at /usr/src/sys/kern/vfs_vnops.c:782
#14 0xc02e5742 in vndstrategy (bp=3D0xc0e7ba30) at
/usr/src/sys/dev/vnd.c:509
#15 0xc0344991 in spec_strategy (v=3D0xc06e1c88)
    at /usr/src/sys/miscfs/specfs/spec_vnops.c:611
#16 0xc033f464 in VOP_STRATEGY (vp=3D0xc83694f0, bp=3D0xc0e7ba30)
    at /usr/src/sys/kern/vnode_if.c:1175
#17 0xc02ddfed in cgdstart (dksc=3D0xc0dd5800, bp=3D0xc0ef80f8)
    at /usr/src/sys/dev/cgd.c:370
#18 0xc02df600 in dk_start (di=3D0xc05d17c4, dksc=3D0xc0dd5800)
    at /usr/src/sys/dev/dksubr.c:225
#19 0xc02de136 in cgdiodone (vbp=3D0xc0e7ba30) at /usr/src/sys/dev/cgd.c:42=
1
#20 0xc0331844 in biodone (bp=3D0xc0e7ba30) at
/usr/src/sys/kern/vfs_bio.c:1350
#21 0xc02e5cd1 in vndiodone (bp=3D0xc0e7ceb8) at /usr/src/sys/dev/vnd.c:720
#22 0xc0331844 in biodone (bp=3D0xc0e7ceb8) at
/usr/src/sys/kern/vfs_bio.c:1350
#23 0xc03bdeba in wddone (v=3D0xc0def800) at /usr/src/sys/dev/ata/wd.c:814
#24 0xc03c0eda in wdc_ata_bio_done (chp=3D0xc0c6a8fc, xfer=3D0xc0dee000)
    at /usr/src/sys/dev/ata/ata_wdc.c:798
#25 0xc03c0b0e in wdc_ata_bio_intr (chp=3D0xc0c6a8fc, xfer=3D0xc0dee000,
irq=3D1)
    at /usr/src/sys/dev/ata/ata_wdc.c:734
#26 0xc021fc9a in wdcintr (arg=3D0xc0c6a8fc) at
/usr/src/sys/dev/ic/wdc.c:949
#27 0xc01025c4 in Xintr_legacy14 ()


I will trigger this panic again with DEBUG and DIAGNOSTIC turned on.
As the backtrace suggest there seems to be a locking issue?!
Is anybody experience the same problem?
Any ideas?

my system is:
NetBSD island 2.0_BETA NetBSD 2.0_BETA (ISLAND) #2: Thu Sep 16 23:23:03
CEST 2004  root@island:/usr/obj/sys/arch/i386/compile/ISLAND i386

source from around Sep. 16.


Regards,

Karl