zfs: Fatal trap 12: page fault while in kernel mode
Pawel Jakub Dawidek
pjd at FreeBSD.org
Wed Jul 29 21:17:47 UTC 2009
On Wed, Jul 29, 2009 at 10:15:06PM +0200, Thomas Backman wrote:
> On Jul 29, 2009, at 19:18, Andriy Gapon wrote:
>
> >
> >Thanks a lot again!
> >
> >Could you please try the following change?
> >In sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c, in
> >function
> >zfs_inactive() insert the following line:
> > vrecycle(vp, curthread);
> >before the following line:
> > zfs_znode_free(zp);
> >
> >This is in "if (zp->z_dbuf == NULL)" branch.
> >
> >I hope that this should work in concert with the patch that Pawel
> >has posted.
> >
> >P.S.
> >Also Pawel has told me that adding 'CFLAGS+=-DDEBUG=1' to sys/
> >modules/zfs/Makefile
> >should enable additional debugging checks (ASSERTs) in ZFS code.
> >
> >--
> >Andriy Gapon
> Better backtraces:
>
> Without your vrecycle() addition, and with the -DDEBUG=1 one (note to
> self: core.txt.32):
>
> Unread portion of the kernel message buffer:
> panic: solaris assert: ((zp)->z_vnode) == ((void *)0), file: /usr/src/
> sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/
> zfs_znode.c, line: 1043
Modify zfs_inactive() 'zp->z_dbuf == NULL' case to look like this:
if (zp->z_dbuf == NULL) {
/*
* The fs has been unmounted, or we did a
* suspend/resume and this file no longer exists.
*/
VI_LOCK(vp);
vp->v_count = 0; /* count arrives as 1 */
vp->v_data = NULL;
VI_UNLOCK(vp);
rw_exit(&zfsvfs->z_teardown_inactive_lock);
ZTOV(zp) = NULL;
vrecycle(vp, curthread);
zfs_znode_free(zp);
return;
}
--
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20090729/5c0424ab/attachment.pgp
More information about the freebsd-current
mailing list