From owner-freebsd-stable@freebsd.org Sun Nov 29 05:17:22 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 7E5B0A3B801 for ; Sun, 29 Nov 2015 05:17:22 +0000 (UTC) (envelope-from mi+thun@aldan.algebra.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 6279A190F for ; Sun, 29 Nov 2015 05:17:22 +0000 (UTC) (envelope-from mi+thun@aldan.algebra.com) Received: by mailman.ysv.freebsd.org (Postfix) id 5FCC4A3B7FF; Sun, 29 Nov 2015 05:17:22 +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 5E212A3B7FE; Sun, 29 Nov 2015 05:17:22 +0000 (UTC) (envelope-from mi+thun@aldan.algebra.com) Received: from vms173007pub.verizon.net (vms173007pub.verizon.net [206.46.173.7]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D95D190E; Sun, 29 Nov 2015 05:17:21 +0000 (UTC) (envelope-from mi+thun@aldan.algebra.com) MIME-version: 1.0 Received: from [192.168.1.8] ([100.1.236.52]) by vms173007.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0NYK00LRR9BZXL50@vms173007.mailsrvcs.net>; Sat, 28 Nov 2015 23:16:52 -0600 (CST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=MtGvkDue c=1 sm=1 tr=0 a=UorMnhrCY2jH/mPejITChw==:117 a=LaogzpLLAAAA:8 a=oR5dmqMzAAAA:8 a=qtqOOiqGOCEA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=_aNIyrnYADYoUgAxp2cA:9 a=QEXdDO2ut3YA:10 a=llZLzHQZhQd3dyS0dCMA:9 a=G0KNu4EsI3M_aVGU:21 a=_W_S_7VecoQA:10 Subject: Re: cp from NFS to ZFS hung in "fifoor" To: Jilles Tjoelker References: <5659CB64.5020105@aldan.algebra.com> <20151128224101.GA8470@stack.nl> Cc: stable@freebsd.org, freebsd-fs From: "Mikhail T." X-Enigmail-Draft-Status: N1110 Message-id: <565A8A3E.205@aldan.algebra.com> Date: Sun, 29 Nov 2015 00:16:46 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-reply-to: <20151128224101.GA8470@stack.nl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.20 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 05:17:22 -0000 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. 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. I then performed a simple test: 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 лис 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 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: 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 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! -mi