Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 2003 12:21:20 +0100
From:      Thomas Quinot <thomas@FreeBSD.ORG>
To:        Jeff Roberson <jroberson@chesapeake.net>
Cc:        Thomas Quinot <thomas@FreeBSD.ORG>, current@FreeBSD.ORG
Subject:   Re: crash: bwrite: need chained iodone
Message-ID:  <20030317112120.GA71587@melusine.cuivre.fr.eu.org>
In-Reply-To: <20030312155436.S43514-100000@mail.chesapeake.net>
References:  <20030312105258.GG51967@melusine.cuivre.fr.eu.org> <20030312155436.S43514-100000@mail.chesapeake.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Le 2003-03-12, Jeff Roberson écrivait :

> > > Can you please print bp?  I'd like to know what all of the members are.  A
> > > cluster buf should NEVER have BX_BKGRDWRITE set.  This is totally bogus.

Got that crash again, with sync-on-panic disabled. The interesting thing
is that the stack trace might be corrupted or inaccurate (maybe some tail
recursion optimisation or inlining is going on around): although it seems
to indicate that the panic is the one from "bwrite: need chained iodone"
(which is absurd, as we saw, since bp->bp_xflags == 0), the panic
message is "buffer is not busy???" from bwrite, and indeed we can see
that this is the case (see print of bp->b_lock).

Thomas.

Script started on Mon Mar 17 12:06:57 2003
This is ZSH 4.0.6 on a  xterm-color
(root@malevil) /var/crash # gdb -k /usr/obj/usr/src/sys/MALEVIL/kernel.debug vmcore.7
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or 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.
This GDB was configured as "i386-undermydesk-freebsd"...
panic: bwrite: buffer is not busy???
panic messages:
---
panic: bwrite: buffer is not busy???
Uptime: 3d17h25m5s
Dumping 511 MB
ata0: resetting devices ..
done
 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 256 272 288 304 320 336 352 368 384 400 416 432 448 464 480 496
---
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:239
239		dumping++;
(kgdb) bt
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:239
#1  0xc01f4698 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:371
#2  0xc01f4903 in panic () at /usr/src/sys/kern/kern_shutdown.c:542
#3  0xc0232072 in bwrite (bp=0xce531228) at /usr/src/sys/kern/vfs_bio.c:795
#4  0xc0232a7c in bawrite (bp=0x0) at /usr/src/sys/kern/vfs_bio.c:1138
#5  0xc023a02b in cluster_wbuild (vp=0xc5ff8db0, size=16384, start_lbn=21, 
    len=4) at /usr/src/sys/kern/vfs_cluster.c:996
#6  0xc02396ff in cluster_write (bp=0xce6237a8, filesize=378368, seqcount=4)
    at /usr/src/sys/kern/vfs_cluster.c:596
#7  0xc02e3fec in ffs_write (ap=0xe5d49be0)
    at /usr/src/sys/ufs/ffs/ffs_vnops.c:728
#8  0xc024e1b2 in vn_write (fp=0xc5f56618, uio=0xe5d49c7c, 
    active_cred=0xc5f91480, flags=0, td=0xc4170a50) at vnode_if.h:417
#9  0xc0214008 in dofilewrite (td=0xc4170a50, fp=0xc5f56618, fd=0, 
    buf=0x8c1a400, nbyte=0, offset=0, flags=0) at file.h:239
#10 0xc0213e49 in write (td=0xc4170a50, uap=0xe5d49d10)
    at /usr/src/sys/kern/sys_generic.c:329
#11 0xc033a68e in syscall (frame=
      {tf_fs = 47, tf_es = 148963375, tf_ds = -1078001617, tf_edi = 677204256, tf_esi = 0, tf_ebp = -1077939928, tf_isp = -439050892, tf_ebx = 677216484, tf_edx = 20, tf_ecx = 0, tf_eax = 4, tf_trapno = 0, tf_err = 2, tf_eip = 677548851, tf_cs = 31, tf_eflags = 518, tf_esp = -1077939988, tf_ss = 47})
    at /usr/src/sys/i386/i386/trap.c:1030
#12 0xc032a89d in Xint0x80_syscall () at {standard input}:138
---Can't read userspace from dump, or kernel process---

(kgdb) fr 3
#3  0xc0232072 in bwrite (bp=0xce531228) at /usr/src/sys/kern/vfs_bio.c:795
795				panic("bwrite: need chained iodone");
(kgdb) list
790		    (bp->b_flags & B_ASYNC) &&
791		    !vm_page_count_severe() &&
792		    !buf_dirty_count_severe()) {
793			if (bp->b_iodone != NULL) {
794				printf("bp->b_iodone = %p\n", bp->b_iodone);
795				panic("bwrite: need chained iodone");
796			}
797	
798			/* get a new block */
799			newbp = geteblk(bp->b_bufsize);
(kgdb) print *bp
$1 = {b_io = {bio_cmd = 1, bio_dev = 0xffffffff, bio_disk = 0x0, 
    bio_blkno = 18520608, bio_offset = 926699520, bio_bcount = 32768, 
    bio_data = 0xd42ba000 "", bio_flags = 0, bio_error = 0, bio_resid = 0, 
    bio_done = 0xc0235db0 <bufdonebio>, bio_driver1 = 0x0, bio_driver2 = 0x0, 
    bio_caller1 = 0x0, bio_caller2 = 0xce531228, bio_queue = {tqe_next = 0x0, 
      tqe_prev = 0x0}, bio_attribute = 0x0, bio_from = 0x0, bio_to = 0x0, 
    bio_length = 0, bio_completed = 0, bio_children = 259, bio_inbed = 0, 
    bio_parent = 0x0, bio_t0 = {sec = 0, frac = 0}, bio_task = 0, 
    bio_task_arg = 0x0, bio_pblkno = 0}, b_op = 0xc03a89f8, 
  b_magic = 280038160, b_iodone = 0xc0239320 <cluster_callback>, 
  b_offset = 311296, b_vnbufs = {tqe_next = 0x0, tqe_prev = 0x0}, 
  b_left = 0x0, b_right = 0x0, b_vflags = 0, b_freelist = {
    tqe_next = 0xce531fe8, tqe_prev = 0xc03dcb3c}, b_qindex = 0, 
  b_flags = 1677721604, b_xflags = 0 '\0', b_lock = {
    lk_interlock = 0xc03d74d8, lk_flags = 0, lk_sharecount = 0, 
    lk_waitcount = 0, lk_exclusivecount = 0, lk_prio = 80, 
    lk_wmesg = 0xc0379b53 "bufwait", lk_timo = 0, lk_lockholder = 0xffffffff, 
    lk_newlock = 0x0}, b_bufsize = 32768, b_runningbufspace = 0, 
  b_kvabase = 0xd42ba000 "", b_kvasize = 32768, b_lblkno = 19, 
  b_vp = 0xc5ff8db0, b_object = 0x0, b_dirtyoff = 0, b_dirtyend = 32768, 
  b_rcred = 0x0, b_wcred = 0x0, b_saveaddr = 0x0, b_pager = {pg_spc = 0x0, 
    pg_reqpage = 0}, b_cluster = {cluster_head = {tqh_first = 0xce5ab460, 
      tqh_last = 0xce691fb0}, cluster_entry = {tqe_next = 0xce5ab460, 
      tqe_prev = 0xce691fb0}}, b_pages = {0xc0c27ec8, 0xc10d9710, 0xc0909c58, 
    0xc092a6a0, 0xc08f2be8, 0xc0e25130, 0xc0f46378, 0xc0ab55c0, 0xc0a19f38, 
    0xc0b84380, 0xc0d6a3c8, 0xc0ef7f10, 0xc09e7f58, 0xc10d58a0, 0xc0a3aae8, 
    0xc08de830, 0xc0a26a48, 0xc0a0c390, 0xc0a1b6d8, 0xc0bb6a20, 0xc0b0cc68, 
    0xc0a1d2b0, 0xc0a6b5f8, 0xc0de1e40, 0xc0965488, 0xc09d2fd0, 0xc0999a18, 
    0xc09eb360, 0xc0dd3ea8, 0xc0a3a8f0, 0xc0bbac38, 0xc097eb80}, b_npages = 8, 
  b_dep = {lh_first = 0x0}}
(kgdb) print bp->b_lock
$2 = {lk_interlock = 0xc03d74d8, lk_flags = 0, lk_sharecount = 0, 
  lk_waitcount = 0, lk_exclusivecount = 0, lk_prio = 80, 
  lk_wmesg = 0xc0379b53 "bufwait", lk_timo = 0, lk_lockholder =
0xffffffff, 
  lk_newlock = 0x0}

-- 
    Thomas.Quinot@Cuivre.FR.EU.ORG

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




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