Date: Mon, 30 Mar 98 05:20:06 EST From: luoqi@watermarkgroup.com (Luoqi Chen) To: rb@gid.co.uk, toor@dyson.iquest.net Cc: current@FreeBSD.ORG Subject: Re: panic: "vm_fault: fault on nofault entry" with softupdates Message-ID: <9803301020.AA16817@watermarkgroup.com>
next in thread | raw e-mail | index | archive | help
> > Hi, > > > > I'm getting occasional "vm_fault: fault on nofault entry" panics running > > with softupdates on a recent kernel (CTM src-cur 3301). The traceback looks > > like this: > > > > panic > > vm_fault > > trap(10,... > > --- trap 0xc, ... > > generic_bcopy > > softdep_setup_allocindir_page > > ffs_balloc > > ffs_write > > vn_write > > write > > [syscall stuff] > > > > There seems to be no particular rhyme of reason to this, it happens every > > third or fourth buildworld. Any ideas? > > > That specific bug is a nit leftover from the softupdates port. Will > eventually be fixed. I did look at it today, and fixed one bug, but > it seems that there are more to be found. > This bug seems to be caused by a missing VOP_BMAP call for the indirect block. The code allocates a block device buf at b_blkno, which is still a negative number and eventually leads to panic in bcopy. Please try the following patch -- I am not sure if this is the correct way to fix this problem. The real problem is that bufs returned by bread() are no longer guaranteed to be bmapped after the VMIO merge (bmap calls are moved to bdwrite), yet Kirk's code still makes that assumption. -lq --- ffs_softdep.c Fri Mar 20 11:22:14 1998 +++ ffs_softdep.c.orig Mon Mar 30 04:55:56 1998 @@ -1528,14 +1528,6 @@ newindirdep->ir_state = ATTACHED; LIST_INIT(&newindirdep->ir_deplisthd); LIST_INIT(&newindirdep->ir_donehd); - if (bp->b_blkno == bp->b_lblkno) { -#ifdef DEBUG - printf("setup_allocindir_phase2: need bmap, blk %d\n", - bp->b_lblkno); -#endif - VOP_BMAP(bp->b_vp, bp->b_lblkno, NULL, &bp->b_blkno, - NULL, NULL); - } newindirdep->ir_saveddata = (ufs_daddr_t *)bp->b_data; newindirdep->ir_savebp = getblk(ip->i_devvp, bp->b_blkno, bp->b_bcount, 0, 0); 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?9803301020.AA16817>