GENERIC 7.0-CURRENT from Nov 14 16:00 UTC, vmcore.20
Test with corrupted UFS2 file system.

KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2005 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 7.0-CURRENT #16: Mon Nov 14 17:19:26 CET 2005
    pho@crashbox.osted.lan:/usr/src/sys/i386/compile/PHO
WARNING: WITNESS option enabled, expect reduced performance.
ACPI APIC Table: <A M I  OEMAPIC >
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) XEON(TM) CPU 1.80GHz (1799.80-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf24  Stepping = 4
  Features=0x3febfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM>
  Logical CPUs per core: 2
real memory  = 1073676288 (1023 MB)
avail memory = 1041006592 (992 MB)
:
Trying to mount root from ufs:/dev/ad0s1a
WARNING: / was not properly dismounted
WARNING: /home was not properly dismounted
WARNING: /tmp was not properly dismounted
WARNING: /usr was not properly dismounted
WARNING: /var was not properly dismounted
fxp0: link state changed to UP
panic: wrong length 1088 for sectorsize 512
cpuid = 1
KDB: enter: panic
[thread pid 1887 tid 100132 ]
Stopped at      kdb_enter+0x2b: nop
db> where
Tracing pid 1887 tid 100132 td 0xc54f5c00
kdb_enter(c0872545) at kdb_enter+0x2b
panic(c086cce4,440,0,200,200) at panic+0x14b
g_io_request(c54284a4,c5084cc0,d8d17f7c,c5515414,e76eba28) at g_io_request+0xed
g_vfs_strategy(c5515520,d8d17f7c,d8d17f7c,0,c55d2ad4) at g_vfs_strategy+0x49
ffs_geom_strategy(c5515520,d8d17f7c,e0,0,c0913940) at ffs_geom_strategy+0xab
ufs_strategy(e76eba70) at ufs_strategy+0xb5
VOP_STRATEGY_APV(c0913400,e76eba70) at VOP_STRATEGY_APV+0x95
bufstrategy(c50e07d8,d8d17f7c) at bufstrategy+0x55
breadn(c50e06cc,0,0,440,0) at breadn+0xfb
bread(c50e06cc,0,0,440,0) at bread+0x20
ffs_read(e76ebbac) at ffs_read+0x23f
VOP_READ_APV(c0913400,e76ebbac) at VOP_READ_APV+0x7e
ufs_readdir(e76ebc34) at ufs_readdir+0xd4
VOP_READDIR_APV(c0913400,e76ebc34) at VOP_READDIR_APV+0x7e
getdirentries(c54f5c00,e76ebd04,c,c54f5c00,e76ebd30) at getdirentries+0x143
syscall(3b,805003b,bfbf003b,8050080,1) at syscall+0x27e
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (196, FreeBSD ELF32, getdirentries), eip = 0x28169fe3, esp = 0xbfbfe3ac, ebp = 0xbfbfe3d8 ---
db> call doadump
Dumping 1023 MB (2 chunks)
  chunk 0: 1MB (159 pages) ... ok
  chunk 1: 1023MB (261872 pages) 1007 991 975 959 943 927 911 895 879 863 847 831 815 799 783 767 751 735 719 703 687 671 655 639 623 607 591 575 559 543 527 511 495 479 463 447 431 415 399 383 367 351 335 319 303 287 271 255 239 223 207 191 175 159 143 127 111 95 79 63 47 31 15 ... ok

Dump complete
= 0xf
db> reset

(kgdb) bt
#0  doadump () at pcpu.h:165
#1  0xc046a3a3 in db_fncall (dummy1=0xc09b6e60, dummy2=0x0, dummy3=0x0, dummy4=0xe76eb7c0 "n| \207~طnܷn\220\a")
    at ../../../ddb/db_command.c:489
#2  0xc046a1a8 in db_command (last_cmdp=0xc0923ce4, cmd_table=0x0, aux_cmd_tablep=0xc089e0a4, aux_cmd_tablep_end=0xc089e0c0)
    at ../../../ddb/db_command.c:404
#3  0xc046a270 in db_command_loop () at ../../../ddb/db_command.c:455
#4  0xc046be89 in db_trap (type=0x3, code=0x0) at ../../../ddb/db_main.c:228
#5  0xc0660924 in kdb_trap (type=0x3, code=0x0, tf=0xe76eb958) at ../../../kern/subr_kdb.c:485
#6  0xc0806924 in trap (frame=
      {tf_fs = 0xe76e0008, tf_es = 0xc0660028, tf_ds = 0xc0870028, tf_edi = 0xc086cce4, tf_esi = 0x1, tf_ebp = 0xe76eb998, tf_isp = 0xe76eb984, tf_ebx = 0xe76eb9c4, tf_edx = 0x0, tf_ecx = 0xc1033000, tf_eax = 0x12, tf_trapno = 0x3, tf_err = 0x0, tf_eip = 0xc066062b, tf_cs = 0x20, tf_eflags = 0x282, tf_esp = 0xe76eb9b8, tf_ss = 0xc064688f}) at ../../../i386/i386/trap.c:612
#7  0xc07f380a in calltrap () at ../../../i386/i386/exception.s:139
#8  0xc066062b in kdb_enter (msg=0x12 <Address 0x12 out of bounds>) at cpufunc.h:60
#9  0xc064688f in panic (fmt=0xc086cce4 "wrong length %jd for sectorsize %u") at ../../../kern/kern_shutdown.c:549
#10 0xc0611889 in g_io_request (bp=0xc54284a4, cp=0xc5084cc0) at ../../../geom/geom_io.c:290
#11 0xc06144cd in g_vfs_strategy (bo=0x12, bp=0xd8d17f7c) at ../../../geom/geom_vfs.c:106
#12 0xc0786243 in ffs_geom_strategy (bo=0xc5515520, bp=0xd8d17f7c) at ../../../ufs/ffs/ffs_vfsops.c:1694
#13 0xc07914c1 in ufs_strategy (ap=0x12) at ../../../ufs/ufs/ufs_vnops.c:1927
#14 0xc0818619 in VOP_STRATEGY_APV (vop=0xc0913940, a=0xe76eba70) at vnode_if.c:1796
#15 0xc0691e61 in bufstrategy (bo=0x12, bp=0xd8d17f7c) at vnode_if.h:928
#16 0xc068d0f7 in breadn (vp=0xc50e06cc, blkno=0x0, size=0x440, rablkno=0x0, rabsize=0x0, cnt=0x0, cred=0x0, bpp=0x12) at buf.h:415
#17 0xc068cff8 in bread (vp=0xc50e06cc, blkno=0x0, size=0x440, cred=0x0, bpp=0xe76ebb34) at ../../../kern/vfs_bio.c:719
#18 0xc0786883 in ffs_read (ap=0x12) at ../../../ufs/ffs/ffs_vnops.c:447
#19 0xc08176b2 in VOP_READ_APV (vop=0x12, a=0xe76ebbac) at vnode_if.c:643
#20 0xc079118c in ufs_readdir (ap=0xe76ebc34) at vnode_if.h:343
#21 0xc0818132 in VOP_READDIR_APV (vop=0x12, a=0xe76ebc34) at vnode_if.c:1427
#22 0xc06a5423 in getdirentries (td=0xc54f5c00, uap=0xe76ebd04) at vnode_if.h:746
#23 0xc080718a in syscall (frame=
      {tf_fs = 0x3b, tf_es = 0x805003b, tf_ds = 0xbfbf003b, tf_edi = 0x8050080, tf_esi = 0x1, tf_ebp = 0xbfbfe3d8, tf_isp = 0xe76ebd64, tf_ebx = 0x2818d448, tf_edx = 0x0, tf_ecx = 0x2818d448, tf_eax = 0xc4, tf_trapno = 0xc, tf_err = 0x2, tf_eip = 0x28169fe3, tf_cs = 0x33, tf_eflags = 0x246, tf_esp = 0xbfbfe3ac, tf_ss = 0x3b}) at ../../../i386/i386/trap.c:1003
#24 0xc07f385f in Xint0x80_syscall () at ../../../i386/i386/exception.s:200
#25 0x00000033 in ?? ()
Previous frame inner to this frame (corrupt stack?)
(kgdb) f 10
#10 0xc0611889 in g_io_request (bp=0xc54284a4, cp=0xc5084cc0) at ../../../geom/geom_io.c:290
290                     KASSERT(bp->bio_length % cp->provider->sectorsize == 0,
(kgdb) p *bp
$1 = {bio_cmd = 0x1, bio_flags = 0x0, bio_cflags = 0x0, bio_pflags = 0x0, bio_dev = 0x0, bio_disk = 0x0, bio_offset = 0x1c000,
  bio_bcount = 0x0, bio_data = 0xdd3df000 "", bio_error = 0x0, bio_resid = 0x0, bio_done = 0xc06143d4 <g_vfs_done>, bio_driver1 = 0x0,
  bio_driver2 = 0x0, bio_caller1 = 0x0, bio_caller2 = 0xd8d17f7c, bio_queue = {tqe_next = 0x0, tqe_prev = 0x0}, bio_attribute = 0x0,
  bio_from = 0x0, bio_to = 0x0, bio_length = 0x440, bio_completed = 0x0, bio_children = 0x0, bio_inbed = 0x0, bio_parent = 0x0, bio_t0 = {
    sec = 0x0, frac = 0x0}, bio_task = 0, bio_task_arg = 0x0, bio_pblkno = 0x0}
(kgdb) info loc
pp = (struct g_provider *) 0xc5320100
(kgdb) f 18
#18 0xc0786883 in ffs_read (ap=0x12) at ../../../ufs/ffs/ffs_vnops.c:447
447                             error = bread(vp, lbn, size, NOCRED, &bp);
(kgdb) info loc
vp = (struct vnode *) 0xc50e06cc
ip = (struct inode *) 0xc55d2ad4
uio = (struct uio *) 0xe76ebc54
fs = (struct fs *) 0xc4e56000
bp = (struct buf *) 0xd8d17f7c
lbn = 0x0
nextlbn = 0x1
bytesinfile = Unhandled dwarf expression opcode 0x93
(kgdb) p *fs
$2 = {fs_firstfield = 0x0, fs_unused_1 = 0x0, fs_sblkno = 0x48, fs_cblkno = 0x50, fs_iblkno = 0x58, fs_dblkno = 0x68,
  fs_old_cgoffset = 0x0, fs_old_cgmask = 0x0, fs_old_time = 0x0, fs_old_size = 0x0, fs_old_dsize = 0x0, fs_ncg = 0x4, fs_bsize = 0x2000,
  fs_fsize = 0x400, fs_frag = 0x8, fs_minfree = 0x8, fs_old_rotdelay = 0x0, fs_old_rps = 0x0, fs_bmask = 0xffffe000, fs_fmask = 0xfffffc40,
  fs_bshift = 0xd, fs_fshift = 0xa, fs_maxcontig = 0x10, fs_maxbpg = 0x400, fs_fragshift = 0x3, fs_fsbtodb = 0x1, fs_sbsize = 0x800,
  fs_spare1 = {0x0, 0x0}, fs_nindir = 0x400, fs_inopb = 0x20, fs_old_nspf = 0x0, fs_optim = 0x0, fs_old_npsect = 0x0,
  fs_old_interleave = 0x0, fs_old_trackskew = 0x0, fs_id = {0x4379a511, 0xdf7df237}, fs_old_csaddr = 0x0, fs_cssize = 0x400,
  fs_cgsize = 0x400, fs_spare2 = 0x0, fs_old_nsect = 0x0, fs_old_spc = 0x0, fs_old_ncyl = 0x0, fs_old_cpg = 0x0, fs_ipg = 0x40,
  fs_fpg = 0x100, fs_old_cstotal = {cs_ndir = 0x0, cs_nbfree = 0x0, cs_nifree = 0x0, cs_nffree = 0x0}, fs_fmod = 0x0, fs_clean = 0x0,
  fs_ronly = 0x0, fs_old_flags = 0x80, fs_fsmnt = "/mnt", '\0' <repeats 463 times>, fs_volname = '\0' <repeats 31 times>, fs_swuid = 0x0,
  fs_pad = 0x4000000, fs_cgrotor = 0x0, fs_ocsp = {0x0 <repeats 28 times>}, fs_contigdirs = 0xc4ecec10 "", fs_csp = 0xc4ece800,
  fs_maxcluster = 0xc4ecec00, fs_active = 0x0, fs_old_cpc = 0x0, fs_maxbsize = 0x2000, fs_sparecon64 = {0x0 <repeats 17 times>},
  fs_sblockloc = 0x10000, fs_cstotal = {cs_ndir = 0x2, cs_nbfree = 0x61, cs_nifree = 0xf9, cs_nffree = 0x11, cs_numclusters = 0x0,
    cs_spare = {0x0, 0x0, 0x0}}, fs_time = 0x4379a514, fs_size = 0x3e8, fs_dsize = 0x31f, fs_csaddr = 0x68, fs_pendingblocks = 0x0,
  fs_pendinginodes = 0x0, fs_snapinum = {0x0 <repeats 20 times>}, fs_avgfilesize = 0x4000, fs_avgfpdir = 0x40, fs_save_cgsize = 0x0,
  fs_sparecon32 = {0x0 <repeats 26 times>}, fs_flags = 0x2, fs_contigsumsize = 0x10, fs_maxsymlinklen = 0x78, fs_old_inodefmt = 0x0,
  fs_maxfilesize = 0x80200817fff, fs_qbmask = 0x1fff, fs_qfmask = 0x3ff, fs_state = 0x0, fs_old_postblformat = 0x0, fs_old_nrpos = 0x0,
  fs_spare5 = {0x0, 0x0}, fs_magic = 0x19540119}