Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Oct 2001 21:28:08 -0500
From:      Doug Swarin <doug@staff.texas.net>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        hackers@FreeBSD.ORG, tmoestl@gmx.net, bp@FreeBSD.ORG
Subject:   Re: more on Re: Please review: bugfix for vinvalbuf()
Message-ID:  <20011019212807.A538@staff.texas.net>
In-Reply-To: <200109281747.f8SHlUP29063@earth.backplane.com>; from dillon@earth.backplane.com on Fri, Sep 28, 2001 at 10:47:30AM -0700
References:  <20010711003926.B8799@crow.dom2ip.de> <200107110643.f6B6hTB24707@earth.backplane.com> <20010926204333.A15865@staff.texas.net> <200109281747.f8SHlUP29063@earth.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Unfortunately, the recent patch to vinvalbuf() hasn't solved all of
our problems. We had another, different panic today. The process that
caused it was a 'tail' of a growing logfile over NFS.

I have actually had this problem before, with FreeBSD 3.4, and reported
it then. I believed this PR to be relevant at the time, however, I do
not believe this client was writing to the file.

   [1998/06/23] kern/7028  http://www.freebsd.org/cgi/query-pr.cgi?pr=7028
   panic in vinvalbuf when appending/looking at tail of NFS file

The system is running 4.4-RELEASE with the vinvalbuf() patch. Debugging
information is below. If I can provide any  additional information,
let me know.

Thanks for any help,
Doug

-- panic message --

SMP 2 cpus
IdlePTD 3555328
initial pcb at 2cf300
panicstr: vinvalbuf: flush failed
panic messages:
---
panic: vinvalbuf: flush failed
mp_lock = 01000001; cpuid = 1; lapic.id = 00000000
boot() called on cpu#1

syncing disks... 8
done
Uptime: 19d20h13m23s

-- gdb session --

(kgdb) back
#0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:473
#1  0xc016cf8f in boot (howto=0x100) at /usr/src/sys/kern/kern_shutdown.c:313
#2  0xc016d3a9 in panic (fmt=0xc028745a "vinvalbuf: flush failed")
    at /usr/src/sys/kern/kern_shutdown.c:581
#3  0xc019a719 in vinvalbuf (vp=0xd7dde8c0, flags=0x1, cred=0xc2c60780, 
    p=0xd79a0680, slpflag=0x100, slptimeo=0x0)
    at /usr/src/sys/kern/vfs_subr.c:753
#4  0xc01d0b30 in nfs_vinvalbuf (vp=0xd7dde8c0, flags=0x1, cred=0xc2c60780, 
    p=0xd79a0680, intrflg=0x1) at /usr/src/sys/nfs/nfs_bio.c:1190
#5  0xc01cf668 in nfs_bioread (vp=0xd7dde8c0, uio=0xd7a42ed4, 
    ioflag=0x7f0000, cred=0xc2c60780) at /usr/src/sys/nfs/nfs_bio.c:401
#6  0xc01f68d2 in nfs_read (ap=0xd7a42e64)
    at /usr/src/sys/nfs/nfs_vnops.c:1008
#7  0xc01a235c in vn_read (fp=0xc254cd40, uio=0xd7a42ed4, cred=0xc2c60780, 
    flags=0x0, p=0xd79a0680) at vnode_if.h:334
#8  0xc017b690 in dofileread (p=0xd79a0680, fp=0xc254cd40, fd=0x3, 
    buf=0x804d000, nbyte=0x200, offset=0xffffffffffffffff, flags=0x0)
    at /usr/src/sys/sys/file.h:146
#9  0xc017b556 in read (p=0xd79a0680, uap=0xd7a42f80)
    at /usr/src/sys/kern/sys_generic.c:117
#10 0xc025d7b5 in syscall2 (frame={tf_fs = 0x2f, tf_es = 0x2f, 
      tf_ds = 0xbfbf002f, tf_edi = 0x4, tf_esi = 0x280fc3a0, 
      tf_ebp = 0xbfbff8c0, tf_isp = 0xd7a42fd4, tf_ebx = 0x280ea424, 
      tf_edx = 0x37, tf_ecx = 0x37, tf_eax = 0x3, tf_trapno = 0x7, 
      tf_err = 0x2, tf_eip = 0x280defcc, tf_cs = 0x1f, tf_eflags = 0x293, 
      tf_esp = 0xbfbff894, tf_ss = 0x2f})
    at /usr/src/sys/i386/i386/trap.c:1155
#11 0xc024a62b in Xint0x80_syscall ()
cannot read proc at 0

(kgdb) up
#1  0xc016cf8f in boot (howto=0x100) at /usr/src/sys/kern/kern_shutdown.c:313
313                     dumpsys();

(kgdb) up
#2  0xc016d3a9 in panic (fmt=0xc028745a "vinvalbuf: flush failed")
    at /usr/src/sys/kern/kern_shutdown.c:581
581             boot(bootopt);

(kgdb) up
#3  0xc019a719 in vinvalbuf (vp=0xd7dde8c0, flags=0x1, cred=0xc2c60780, 
    p=0xd79a0680, slpflag=0x100, slptimeo=0x0)
    at /usr/src/sys/kern/vfs_subr.c:753
753                     panic("vinvalbuf: flush failed");

(kgdb) print vp->v_dirtyblkhd
$1 = {tqh_first = 0x0, tqh_last = 0xd7dde8f4}

(kgdb) print vp->v_cleanblkhd
$2 = {tqh_first = 0xcc5fa5ec, tqh_last = 0xcc5fa5f4}

(kgdb) print *(vp->v_cleanblkhd->tqh_first)
$3 = {b_hash = {le_next = 0xcc607e80, le_prev = 0xcc666e9c}, b_vnbufs = {
    tqe_next = 0x0, tqe_prev = 0xd7dde8ec}, b_freelist = {
    tqe_next = 0xcc5f8bfc, tqe_prev = 0xcc6060bc}, b_act = {tqe_next = 0x0,
    tqe_prev = 0xc2001d90}, b_flags = 537919520, b_qindex = 2,
  b_xflags = 2 '\002', b_lock = {lk_interlock = {lock_data = 0},
    lk_flags = 0, lk_sharecount = 0, lk_waitcount = 0,
    lk_exclusivecount = 0, lk_prio = 20, lk_wmesg = 0xc02860b0 "bufwait",
    lk_timo = 0, lk_lockholder = -1}, b_error = 0, b_bufsize = 3584,
  b_runningbufspace = 0, b_bcount = 3147, b_resid = 0, b_dev = 0xffffffff,
  b_data = 0xceeec000 ...,
  b_kvabase = 0xceeec000 ...,
  b_kvasize = 16384, b_lblkno = 6949, b_blkno = 111184, b_offset = 56926208,
  b_iodone = 0, b_iodone_chain = 0x0, b_vp = 0xd7dde8c0, b_dirtyoff = 0,
  b_dirtyend = 0, b_rcred = 0x0, b_wcred = 0x0, b_pblkno = 1771566,
  b_saveaddr = 0x0, b_driver1 = 0x0, b_driver2 = 0x0, b_caller1 = 0x0,
  b_caller2 = 0x0, b_pager = {pg_spc = 0x0, pg_reqpage = 0}, b_cluster = {
    cluster_head = {tqh_first = 0xcc5c66a0, tqh_last = 0xcc640720},
    cluster_entry = {tqe_next = 0xcc5c66a0, tqe_prev = 0xcc640720}},
  b_pages = {0xc0afb4ac, 0x0 <repeats 31 times>}, b_npages = 1, b_dep = {
    lh_first = 0x0}, b_chain = {parent = 0x0, count = 0}}

(kgdb) up
#4  0xc01d0b30 in nfs_vinvalbuf (vp=0xd7dde8c0, flags=0x1, cred=0xc2c60780, 
    p=0xd79a0680, intrflg=0x1) at /usr/src/sys/nfs/nfs_bio.c:1190
1190                    error = vinvalbuf(vp, flags, cred, p, 0, slptimeo);

(kgdb) print p->p_pid
$4 = 0x14594

(kgdb) btp 83348
 frame 0 at 0xd7a42cb4: ebp d7a42cd8, eip 0xc016cf8f <boot+755>:
    push   $0xc0282f08
 frame 1 at 0xd7a42cd8: ebp d7a42cec, eip 0xc016d3a9 <panic+173>:
    lea    0x0(%esi),%esi
 frame 2 at 0xd7a42cec: ebp d7a42d2c, eip 0xc019a719 <vinvalbuf+981>:
    lea    0x0(%esi),%esi
 frame 3 at 0xd7a42d2c: ebp d7a42d60, eip 0xc01d0b30 <nfs_vinvalbuf+264>:
    add    $0x18,%esp
 frame 4 at 0xd7a42d60: ebp d7a42e2c, eip 0xc01cf668 <nfs_bioread+540>:
    mov    %eax,0xffffff74(%ebp)
 frame 5 at 0xd7a42e2c: ebp d7a42e44, eip 0xc01f68d2 <nfs_read+30>:
    jmp    0xc01f68d9 <nfs_read+37>
 frame 6 at 0xd7a42e44: ebp d7a42e78, eip 0xc01a235c <vn_read+280>:
    mov    %eax,0xffffffe8(%ebp)
 frame 7 at 0xd7a42e78: ebp d7a42ef4, eip 0xc017b690 <dofileread+176>:
    mov    %eax,%esi
 frame 8 at 0xd7a42ef4: ebp d7a42f28, eip 0xc017b556 <read+54>:
    mov    %eax,%esi
 frame 9 at 0xd7a42f28: ebp d7a42fa0, eip 0xc025d7b5 <syscall2+537>:
    mov    %eax,0xffffffb8(%ebp)

(kgdb) pcb 83348
ip: c017091e sp: d47ecea4 bp: d47ecec0 bx: 00000000
0xc017091e <mi_switch+446>:     add    $0x4,%esp

(kgdb) ps
...
83348 d79a0680 d7a40000 239674     1 83279  004006  2  tail
...

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




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