From owner-freebsd-fs@freebsd.org Wed Mar 2 11:57:22 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26BAAAC03FA for ; Wed, 2 Mar 2016 11:57:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 0FA9F1B84 for ; Wed, 2 Mar 2016 11:57:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 0D613AC03F9; Wed, 2 Mar 2016 11:57:22 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CFB9AC03F7 for ; Wed, 2 Mar 2016 11:57:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81D231B83 for ; Wed, 2 Mar 2016 11:57:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u22Bv8Vv082661 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 2 Mar 2016 13:57:08 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u22Bv8Vv082661 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u22Bv8Ag082660; Wed, 2 Mar 2016 13:57:08 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 Mar 2016 13:57:07 +0200 From: Konstantin Belousov To: Maxim Sobolev Cc: Kirk McKusick , peter@holm.cc, fs@freebsd.org Subject: Re: Process stuck in "vnread" Message-ID: <20160302115707.GF67250@kib.kiev.ua> References: <20160302095339.GB67250@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2016 11:57:22 -0000 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);