Subject: Re: 1.5.1 kernel panic this morning.
To: Stephen M Jones <smj@cirr.com>
From: Chuck Silvers <chuq@chuq.com>
List: port-alpha
Date: 08/29/2001 17:42:25
On Wed, Aug 29, 2001 at 12:36:13PM -0500, Stephen M Jones wrote:
> Is there a good debugger tutorial?  I read the HOWTO but I'm not sure that
> could help me given that this is a production system.

for live debugging with ddb, see the ddb manpage.
for post-mortem debugging with gdb, it's very similar to debugging
an application from a core, except you use "target kcore filename"
to tell it that it's a kernel core instead of an application core,
and there are a couple extra commands like "proc" and "pcb" to deal
with switching between different process contexts in the core.


by the way, there was a long-standing bug in the 1.5.x kernels that
has the exact symptom of your crash, and this was just fixed this morning.
the bug has to do with softdeps and mmap(), so if you're using softdeps
you should apply the following change:

Index: ufs/ffs/ffs_inode.c
===================================================================
RCS file: /cvsroot/syssrc/sys/ufs/ffs/ffs_inode.c,v
retrieving revision 1.35.2.1
diff -c -r1.35.2.1 ffs_inode.c
*** ufs/ffs/ffs_inode.c 2000/12/14 23:36:36     1.35.2.1
--- ufs/ffs/ffs_inode.c 2001/08/29 20:45:13
***************
*** 223,229 ****

        if (DOINGSOFTDEP(ovp)) {
                uvm_vnp_setsize(ovp, length);
!               (void) uvm_vnp_uncache(ovp);
                if (length > 0) {
                        /*
                         * If a file is only partially truncated, then
--- 223,230 ----

        if (DOINGSOFTDEP(ovp)) {
                uvm_vnp_setsize(ovp, length);
!               if (ovp->v_usecount)    /* can't be cached if usecount=0 */
!                       (void) uvm_vnp_uncache(ovp);
                if (length > 0) {
                        /*
                         * If a file is only partially truncated, then


I don't know whether this bug is what caused your particular crash, though.

-Chuck