From owner-freebsd-net@freebsd.org Fri Aug 31 11:33:06 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1957FF7D68C for ; Fri, 31 Aug 2018 11:33:06 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FB298EB0C; Fri, 31 Aug 2018 11:33:05 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.91 (FreeBSD)) (envelope-from ) id 1fvhfj-000PhB-Tt; Fri, 31 Aug 2018 12:33:03 +0100 Date: Fri, 31 Aug 2018 12:33:03 +0100 From: Gary Palmer To: Gerrit K?hn Cc: Alan Somers , FreeBSD Net Subject: Re: Fw: 100.chksetuid handging on nfs mounts Message-ID: <20180831113303.GD83321@in-addr.com> References: <20171215143456.278a3dc31bb09c9217e83927@aei.mpg.de> <30015_1513349242_5A33E07A_30015_587_1_20171215154659.c8a7f21317a06ab64e480955@aei.mpg.de> <20180830090941.0b92d2012406299b19a68be2@aei.mpg.de> <20180830154404.5da83b6ff0481b17cd6d044e@aei.mpg.de> <20180831082933.085ee4f3c7a006549d0974db@aei.mpg.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180831082933.085ee4f3c7a006549d0974db@aei.mpg.de> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 11:33:06 -0000 On Fri, Aug 31, 2018 at 08:29:33AM +0200, Gerrit K?hn wrote: > On Thu, 30 Aug 2018 08:07:52 -0600 Alan Somers wrote > about Re: Fw: 100.chksetuid handging on nfs mounts: > > > Well that's not very illuminating. I was wondering if it had weird mount > > options or something. Are you sure that's why find is hanging? What > > happens if you unmount and repeat the command? > > I just tried these things: > > find command with nfs mounted and connection working: runs fine > find command with nfs unmounted: runs fine > find command with nfs mounted and nfs-nic down: hangs > > As soon as I "up" the interface again, find continues to run: > > --- > root@crest:/ # find -sx / /dev/null \( ! -fstype local > \) -prune -o -type f \( \( ! -perm +010 -and -perm +001 \) -or \( ! -perm > +020 -and -perm +002 \) -or \( ! -perm +040 -and -perm +004 \) \) -exec ls > -liTd \{\} \+ > nfs server hellpool:/samqfs/FC5/Gerrit: not responding > nfs server hellpool:/samqfs/FC5/Gerrit: is alive again > root@crest:/ # You might want to retry the experiment but look at the state of the find process using "ps alxww" or similar, or use ktrace to figure out what it is doing. With the '-x' flag to not cross mount points I suspect it is using stat(2) on the mount point to check to see if the st_dev field changes, and then skip that directory if it is different. With the NFS server unreachable the stat(2) cannot complete. Regards, Gary