GENERIC 7.0-CURRENT from Nov 14 16:00 UTC, vmcore.17
Test with corrupted UFS2 file system (bad super block).

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.81-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
fxp0: link state changed to UP
/mnt: mount pending error: blocks 137438953472 files 0
/mnt: mount pending error: blocks 0 files 4194304
g_vfs_done():md0c[READ(offset=549755904000, length=8192)]error = 5
panic: mount: lost mount
cpuid = 0
KDB: enter: panic
[thread pid 4282 tid 100125 ]
Stopped at      kdb_enter+0x2b: nop
db> where
Tracing pid 4282 tid 100125 td 0xc5341180
kdb_enter(c0872545) at kdb_enter+0x2b
panic(c087b3ae,0,0,c541a414,9) at panic+0x14b
vfs_domount(c5341180,c4cb8bc0,c4c3bc70,0,c5544160) at vfs_domount+0x827
vfs_donmount(c5341180,0,e7701ba8,c4e55180,e) at vfs_donmount+0x135
kernel_mount(c4f152b0,0,804f030,0,fffffffe) at kernel_mount+0x6d
ffs_cmount(c4f152b0,bfbfde50,0,c5341180,c0913120) at ffs_cmount+0x5d
mount(c5341180,e7701d04,c,c5341180,e7701d30) at mount+0x156
syscall(3b,3b,3b,804ae3f,bfbfe914) at syscall+0x27e
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (21, FreeBSD ELF32, mount), eip = 0x280c140f, esp = 0xbfbfde2c, ebp = 0xbfbfdec8 ---
db> shpw pcpu
No such command
db> show pcpu
cpuid        = 0
curthread    = 0xc5341180: pid 4282 "mount"
curpcb       = 0xe7701d90
fpcurthread  = none
idlethread   = 0xc4aefa80: pid 13 "idle: cpu0"
APIC ID      = 0
currentldt   = 0x50
spin locks held:
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=0xe7701828 "T\030pç| \207~À@\030pçD\030pç\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=0xe77019c0) at ../../../kern/subr_kdb.c:485
#6  0xc0806924 in trap (frame=
      {tf_fs = 0xe7700008, tf_es = 0xc0660028, tf_ds = 0xc0870028, tf_edi = 0xc087b3ae, tf_esi = 0x1, tf_ebp = 0xe7701a00, tf_isp = 0xe77019ec, tf_ebx = 0xe7701a2c, tf_edx = 0x0, tf_ecx = 0xc1033000, tf_eax = 0x12, tf_trapno = 0x3, tf_err = 0x0, tf_eip = 0xc066062b, tf_cs = 0x20, tf_eflags = 0x296, tf_esp = 0xe7701a20, 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=0xc087b3ae "mount: lost mount") at ../../../kern/kern_shutdown.c:549
#10 0xc0698b8b in vfs_domount (td=0xc5341180, fstype=0xc0913120 " \001f\031ufs", fspath=0xc4c3bc70 "/mnt", fsflags=0xc541a4dc,
    fsdata=0xc5544160) at ../../../kern/vfs_mount.c:827
#11 0xc0698189 in vfs_donmount (td=0xc5341180, fsflags=0x0, fsoptions=0xe7701ba8) at ../../../kern/vfs_mount.c:529
#12 0xc069a395 in kernel_mount (ma=0xc4f152b0, flags=0x0) at pcpu.h:162
#13 0xc07838fd in ffs_cmount (ma=0xc4f152b0, data=0xc1033000, flags=0x0, td=0xc5341180) at ../../../ufs/ffs/ffs_vfsops.c:382
#14 0xc0698352 in mount (td=0xc5341180, uap=0xe7701d04) at ../../../kern/vfs_mount.c:603
#15 0xc080718a in syscall (frame=
      {tf_fs = 0x3b, tf_es = 0x3b, tf_ds = 0x3b, tf_edi = 0x804ae3f, tf_esi = 0xbfbfe914, tf_ebp = 0xbfbfdec8, tf_isp = 0xe7701d64, tf_ebx = 0x804f050, tf_edx = 0x0, tf_ecx = 0x1, tf_eax = 0x15, tf_trapno = 0xc, tf_err = 0x2, tf_eip = 0x280c140f, tf_cs = 0x33, tf_eflags = 0x246, tf_esp = 0xbfbfde2c, tf_ss = 0x3b}) at ../../../i386/i386/trap.c:1003
#16 0xc07f385f in Xint0x80_syscall () at ../../../i386/i386/exception.s:200
#17 0x00000033 in ?? ()
Previous frame inner to this frame (corrupt stack?)
(kgdb) f 10
#10 0xc0698b8b in vfs_domount (td=0xc5341180, fstype=0xc0913120 " \001f\031ufs", fspath=0xc4c3bc70 "/mnt", fsflags=0xc541a4dc,
    fsdata=0xc5544160) at ../../../kern/vfs_mount.c:827
827                             panic("mount: lost mount");
(kgdb) l
822                     mtx_lock(&mountlist_mtx);
823                     TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list);
824                     mtx_unlock(&mountlist_mtx);
825                     vfs_event_signal(NULL, VQ_MOUNT, 0);
826                     if (VFS_ROOT(mp, LK_EXCLUSIVE, &newdp, td))
827                             panic("mount: lost mount");
828                     mountcheckdirs(vp, newdp);
829                     vput(newdp);
830                     VOP_UNLOCK(vp, 0, td);
831                     if ((mp->mnt_flag & MNT_RDONLY) == 0)
(kgdb) info loc
newdp = (struct vnode *) 0x9
vp = (struct vnode *) 0xc541a414
mp = (struct mount *) 0xc4f1b000
vfsp = (struct vfsconf *) 0xc0913120
error = 0x0
flag = 0x0
kern_flag = 0x0
va = {va_type = VDIR, va_mode = 0x1ed, va_nlink = 0x2, va_uid = 0x0, va_gid = 0x0, va_fsid = 0x50, va_fileid = 0x6, va_size = 0x200,
  va_blocksize = 0x4000, va_atime = {tv_sec = 0x4378d2fe, tv_nsec = 0x0}, va_mtime = {tv_sec = 0x43496a44, tv_nsec = 0x0}, va_ctime = {
    tv_sec = 0x434f6192, tv_nsec = 0x0}, va_birthtime = {tv_sec = 0x43496a44, tv_nsec = 0x0}, va_gen = 0xc790cf43, va_flags = 0x0,
  va_rdev = 0x843, va_bytes = 0x800, va_filerev = 0x3fd0350d7a, va_vaflags = 0xc093d020, va_spare = 0x210}
nd = {ni_dirp = 0xc4c3bc70 "/mnt", ni_segflg = UIO_SYSSPACE, ni_startdir = 0x0, ni_rootdir = 0xc4e732b8, ni_topdir = 0x0,
  ni_vp = 0xc541a414, ni_dvp = 0xc4e732b8, ni_pathlen = 0x1, ni_next = 0xc55c7004 "", ni_loopcnt = 0x0, ni_cnd = {cn_nameiop = 0x0,
    cn_flags = 0xc044, cn_thread = 0xc5341180, cn_cred = 0xc5258400, cn_lkflags = 0x2, cn_pnbuf = 0xc55c7000 "/mnt",
    cn_nameptr = 0xc55c7001 "mnt", cn_namelen = 0x3, cn_consume = 0x0}}
(kgdb) up
#11 0xc0698189 in vfs_donmount (td=0xc5341180, fsflags=0x0, fsoptions=0xe7701ba8) at ../../../kern/vfs_mount.c:529
529             error = vfs_domount(td, fstype, fspath, fsflags, optlist);
(kgdb) info loc
optlist = (struct vfsoptlist *) 0xc5544160
iov_errmsg = (struct iovec *) 0x0
fstype = 0xc4cb8bc0 "ufs"
fspath = 0xc4c3bc70 "/mnt"
error = 0x0
fstypelen = 0x4
fspathlen = 0x5
i = 0x0
(kgdb) p *optlist
$1 = {tqh_first = 0xc4e48300, tqh_last = 0xc54c3440}


magic   19540119 (UFS2) time    Mon Nov 14 19:29:40 2005
superblock location     65536   id      [ 4378d794 a42f9b8c ]
ncg     4       size    1000    blocks  799
bsize   8192    shift   13      mask    0xffffe000
fsize   1024    shift   10      mask    0xfffffc00
frag    8       shift   3       fsbtodb 1
minfree 8%      optim   time    symlinklen 120
maxbsize 8192   maxbpg  1024    maxcontig 16    contigsumsize 16
nbfree  97      ndir    2       nifree  249     nffree  17
bpg     32      fpg     256     ipg     64
nindir  1024    inopb   32      maxfilesize     8804691443711
sbsize  2048    cgsize  1024    csaddr  104     cssize  1024
sblkno  72      cblkno  80      iblkno  536871000       dblkno  104
cgrotor 0       fmod    0       ronly   0       clean   0
avgfpdir 64     avgfilesize 16384
flags   soft-updates
fsmnt   /mnt
volname         swuid   0

cs[].cs_(nbfree,ndir,nifree,nffree):
        (16,2,57,17) (28,0,64,0) (28,0,64,0) (25,0,64,0)
blocks in last group 29


cg 0:
magic   90255   tell    14000   time    Mon Nov 14 19:29:40 2005
cgx     0       ndblk   256     niblk   64      initiblk 64
nbfree  16      ndir    2       nifree  57      nffree  17
rotor   0       irotor  6       frotor  104
frsum   0       0       1       0       0       0       2
sum of frsum: 17
clusters 1-8:   0       0       0       0       0       0       0       0
clusters 9-15:  0       0       0       0       0       0       0
clusters size 16 and over: 1
clusters free:  16-31
inodes used:    0-6
blks free:      109-111, 113-119, 121-255

cg 1:
magic   90255   tell    54000   time    Mon Nov 14 19:29:40 2005
cgx     1       ndblk   256     niblk   64      initiblk 64
nbfree  28      ndir    0       nifree  64      nffree  0
rotor   0       irotor  0       frotor  0
frsum   0       0       0       0       0       0       0
sum of frsum: 0
clusters 1-8:   0       0       0       0       0       0       0       0
clusters 9-15:  1       0       0       0       0       0       0
clusters size 16 and over: 1
clusters free:  0-8, 13-31
inodes used:
blks free:      0-71, 104-255

cg 2:
magic   90255   tell    94000   time    Mon Nov 14 19:29:40 2005
cgx     2       ndblk   256     niblk   64      initiblk 64
nbfree  28      ndir    0       nifree  64      nffree  0
rotor   0       irotor  0       frotor  0
frsum   0       0       0       0       0       0       0
sum of frsum: 0
clusters 1-8:   0       0       0       0       0       0       0       0
clusters 9-15:  1       0       0       0       0       0       0
clusters size 16 and over: 1
clusters free:  0-8, 13-31
inodes used:
blks free:      0-71, 104-255

cg 3:
magic   90255   tell    d4000   time    Mon Nov 14 19:29:40 2005
cgx     3       ndblk   232     niblk   64      initiblk 64
nbfree  25      ndir    0       nifree  64      nffree  0
rotor   0       irotor  0       frotor  0
frsum   0       0       0       0       0       0       0
sum of frsum: 0
clusters 1-8:   0       0       0       0       0       0       0       0
clusters 9-15:  1       0       0       0       0       0       0
clusters size 16 and over: 1
clusters free:  0-8, 13-28
inodes used:
blks free:      0-71, 104-231

$ fsck -y /dev/md0c
** /dev/md0c
BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE

LOOK FOR ALTERNATE SUPERBLOCKS? yes

16 is not a file system superblock
SEARCH FOR ALTERNATE SUPER-BLOCK FAILED. YOU MUST USE THE
-b OPTION TO FSCK TO SPECIFY THE LOCATION OF AN ALTERNATE
SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8).