Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Feb 1997 17:37:55 +0200 (EET)
From:      Heikki Suonsivu <hsu@clinet.fi>
To:        freebsd-bugs@freebsd.org
Subject:   More on bad dir panics
Message-ID:  <199702251537.RAA11533@news.clinet.fi>

next in thread | raw e-mail | index | archive | help

I have been trying to look around the crash dumps, as they are plentiful
these days (twice a day seems to be the current rate).  These always happen
at the same point and all crashes are similar, crash occurs on directory
lookup stombling over a block which contains something else than directory
data.

I can arrange access to crash dumps and kernels (with symbols).

Current directory is /var/crash/
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (i386-unknown-freebsd), 
Copyright 1996 Free Software Foundation, Inc...
IdlePTD 272000
current pcb at 211de8
panic: bad dir
#0  boot (howto=256) at ../../kern/kern_shutdown.c:243
(kgdb) up
#1  0xf01124d2 in panic (fmt=0xf01b3881 "bad dir")
    at ../../kern/kern_shutdown.c:367
(kgdb) up
#2  0xf01b38c3 in ufs_dirbad (ip=0xf4b6cc00, offset=26739, 
    how=0xf01b2c20 "mangled entry") at ../../ufs/ufs/ufs_lookup.c:589
(kgdb) print ip
$1 = (struct inode *) 0x0
(kgdb) print mp
$2 = (struct mount *) 0xf48d2c00
(kgdb) print *mp
$3 = {mnt_list = {cqe_next = 0xf48d2200, cqe_prev = 0xf48d0600}, 
  mnt_op = 0xf020a5f0, mnt_vfc = 0xf020a61c, mnt_vnodecovered = 0xf48c7780, 
  mnt_vnodelist = {lh_first = 0xf4e58c00}, mnt_flag = 268439552, 
  mnt_maxsymlinklen = 60, mnt_stat = {f_spare2 = 0, f_bsize = 1024, 
    f_iosize = 8192, f_blocks = 2818526, f_bfree = 1370037, 
    f_bavail = 1144555, f_files = 683518, f_ffree = 642806, f_fsid = {val = {
        1124, 1}}, f_owner = 0, f_type = 1, f_flags = 268439552, f_spare = {0, 
      0, 0, 0, 0, 0}, 
    f_mntonname = "/m/news/overview", '\000' <repeats 73 times>, 
    f_mntfromname = "/dev/sd12e", '\000' <repeats 79 times>}, 
  mnt_data = 0xf48d2a00, mnt_time = 0}
(kgdb) up
#3  0xf01b3121 in ufs_lookup (ap=0xefbffe50) at ../../ufs/ufs/ufs_lookup.c:284
(kgdb) print ep->d_reclen
$4 = 24842
(kgdb) print entryoffsetinblock
$5 = 26739
(kgdb) print *ep
$6 = {d_ino = 2032152628, d_reclen = 24842, d_type = 108 'l', 
  d_namlen = 116 't', 
  d_name = ".fan.peter.hammill 0000000243 0000000238 y\nalt.job.gooley 0000000494 0000000491 y\nalt.hurricane.andrew 0000000213 0000000214 y\nalt.irc.corruption 0000000107 0000000097 y\nsci.med.nutrition 0000061174 0"...}
(kgdb) set radix 16
Input and output radices now set to decimal 16, hex 10, octal 20.
(kgdb) print entryoffsetinblock
$7 = 0x6873
(kgdb) print bp
$8 = (struct buf *) 0xf685f9e0
(kgdb) print *bp
$9 = {b_hash = {le_next = 0xf68500a8, le_prev = 0xf0222144}, b_vnbufs = {
    le_next = 0x0, le_prev = 0xf4e58c30}, b_freelist = {tqe_next = 0x0, 
    tqe_prev = 0xf68a9348}, b_act = {tqe_next = 0x0, tqe_prev = 0xf48482d4}, 
  b_proc = 0x0, b_flags = 0x100230, b_qindex = 0x0, b_usecount = 0x5, 
  b_error = 0x0, b_bufsize = 0x2000, b_bcount = 0x2000, b_resid = 0x0, 
  b_dev = 0x464, b_un = {
    b_addr = 0xf6906000 "fetish.fashion:28695 alt.sex.fetish.feet:54468 alt.sex.fetish.feet.toes.opps:6273 alt.sex.fetish.giants:9450 alt.sex.fetish.hair:31370 alt.sex.fetish.hermunen:4146 alt.sex.fetish.jello:8782 alt.sex.fe"...}, 
  b_kvabase = 0xf6906000 "fetish.fashion:28695 alt.sex.fetish.feet:54468 alt.sex.fetish.feet.toes.opps:6273 alt.sex.fetish.giants:9450 alt.sex.fetish.hair:31370 alt.sex.fetish.hermunen:4146 alt.sex.fetish.jello:8782 alt.sex.fe"..., 
  b_kvasize = 0x2000, b_saveaddr = 0x0, b_lblkno = 0x0, b_blkno = 0xf122e, 
  b_iodone = 0, b_iodone_chain = 0x0, b_vp = 0xf4e58c00, b_dirtyoff = 0x0, 
  b_dirtyend = 0x0, b_rcred = 0x0, b_wcred = 0x0, b_validoff = 0x0, 
  b_validend = 0x0, b_pblkno = 0x16422e, b_savekva = 0x0, b_driver1 = 0x0, 
  b_driver2 = 0x0, b_spc = 0x0, b_cluster = {cluster_head = {
      tqh_first = 0xf68787c4, tqh_last = 0xf6844e78}, cluster_entry = {
      tqe_next = 0xf68787c4, tqe_prev = 0xf6844e78}}, b_pages = {0xf03b3d84, 
    0xf02ff7b8, 0x0 <repeats 14 times>}, b_npages = 0xf6908}
(kgdb) up
#4  0xf01306c9 in lookup (ndp=0xefbfff0c) at vnode_if.h:31
(kgdb) down
#3  0xf01b3121 in ufs_lookup (ap=0xefbffe50) at ../../ufs/ufs/ufs_lookup.c:284
(kgdb) print ep
$10 = (struct direct *) 0xf690c873
(kgdb) print *ep
$11 = {d_ino = 0x79203034, d_reclen = 0x610a, d_type = 0x6c, d_namlen = 0x74, 
  d_name = ".fan.peter.hammill 0000000243 0000000238 y\nalt.job.gooley 0000000494 0000000491 y\nalt.hurricane.andrew 0000000213 0000000214 y\nalt.irc.corruption 0000000107 0000000097 y\nsci.med.nutrition 0000061174 0"...}
(kgdb) print (struct direct *)((char *)bp->b_data)
There is no member named b_data.
(kgdb) print (struct direct *)((char *)bp->b_data)
There is no member named b_data.
(kgdb) print bp
$12 = (struct buf *) 0xf685f9e0
(kgdb) print *bp
$13 = {b_hash = {le_next = 0xf68500a8, le_prev = 0xf0222144}, b_vnbufs = {
    le_next = 0x0, le_prev = 0xf4e58c30}, b_freelist = {tqe_next = 0x0, 
    tqe_prev = 0xf68a9348}, b_act = {tqe_next = 0x0, tqe_prev = 0xf48482d4}, 
  b_proc = 0x0, b_flags = 0x100230, b_qindex = 0x0, b_usecount = 0x5, 
  b_error = 0x0, b_bufsize = 0x2000, b_bcount = 0x2000, b_resid = 0x0, 
  b_dev = 0x464, b_un = {
    b_addr = 0xf6906000 "fetish.fashion:28695 alt.sex.fetish.feet:54468 alt.sex.fetish.feet.toes.opps:6273 alt.sex.fetish.giants:9450 alt.sex.fetish.hair:31370 alt.sex.fetish.hermunen:4146 alt.sex.fetish.jello:8782 alt.sex.fe"...}, 
  b_kvabase = 0xf6906000 "fetish.fashion:28695 alt.sex.fetish.feet:54468 alt.sex.fetish.feet.toes.opps:6273 alt.sex.fetish.giants:9450 alt.sex.fetish.hair:31370 alt.sex.fetish.hermunen:4146 alt.sex.fetish.jello:8782 alt.sex.fe"..., 
  b_kvasize = 0x2000, b_saveaddr = 0x0, b_lblkno = 0x0, b_blkno = 0xf122e, 
  b_iodone = 0, b_iodone_chain = 0x0, b_vp = 0xf4e58c00, b_dirtyoff = 0x0, 
  b_dirtyend = 0x0, b_rcred = 0x0, b_wcred = 0x0, b_validoff = 0x0, 
  b_validend = 0x0, b_pblkno = 0x16422e, b_savekva = 0x0, b_driver1 = 0x0, 
  b_driver2 = 0x0, b_spc = 0x0, b_cluster = {cluster_head = {
      tqh_first = 0xf68787c4, tqh_last = 0xf6844e78}, cluster_entry = {
      tqe_next = 0xf68787c4, tqe_prev = 0xf6844e78}}, b_pages = {0xf03b3d84, 
    0xf02ff7b8, 0x0 <repeats 14 times>}, b_npages = 0xf6908}
(kgdb) print bp->b_addr
There is no member named b_addr.
(kgdb) print bp
$14 = (struct buf *) 0xf685f9e0
(kgdb) print *(struct direct *)  ((char *) bp->b_un.b_addr)
$15 = (struct direct *) 0xf6906000
(kgdb) print *(struct direct *)  ((char *) bp->b_un.b_addr)
$16 = {d_ino = 0x69746566, d_reclen = 0x6873, d_type = 0x2e, d_namlen = 0x66, 
  d_name = "ashion:28695 alt.sex.fetish.feet:54468 alt.sex.fetish.feet.toes.opps:6273 alt.sex.fetish.giants:9450 alt.sex.fetish.hair:31370 alt.sex.fetish.hermunen:4146 alt.sex.fetish.jello:8782 alt.sex.fetish.kit"...}
(kgdb) print dp
$17 = (struct inode *) 0xf4b6cc00
(kgdb) print dp->i_offset
$18 = 0x6873
(kgdb) print *dp
$19 = {i_next = 0xf4ce4100, i_prev = 0xf4884b30, i_vnode = 0xf4e58c00, 
  i_devvp = 0xf48b6b00, i_flag = 0x8, i_dev = 0x464, i_number = 0x1c268, 
  inode_u = {fs = 0xf48d4000, lfs = 0xf48d4000, e2fs = 0xf48d4000}, i_dquot = {
    0x0, 0x0}, i_modrev = 0x3310db2a3ffc4f60, i_lockf = 0x0, 
  i_lockholder = 0xdcd, i_lockwaiter = 0x0, i_count = 0x0, i_endoff = 0x0, 
  i_diroff = 0x0, i_offset = 0x6873, i_ino = 0x0, i_reclen = 0x0, 
  i_lockcount = 0x1, i_spare = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
    0x0}, i_din = {di_mode = 0x41ed, di_nlink = 0x3, di_u = {oldids = {0x0, 
        0x0}, inumber = 0x0}, di_size = 0x7370, di_atime = {
      tv_sec = 0x32e031d5, tv_nsec = 0x0}, di_mtime = {tv_sec = 0x330fc238, 
      tv_nsec = 0x0}, di_ctime = {tv_sec = 0x330fc238, tv_nsec = 0x0}, 
    di_db = {0x78917, 0x0 <repeats 11 times>}, di_ib = {0x0, 0x0, 0x0}, 
    di_flags = 0x0, di_blocks = 0x2, di_gen = 0x32fab649, di_uid = 0x8, 
    di_gid = 0x6, di_spare = {0x0, 0x0}}}
(kgdb)

-- 
Heikki Suonsivu, T{ysikuu 10 C 83/02210 Espoo/FINLAND, hsu@clinet.fi
mobile +358-40-5519679 work +358-9-43542270 fax -4555276



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