Date: Thu, 11 Apr 2002 08:00:06 -0700 (PDT) From: "Richard S. Conto" <rsc@merit.edu> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/36790: kernel panic in biodone() on boot (ATA related?) Message-ID: <200204111500.g3BF06m60496@freefall.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR kern/36790; it has been noted by GNATS.
From: "Richard S. Conto" <rsc@merit.edu>
To: =?iso-8859-1?Q?S=F8ren?= Schmidt <sos@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org, rsc@merit.edu
Subject: Re: kern/36790: kernel panic in biodone() on boot (ATA related?)
Date: Thu, 11 Apr 2002 10:51:46 -0400
S=F8ren
I don't know if you've seen this PR, but I haven't been able
to successfully boot a "current" FreeBSD-STABLE for some time now.
I suspect this is related to the ATA work you've done recently, as
the kernel panic occurs in a call to 'biodone()' from 'ad_interrupt()'
in /sys/dev/ata/ata-disk.c (line 694).
I haven't had time to trace this back further. If you have any suggestion=
s
for how I can provide more or better information, I'm quite willing to
try.
* $FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.60.2.21 2002/03/25 21:42:47 so=
s
My technique for tracing things back was to:
(*) Modify /sys/sys/buf.h () to change 'biodone()' from an
entry point to a C-macro that calls "x_biodone(buf,__FILE__,__LINE)"
(*) Modify /sys/kern/fvs_bio.c to change "biodone(struct *buf)" to
"x_biodone(struct *buf, char *file, unsigned int lnum)" and change
a few 'panic()' calls to add -- " at %s:%u", file, lnum --
(*) Turn on kernel config option VFS_BIO_DEBUG
(*) make buildworld, mergemaster, make installworld, etc.
Unfortunately, my "technique" is very time consuming an takes about 8 hou=
rs
(elapsed time) on my laptop.
diffs below:
----------------------------------------------------------
* $FreeBSD: src/sys/sys/buf.h,v 1.88.2.7 2001/12/25 01:44:44 dillon
% diff -c -b -w /sys/sys/buf.h.orig /sys/sys/buf.h
*** /sys/sys/buf.h.orig Wed Apr 10 10:06:45 2002
--- /sys/sys/buf.h Wed Apr 10 10:09:18 2002
***************
*** 500,506 ****
--- 500,511 ----
struct buf *getblk __P((struct vnode *, daddr_t, int, int, int));
struct buf *geteblk __P((int));
int biowait __P((struct buf *));
+ #if 0
void biodone __P((struct buf *));
+ #else
+ void x_biodone __P((struct buf *, char *file, unsigned int lnum));
+ #define biodone(buf) x_biodone(buf,__FILE__,__LINE__)
+ #endif
=
void cluster_callback __P((struct buf *));
int cluster_read __P((struct vnode *, u_quad_t, daddr_t, long,
----------------------------------------------------------
* $FreeBSD: src/sys/kern/vfs_bio.c,v 1.242.2.16 2002/04/03 17:11:13 dillo=
n =
% diff -c -b -w /sys/kern/vfs_bio.c.orig /sys/kern/vfs_bio.c
*** /sys/kern/vfs_bio.c.orig Mon Apr 8 14:32:40 2002
--- /sys/kern/vfs_bio.c Wed Apr 10 10:15:03 2002
***************
*** 2670,2683 ****
--- 2670,2692 ----
* in the biodone routine.
*/
void
+ #if 0
biodone(register struct buf * bp)
+ #else
+ x_biodone(register struct buf * bp, char *file, unsigned int lnum)
+ #endif
{
int s, error;
=
s =3D splbio();
=
+ #if 0
KASSERT(BUF_REFCNT(bp) > 0, ("biodone: bp %p not busy %d", bp, BU=
F_REFCNT(bp)));
KASSERT(!(bp->b_flags & B_DONE), ("biodone: bp %p already done", =
bp));
+ #else
+ KASSERT(BUF_REFCNT(bp) > 0, ("biodone: bp %p not busy %d at %s:%u=
", bp, BUF_REFCNT(bp), file, lnum));
+ KASSERT(!(bp->b_flags & B_DONE), ("biodone: bp %p already done at=
%s:%u", bp, file, lnum));
+ #endif
=
bp->b_flags |=3D B_DONE;
runningbufwakeup(bp);
***************
*** 2714,2728 ****
--- 2723,2752 ----
=
#if defined(VFS_BIO_DEBUG)
if (vp->v_usecount =3D=3D 0) {
+ #if 0
panic("biodone: zero vnode ref count");
+ #else
+ panic("biodone: zero vnode ref counti at %s:%u",
+ file, lnum);
+ #endif
}
=
if (error) {
+ #if 0
panic("biodone: missing VM object");
+ #else
+ panic("biodone: missing VM object at %s:%u", file=
,
+ lnum);
+ #endif
}
=
if ((vp->v_flag & VOBJBUF) =3D=3D 0) {
+ #if 0
panic("biodone: vnode is not setup for merged cac=
he");
+ #else
+ panic("biodone: vnode is not setup for merged cac=
hei at %s:%u",
+ file, lnum);
+ #endif
}
#endif
=
----------------------------------------------------------
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204111500.g3BF06m60496>
