Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Mar 2016 13:57:07 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Maxim Sobolev <sobomax@sippysoft.com>
Cc:        Kirk McKusick <mckusick@mckusick.com>, peter@holm.cc, fs@freebsd.org
Subject:   Re: Process stuck in "vnread"
Message-ID:  <20160302115707.GF67250@kib.kiev.ua>
In-Reply-To: <CAH7qZfs4jCiP=ARaZjGGW1XVa63a-oOkaWtCO1L1-Hk%2Bema7OQ@mail.gmail.com>
References:  <CAH7qZfs3EwT8jnKyodHxF_5nK18MeLSaB_F-qqOfwV0MJMD7Vg@mail.gmail.com> <20160302095339.GB67250@kib.kiev.ua> <CAH7qZfs4jCiP=ARaZjGGW1XVa63a-oOkaWtCO1L1-Hk%2Bema7OQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 02, 2016 at 03:02:02AM -0800, Maxim Sobolev wrote:
> About the backtrace, indeed, looks like you are right and some portion of
> it is not decoded properly, as it's loaded as a kernel module. The setup is
> somewhat even more complicated, the /usr/ports is mounted via NULLFS, so in
> this command:
> 
> cp /usr/local/share/automake-1.15/compile ./compile
> 
> The target (i.e. ./compile) here is a path on ZFS that is exported via
> NULLFS, while the source is a file on UFS2->md->ZFS. This is probably the
> reason stack trace is incomplete, both zfs.ko and nullfs.ko are loaded as
> modules and the next few frames point towards those. Unfortunately I cannot
> beat kgdb to read symbols from those .ko's and decode them.

Is nullfs mount put over ZFS only ?  The backtrace you shown cannot
happen for ZFS, since ZFS has its own pager vop.  In fact, I would
agree that the backtrace is reasonable for nullfs over UFS upper vnode.
The following patch should fix the 'paging while faulting on uiomove'
issue for nullfs over UFS.

Peter, could you, please, test the patch ?  It is purely nullfs change,
and the most interesting situation is the ups' deadlock, but the whole
set of nullfs tests would be good to check.

diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index 64e1e29..49bae28 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -199,7 +199,7 @@ nullfs_mount(struct mount *mp)
 	}
 	mp->mnt_kern_flag |= MNTK_LOOKUP_EXCL_DOTDOT;
 	mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag &
-	    MNTK_USES_BCACHE;
+	    (MNTK_USES_BCACHE | MNTK_NO_IOPF | MNTK_UNMAPPED_BUFS);
 	MNT_IUNLOCK(mp);
 	mp->mnt_data = xmp;
 	vfs_getnewfsid(mp);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160302115707.GF67250>