From owner-freebsd-stable@freebsd.org Sun Nov 29 14:38:34 2015 Return-Path: Delivered-To: freebsd-stable@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 08D51A3B704 for ; Sun, 29 Nov 2015 14:38:34 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) 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 D38E319BA for ; Sun, 29 Nov 2015 14:38:33 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: by mailman.ysv.freebsd.org (Postfix) id D14A9A3B702; Sun, 29 Nov 2015 14:38:33 +0000 (UTC) Delivered-To: stable@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 D0CFDA3B6FF; Sun, 29 Nov 2015 14:38:33 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 595E919B9; Sun, 29 Nov 2015 14:38:32 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) IronPort-PHdr: 9a23:SFuJZx+tc1q/Ef9uRHKM819IXTAuvvDOBiVQ1KB92+scTK2v8tzYMVDF4r011RmSDdidu6wP1beempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+lR8iC0Y/piqibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwuwwZgf8q9tZBXKPmZOx4COUAVHV1e1wysYfOtBrDRAqLrkdaGC1ClxsLHwjY6jnzWpv4tG3zsuVw0jOTe8bxSOZndy6l6vJRSRTrwAIOPD09/WSf3tZ1halYpB+kjwF4zJPZZJmVcvF3KPCONegGTHZMC54CHxdKBZmxOs5WV7IM X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CtBAC4DFtW/61jaINdhA5vBr4wgWYXCoUkSgKBUxIBAQEBAQEBAYEJgi2CBwEBAQMBAQEBICsgCwULAgEGAhgCAg0ZAgInAQkmAgQIBwQBGQMEiAUIDYoanTWPYQEBAQEBAQEDAQEBAQEBAQEBFgSBAYVThH6EOwEBBReDHIFEBY4YiD+FKoJygjCER4dojyyDcAIoCDOEIiA0B4QpOoEHAQEB X-IronPort-AV: E=Sophos;i="5.20,360,1444708800"; d="scan'208";a="254710208" Received: from nipigon.cs.uoguelph.ca (HELO zcs1.mail.uoguelph.ca) ([131.104.99.173]) by esa-annu.net.uoguelph.ca with ESMTP; 29 Nov 2015 09:38:25 -0500 Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id 8682515F5DA; Sun, 29 Nov 2015 09:38:25 -0500 (EST) Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 7baFwx5osivg; Sun, 29 Nov 2015 09:38:24 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id CBD4715F5E2; Sun, 29 Nov 2015 09:38:24 -0500 (EST) X-Virus-Scanned: amavisd-new at zcs1.mail.uoguelph.ca Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FpwMkyJ4A2TL; Sun, 29 Nov 2015 09:38:24 -0500 (EST) Received: from zcs1.mail.uoguelph.ca (zcs1.mail.uoguelph.ca [172.17.95.18]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id AEA1915F5DA; Sun, 29 Nov 2015 09:38:24 -0500 (EST) Date: Sun, 29 Nov 2015 09:38:24 -0500 (EST) From: Rick Macklem To: "Mikhail T." Cc: Jilles Tjoelker , freebsd-fs , stable@freebsd.org Message-ID: <1842140450.110568454.1448807904673.JavaMail.zimbra@uoguelph.ca> In-Reply-To: <565A8A3E.205@aldan.algebra.com> References: <5659CB64.5020105@aldan.algebra.com> <20151128224101.GA8470@stack.nl> <565A8A3E.205@aldan.algebra.com> Subject: Re: cp from NFS to ZFS hung in "fifoor" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.17.95.11] X-Mailer: Zimbra 8.0.9_GA_6191 (ZimbraWebClient - FF34 (Win)/8.0.9_GA_6191) Thread-Topic: cp from NFS to ZFS hung in "fifoor" Thread-Index: H0MseaRTtkV1zweh2mlLoyUENH+T+A== X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 14:38:34 -0000 Mikhail T. wrote: > On 28.11.2015 17:41, Jilles Tjoelker wrote: > > Although cp -R will normally copy a fifo by calling mkfifo at the > > destination, it may open one if a regular file is replaced with a fifo > > between the time it reads the directory and it copies that file. >=20 > The sole fifo under /home here was mi/.licq/licq_fifo, created in 2003. > I echoed something into it (on the NFS-client side) and the cp-process > resumed. >=20 > I then performed a simple test: >=20 > 1. Create a fifo in an NFS-exported directory and try to copy it with > the -R flag > mi@narawntapu:/cache/src (792) mkfifo /green/tmp/test > mi@narawntapu:/cache/src (793) cp -Rpn /green/tmp/test /tmp/ > mi@narawntapu:/cache/src (794) ls -l /tmp/test > prw-r--r-- 1 mi wheel 0 29 =D0=BB=D0=B8=D1=81 00:05 /tmp/test > The above worked fine. > 2. Now, when I try to do the same thing via an NFS mount, I get the > same hang in fifoor: > root@aldan:ports/x11/kde4 (475) cp -Rpn /green/tmp/test /tmp/ > load: 0.42 cmd: cp 38299 [fifoor] 1.15r 0.00u 0.00s 0% 1868k >=20 > So, the good news is, this is not ZFS' fault. The bad news is, there is > still a bug... Unless, of course, this is some known "feature" of the > NFS... Compare, for example, how stat(1) describes the same named pipe > from both machines: >=20 > Local FS: > 92 74636334 prw-r--r-- 1 mi wheel 0 0 "Nov 29 00:05:51 2015" "Nov 29 > 00:05:51 2015" "Nov 29 00:05:51 2015" "Nov 29 00:05:51 2015" 16384 0 > 0 /green/tmp/test > NFS-client: > 973143811 74636334 ?rw-r--r-- 1 mi wheel 4294967295 0 "Nov 29 > 00:05:51 2015" "Nov 29 00:05:51 2015" "Nov 29 00:05:51 2015" "Dec 31 > 18:59:59 1969" 16384 0 0 /green/tmp/test >=20 I just tried a trivial test (using a fairly old FreeBSD9 and a pretty recen= t FreeBSD-head) and wasn't able to reproduce the problem. For my tests, "ls -l" in the NFS client showed "p" and the "cp -R" worked. I only have UFS file systems and tested with those. I can only think of a couple of explanations: 1 - ZFS didn't fill the v_type in as FIFO. The NFS server uses the v_type field to determine it is a fifo and not the high order bits of va_mode (the S_IFMT bits). I don't have ZFS to test with. 2 - You somehow used an NFSv2 mount. (NFSv2 didn't have support for FIFOs, if I recall correctly.) You can check your mount options, including which version is in use via "nfsstat -m" unless you have a pretty old system. If you have a UFS file system on the NFS server, maybe you could try export= ing that and run a test, to see if it happens for a UFS export? rick > That question-mark in the node-type (instead of the "p") is, I guess, > what confuses cp into trying to read from it instead of creating a fifo. > Should I file a PR? Thank you! >=20 > -mi >=20 > _______________________________________________ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"