Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Jul 2000 14:31:17 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        hackers@FreeBSD.org
Subject:   Lovely FFS panic on 4.x-stable
Message-ID:  <200007092131.OAA00514@john.baldwin.cx>

next in thread | raw e-mail | index | archive | help
IdlePTD 3407872
initial pcb at 2c07e0
panicstr: ffs_clusteralloc: map mismatch
panic messages:
---
panic: ffs_clusteralloc: map mismatch
#0  boot (howto=256) at ../../kern/kern_shutdown.c:302
302                     dumppcb.pcb_cr3 = rcr3();
(kgdb) bt
#0  boot (howto=256) at ../../kern/kern_shutdown.c:302
#1  0xc01492d1 in panic (fmt=0xc02692c0 "ffs_clusteralloc: map mismatch")
    at ../../kern/kern_shutdown.c:552
#2  0xc01e0e05 in ffs_clusteralloc (ip=0xc0cc8600, cg=30, bpref=983048, len=4)
    at ../../ufs/ffs/ffs_alloc.c:1190
#3  0xc01e0143 in ffs_hashalloc (ip=0xc0cc8600, cg=30, pref=983048, size=4,
    allocator=0xc01e0be0 <ffs_clusteralloc>) at ../../ufs/ffs/ffs_alloc.c:768
#4  0xc01dfb07 in ffs_reallocblks (ap=0xc66e7de4)
    at ../../ufs/ffs/ffs_alloc.c:442
#5  0xc016f10e in cluster_write (bp=0xc1d1d318, filesize=32768, seqcount=4)
    at vnode_if.h:1056
#6  0xc01eb596 in ffs_write (ap=0xc66e7e90)
    at ../../ufs/ufs/ufs_readwrite.c:500
#7  0xc01798c8 in vn_write (fp=0xc0ca7e80, uio=0xc66e7edc, cred=0xc0c56a80,
    flags=0, p=0xc668c400) at vnode_if.h:363
#8  0xc015637a in dofilewrite (p=0xc668c400, fp=0xc0ca7e80, fd=3,
    buf=0xbfbef118, nbyte=43774, offset=-1, flags=0) at ../../sys/file.h:159
#9  0xc015627f in write (p=0xc668c400, uap=0xc66e7f80)
    at ../../kern/sys_generic.c:298
#10 0xc023e1d1 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
      tf_edi = -1078005480, tf_esi = 3, tf_ebp = 0, tf_isp = -965836844,
      tf_ebx = 43774, tf_edx = -1077938511, tf_ecx = 6, tf_eax = 4,
      tf_trapno = 12, tf_err = 2, tf_eip = 671993592, tf_cs = 31,
      tf_eflags = 659, tf_esp = -1078005516, tf_ss = 47})
    at ../../i386/i386/trap.c:1126
(kgdb) up 2
#2  0xc01e0e05 in ffs_clusteralloc (ip=0xc0cc8600, cg=30, bpref=983048, len=4)
    at ../../ufs/ffs/ffs_alloc.c:1190
1190                            panic("ffs_clusteralloc: map mismatch");
(kgdb) list
1185             * Allocate the cluster that we have found.
1186             */
1187            blksfree = cg_blksfree(cgp);
1188            for (i = 1; i <= len; i++)
1189                    if (!ffs_isblock(fs, blksfree, got - run + i))
1190                            panic("ffs_clusteralloc: map mismatch");
1191            bno = cg * fs->fs_fpg + blkstofrags(fs, got - run + 1);
1192            if (dtog(fs, bno) != cg)
1193                    panic("ffs_clusteralloc: allocated out of group");
1194            len = blkstofrags(fs, len);
(kgdb) p blksfree
$1 = (u_int8_t *) 0xc20314e0 "ÿ"
(kgdb) p *blksfree
$2 = 255 'ÿ'
(kgdb) p got
$3 = 2163
(kgdb) p run
$4 = 4
(kgdb) p fs
$5 = (struct fs *) 0xc0907800
(kgdb) p *fs
$6 = {fs_firstfield = 0, fs_unused_1 = 0, fs_sblkno = 16, fs_cblkno = 24,
  fs_iblkno = 32, fs_dblkno = 1016, fs_cgoffset = 2048, fs_cgmask = -1,
  fs_time = 963175776, fs_size = 1585344, fs_dsize = 1536327, fs_ncg = 49,
  fs_bsize = 8192, fs_fsize = 1024, fs_frag = 8, fs_minfree = 8,
  fs_rotdelay = 0, fs_rps = 60, fs_bmask = -8192, fs_fmask = -1024,
  fs_bshift = 13, fs_fshift = 10, fs_maxcontig = 15, fs_maxbpg = 2048,
  fs_fragshift = 3, fs_fsbtodb = 1, fs_sbsize = 2048, fs_csmask = -512,
  fs_csshift = 9, fs_nindir = 2048, fs_inopb = 64, fs_nspf = 2, fs_optim = 0,
  fs_npsect = 4096, fs_interleave = 1, fs_trackskew = 0, fs_id = {915932514,
    1106181948}, fs_csaddr = 1016, fs_cssize = 1024, fs_cgsize = 6144,
  fs_ntrak = 1, fs_nsect = 4096, fs_spc = 4096, fs_ncyl = 775, fs_cpg = 16,
  fs_ipg = 7872, fs_fpg = 32768, fs_cstotal = {cs_ndir = 3274,
    cs_nbfree = 68238, cs_nifree = 330794, cs_nffree = 29696},
  fs_fmod = 0 '\000', fs_clean = 0 '\000', fs_ronly = 0 '\000',
  fs_flags = 2 '\002', fs_fsmnt = "/v", '\000' <repeats 509 times>,
  fs_cgrotor = 27, fs_csp = {0xc0907000, 0x0 <repeats 30 times>},
  fs_maxcluster = 0xc0907400, fs_cpc = 0, fs_opostbl = {{0, 0, 0, 0, 0, 0, 0,
      0} <repeats 16 times>}, fs_sparecon = {0 <repeats 50 times>},
  fs_contigsumsize = 15, fs_maxsymlinklen = 60, fs_inodefmt = 2,
  fs_maxfilesize = 8796093022207, fs_qbmask = 8191, fs_qfmask = 1023,
  fs_state = 0, fs_postblformat = 1, fs_nrpos = 1, fs_postbloff = 0,
  fs_rotbloff = 0, fs_magic = 72020, fs_space = ""}
(kgdb) p cgp->cg_magic
$7 = 590421  (which == CG_MAGIC)
(kgdb) p cgp->cg_freeoff
$8 = 1248
(kgdb) p ((u_int8_t *)(cgp) + (cgp)->cg_freeoff)
$9 = (u_int8_t *) 0xc20314e0 "ÿ"
(kgdb) p *cgp
$12 = {cg_firstfield = 0, cg_magic = 590421, cg_time = 963175776, cg_cgx = 30,
  cg_ncyl = 16, cg_niblk = 7872, cg_ndblk = 32768, cg_cs = {cs_ndir = 35,
    cs_nbfree = 1739, cs_nifree = 6581, cs_nffree = 1523}, cg_rotor = 15920,
  cg_frotor = 15920, cg_irotor = 910, cg_frsum = {0, 29, 2, 2, 57, 95, 59,
    61}, cg_btotoff = 168, cg_boff = 232, cg_iusedoff = 264,
  cg_freeoff = 1248, cg_nextfreeoff = 5916, cg_clustersumoff = 5340,
  cg_clusteroff = 5404, cg_nclusterblks = 4096, cg_sparecon = {
    0 <repeats 13 times>}, cg_space = "\001"}

I'm using softupdates on all my filesystems except for /, but
the only filesystem with errors when I rebooted was /v, which
does run softupdates:

/dev/ad2s1e on /v (ufs, local, soft-updates, writes: sync 3 async 788, reads: sync 1768 async 110)

> uname -a
FreeBSD john.baldwin.cx 4.0-STABLE FreeBSD 4.0-STABLE #13: Sat Jun 17 00:58:47 PDT 2000    
john@john.baldwin.cx:/usr/source/src/sys/compile/JOHN  i386

Kernel and vmcore available if more info is needed.

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007092131.OAA00514>