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>
next in thread | previous in thread | raw e-mail | index | archive | help
--zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 29, 2009 at 10:15:06PM +0200, Thomas Backman wrote: > On Jul 29, 2009, at 19:18, Andriy Gapon wrote: >=20 > > > >Thanks a lot again! > > > >Could you please try the following change? > >In sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c, in =20 > >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 =3D=3D NULL)" branch. > > > >I hope that this should work in concert with the patch that Pawel =20 > >has posted. > > > >P.S. > >Also Pawel has told me that adding 'CFLAGS+=3D-DDEBUG=3D1' to sys/=20 > >modules/zfs/Makefile > >should enable additional debugging checks (ASSERTs) in ZFS code. > > > >--=20 > >Andriy Gapon > Better backtraces: >=20 > Without your vrecycle() addition, and with the -DDEBUG=3D1 one (note to = =20 > self: core.txt.32): >=20 > Unread portion of the kernel message buffer: > panic: solaris assert: ((zp)->z_vnode) =3D=3D ((void *)0), file: /usr/src= /=20 > sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/=20 > zfs_znode.c, line: 1043 Modify zfs_inactive() 'zp->z_dbuf =3D=3D NULL' case to look like this: if (zp->z_dbuf =3D=3D NULL) { /* * The fs has been unmounted, or we did a * suspend/resume and this file no longer exists. */ VI_LOCK(vp); vp->v_count =3D 0; /* count arrives as 1 */ vp->v_data =3D NULL; VI_UNLOCK(vp); rw_exit(&zfsvfs->z_teardown_inactive_lock); ZTOV(zp) =3D NULL; vrecycle(vp, curthread); zfs_znode_free(zp); return; } --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKcLyLForvXbEpPzQRAmHsAJ4gLjI2hH8yCsYy62NKANOywFmpbgCgotVG LG97BCENfOQuQ1Z72jkaMcQ= =orhi -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090729211803.GA2130>