Date: Wed, 29 Jul 2009 23:18:03 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Thomas Backman <serenity@exscape.org> Cc: freebsd-fs@freebsd.org, FreeBSD current <freebsd-current@freebsd.org>, Andriy Gapon <avg@FreeBSD.org> Subject: Re: zfs: Fatal trap 12: page fault while in kernel mode Message-ID: <20090729211803.GA2130@garage.freebsd.pl> In-Reply-To: <16B40A2B-A1B5-4528-8721-6D352E7D5419@exscape.org> References: <52AA86CB-6C06-4370-BA73-CE19175467D0@exscape.org> <4A705299.8060504@icyb.net.ua> <D3491B77-DA5C-4E10-BE1D-D6EF8CFB112E@exscape.org> <4A7054E1.5060402@icyb.net.ua> <5918824D-A67C-43E6-8685-7B72A52B9CAE@exscape.org> <4A705E50.8070307@icyb.net.ua> <4A70728C.7020004@freebsd.org> <6D47A34B-0753-4CED-BF3D-C505B37748FC@exscape.org> <4A708455.5070304@freebsd.org> <16B40A2B-A1B5-4528-8721-6D352E7D5419@exscape.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
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@FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
iD8DBQFKcLyLForvXbEpPzQRAmHsAJ4gLjI2hH8yCsYy62NKANOywFmpbgCgotVG
LG97BCENfOQuQ1Z72jkaMcQ=
=orhi
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090729211803.GA2130>
