Subject: Re: savecore -c crashes kernel (-current on i386)
To: Geoff Wing <gcw@pobox.com>
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
List: current-users
Date: 10/08/2007 09:56:19
On Mon, Oct 08, 2007 at 05:31:46PM +1000, Geoff Wing wrote:
> On Monday 2007-10-08 09:04 +0200, Juergen Hannken-Illjes output:
> :> > (2007-10-08 05:00 UTC)
> :> > Some recent change is causing my system to crash with "savecore -c",
> :> > however during the OS coredump it's failing (and rebooting).
> :> >
> :> > >From DDB, it gives something like:
> :> >
> :> > uvm_fault in savecore:
> :> >
> :> > specificdata_getspecific() + 0x17
> :> > mount_getspecific() + 0x26
> :> > fscow_run
> :> > spec_strategy
> :show buf <1. arg of fscow_run>
> :show vnode <vnode og this buf>
>
> from a "boot -s" on my i386 (C2Duo w/ 2G mem)
>
> (Hopefully I haven't fatfingered too much)
>
> show buf cdde43e4
> vp 0xcde44e70 lblkno 0xadc0 blkno 0xadc0 raw 560adc0 dev 0x01
> error 0 flag 0x4020034 (ASYNC,BUSY,SCANNED,CACHE,VFLUSH)
> bufsize 0x800 bcount 0x800 resid 0x0
> data 0xccb6b800 saveaddr 0x0 dep 0x0 iodone 0x0
>
> show vnode cde44e70
> OBJECT 0xcde44e70 locked=0 pgops=0xc053246c npages=0 refs=2
> VNODE flags 80<LOCKSWORK>
> mp 0xc3240000 numoutput 1 size 0x81000000 writesize 0x81000000
> data 0xcde435e0 usecount 2 writecount 1 holdcnt 5 numoutput 1
> tag VT_UFS(1) type VBLK(3) mount 0xc324e000 typedate 0xc325fde0
Could you try this diff please:
Index: vfs_trans.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_trans.c,v
retrieving revision 1.13
diff -p -u -4 -r1.13 vfs_trans.c
--- vfs_trans.c 7 Oct 2007 14:48:38 -0000 1.13
+++ vfs_trans.c 8 Oct 2007 07:55:42 -0000
@@ -592,8 +592,10 @@ fscow_run(struct buf *bp)
if (bp->b_vp->v_type == VBLK)
mp = bp->b_vp->v_specmountpoint;
else
mp = bp->b_vp->v_mount;
+ if (mp == NULL)
+ return 0;
if ((cmi = mount_getspecific(mp, mount_cow_key)) == NULL)
return 0;
--
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)