Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Feb 2002 16:34:54 -0500 (EST)
From:      Mikhail Teterin <mi@aldan.algebra.com>
To:        current@FreeBSD.org
Subject:   panic: bdwrite: buffer is not busy
Message-ID:  <20020212021233.84A079F379@okeeffe.bestweb.net>

next in thread | raw e-mail | index | archive | help
While attempting to ``fdisk fd0.1440''. Or ``fdisk fd0''. Or
``newfs_msdos fd0.1440'' with or without the floppy inside :-\
With todays or Jan 3rd kernel (my previous upgrade).

IdlePTD at phsyical address 0x004ed000
initial pcb at physical address 0x00411560
panicstr: bdwrite: buffer is not busy
panic messages:
---
Fatal trap 12: page fault while in kernel mode
cpuid = 1; lapic.id = 00000000
fault virtual address   = 0x1c
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc022d923
stack pointer           = 0x10:0xce9c0b10
frame pointer           = 0x10:0xce9c0b24
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 405 (fdisk)
trap number             = 12
panic: page fault
cpuid = 1; lapic.id = 00000000
boot() called on cpu#1

syncing disks... panic: bdwrite: buffer is not busy
cpuid = 1; lapic.id = 00000000
boot() called on cpu#1
Uptime: 1m40s
pfs_vncache_unload(): 1 entries remaining

(kgdb) where
#0  dumpsys () at /ccd/src/sys/kern/kern_shutdown.c:504
#1  0xc021cee8 in boot (howto=260) at /ccd/src/sys/kern/kern_shutdown.c:336
#2  0xc021d3d9 in panic (fmt=0xc03728c1 "bdwrite: buffer is not busy")
    at /ccd/src/sys/kern/kern_shutdown.c:646
#3  0xc0253583 in bdwrite (bp=0xc7cb7af4) at /ccd/src/sys/kern/vfs_bio.c:856
#4  0xc02d28ee in ffs_update (vp=0xce8657a0, waitfor=0)
    at /ccd/src/sys/ufs/ffs/ffs_inode.c:120
#5  0xc02dff6e in ffs_fsync (ap=0xce9c09cc)
    at /ccd/src/sys/ufs/ffs/ffs_vnops.c:292
#6  0xc02de386 in ffs_sync (mp=0xc16cbe00, waitfor=2, cred=0xc1026b00, 
    td=0xc03cf2c0) at vnode_if.h:441
#7  0xc026034a in sync (td=0xc03cf2c0, uap=0x0)
    at /ccd/src/sys/kern/vfs_syscalls.c:669
#8  0xc021cb14 in boot (howto=256) at /ccd/src/sys/kern/kern_shutdown.c:245
#9  0xc021d3d9 in panic (fmt=0xc03914de "%s")
    at /ccd/src/sys/kern/kern_shutdown.c:646
#10 0xc03299e2 in trap_fatal (frame=0xce9c0ad0, eva=28)
    at /ccd/src/sys/i386/i386/trap.c:842
#11 0xc0329709 in trap_pfault (frame=0xce9c0ad0, usermode=0, eva=28)
    at /ccd/src/sys/i386/i386/trap.c:756
#12 0xc0329147 in trap (frame={tf_fs = 24, tf_es = -828637168, 
      tf_ds = -1071513584, tf_edi = -1049875456, tf_esi = 0, 
      tf_ebp = -828634332, tf_isp = -828634372, tf_ebx = -942596204, 
(kgdb) where
#0  dumpsys () at /ccd/src/sys/kern/kern_shutdown.c:504
#1  0xc021cee8 in boot (howto=260) at /ccd/src/sys/kern/kern_shutdown.c:336
#2  0xc021d3d9 in panic (fmt=0xc03728c1 "bdwrite: buffer is not busy")
    at /ccd/src/sys/kern/kern_shutdown.c:646
#3  0xc0253583 in bdwrite (bp=0xc7cb7af4) at /ccd/src/sys/kern/vfs_bio.c:856
#4  0xc02d28ee in ffs_update (vp=0xce8657a0, waitfor=0)
    at /ccd/src/sys/ufs/ffs/ffs_inode.c:120
#5  0xc02dff6e in ffs_fsync (ap=0xce9c09cc)
    at /ccd/src/sys/ufs/ffs/ffs_vnops.c:292
#6  0xc02de386 in ffs_sync (mp=0xc16cbe00, waitfor=2, cred=0xc1026b00, 
    td=0xc03cf2c0) at vnode_if.h:441
#7  0xc026034a in sync (td=0xc03cf2c0, uap=0x0)
    at /ccd/src/sys/kern/vfs_syscalls.c:669
#8  0xc021cb14 in boot (howto=256) at /ccd/src/sys/kern/kern_shutdown.c:245
#9  0xc021d3d9 in panic (fmt=0xc03914de "%s")
    at /ccd/src/sys/kern/kern_shutdown.c:646
#10 0xc03299e2 in trap_fatal (frame=0xce9c0ad0, eva=28)
    at /ccd/src/sys/i386/i386/trap.c:842
#11 0xc0329709 in trap_pfault (frame=0xce9c0ad0, usermode=0, eva=28)
    at /ccd/src/sys/i386/i386/trap.c:756
#12 0xc0329147 in trap (frame={tf_fs = 24, tf_es = -828637168, 
      tf_ds = -1071513584, tf_edi = -1049875456, tf_esi = 0, 
      tf_ebp = -828634332, tf_isp = -828634372, tf_ebx = -942596204, 
      tf_esp = -942596204, tf_ss = -1049268480})
    at /ccd/src/sys/i386/i386/trap.c:426
#13 0xc022d923 in readdisklabel (dev=0xc1756f00, lp=0xc16c2c00)
    at /ccd/src/sys/kern/subr_disklabel.c:220
#14 0xc0338c61 in fdioctl (dev=0xc1756e00, cmd=1091855461, addr=0xc16bb200 "", 
    flag=1, td=0xce8daf04) at /ccd/src/sys/isa/fd.c:2707
#15 0xc01f4d1c in spec_ioctl (ap=0xce9c0ba4)
    at /ccd/src/sys/fs/specfs/spec_vnops.c:320
#16 0xc01f499d in spec_vnoperate (ap=0xce9c0ba4)
    at /ccd/src/sys/fs/specfs/spec_vnops.c:119
#17 0xc0266fb3 in vn_ioctl (fp=0xc1854bc0, com=1091855461, data=0xc16bb200 "", 
    td=0xce8daf04) at vnode_if.h:357
#18 0xc0237eeb in ioctl (td=0xce8daf04, uap=0xce9c0d20)
    at /ccd/src/sys/sys/file.h:200
#19 0xc0329e98 in syscall (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, 
      tf_edi = -1077936865, tf_esi = -1077937104, tf_ebp = -1077937112, 
      tf_isp = -828633740, tf_ebx = -1077937100, tf_edx = -1077936866, 
      tf_ecx = 134627389, tf_eax = 54, tf_trapno = 12, tf_err = 2, 
      tf_eip = 134546567, tf_cs = 31, tf_eflags = 659, tf_esp = -1077937504, 
      tf_ss = 47}) at /ccd/src/sys/i386/i386/trap.c:1034
#20 0xc031945d in syscall_with_err_pushed ()
(kgdb) up 3
#3  0xc0253583 in bdwrite (bp=0xc7cb7af4) at /ccd/src/sys/kern/vfs_bio.c:856
856                     panic("bdwrite: buffer is not busy");
(kgdb) l
851     bdwrite(struct buf * bp)
852     {
853             GIANT_REQUIRED;
854
855             if (BUF_REFCNT(bp) == 0)
856                     panic("bdwrite: buffer is not busy");
857
858             if (bp->b_flags & B_INVAL) {
859                     brelse(bp);
860                     return;
(kgdb) p *bp
$1 = {b_io = {bio_cmd = 2, bio_dev = 0xc1705600, bio_blkno = 65616, 
    bio_offset = 33595392, bio_bcount = 8192, 
    bio_data = 0xc7fd7000 "´\201\001", bio_flags = 4, _bio_buf = 0x0, 
    bio_error = 0, bio_resid = 0, bio_done = 0xc02559f4 <bufdonebio>, 
    bio_driver1 = 0x0, bio_driver2 = 0x0, bio_caller1 = 0x0, 
    bio_caller2 = 0xc7cb7af4, bio_queue = {tqe_next = 0x0, 
      tqe_prev = 0xc16b7000}, bio_pblkno = 1114192, bio_done_chain = 0x0}, 
  b_op = 0xc03d78ac, b_magic = 280038160, b_iodone = 0, b_offset = 33595392, 
  b_hash = {le_next = 0xc7cb7544, le_prev = 0xc7cc43d4}, b_vnbufs = {
    tqe_next = 0xc7cb5a40, tqe_prev = 0xc7cec964}, b_freelist = {
    tqe_next = 0xc7cb6cbc, tqe_prev = 0xc7cb5ab4}, b_act = {tqe_next = 0x0, 
    tqe_prev = 0x0}, b_flags = 537006112, b_qindex = 0, b_xflags = 2 '\002', 
  b_lock = {lk_interlock = 0xc041017c, lk_flags = 0, lk_sharecount = 0, 
    lk_waitcount = 0, lk_exclusivecount = 0, lk_prio = 80, 
    lk_wmesg = 0xc03727b3 "bufwait", lk_timo = 0, lk_lockholder = -1}, 
  b_bufsize = 8192, b_runningbufspace = 0, b_kvabase = 0xc7fd7000 "´\201\001", 
  b_kvasize = 16384, b_lblkno = 65616, b_vp = 0xcdc1a9e0, b_dirtyoff = 0, 
  b_dirtyend = 0, b_rcred = 0x0, b_wcred = 0x0, b_saveaddr = 0x0, b_pager = {
    pg_spc = 0x0, pg_reqpage = 0}, b_cluster = {cluster_head = {
      tqh_first = 0x0, tqh_last = 0x0}, cluster_entry = {tqe_next = 0x0, 
      tqe_prev = 0x0}}, b_pages = {0xc0940978, 0xc0d9c3b4, 
    0x0 <repeats 30 times>}, b_npages = 2, b_dep = {lh_first = 0x0}}
(kgdb) up
#4  0xc02d28ee in ffs_update (vp=0xce8657a0, waitfor=0)
    at /ccd/src/sys/ufs/ffs/ffs_inode.c:120
120                     bdwrite(bp);
(kgdb) l
115             } else if (vm_page_count_severe() || buf_dirty_count_severe()) {
116                     return (bwrite(bp));
117             } else {
118                     if (bp->b_bufsize == fs->fs_bsize)
119                             bp->b_flags |= B_CLUSTEROK;
120                     bdwrite(bp);
121                     return (0);
122             }
123     }

Hope, this helps... The kernels and the vmcore available upon request.

	-mi


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

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?20020212021233.84A079F379>