From owner-freebsd-bugs@FreeBSD.ORG Thu Jul 26 23:00:22 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 245521065670 for ; Thu, 26 Jul 2012 23:00:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D77B48FC12 for ; Thu, 26 Jul 2012 23:00:21 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6QN0Lek023314 for ; Thu, 26 Jul 2012 23:00:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6QN0Lsf023313; Thu, 26 Jul 2012 23:00:21 GMT (envelope-from gnats) Resent-Date: Thu, 26 Jul 2012 23:00:21 GMT Resent-Message-Id: <201207262300.q6QN0Lsf023313@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Cooper Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 849FC106566B for ; Thu, 26 Jul 2012 22:56:53 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 6FA5E8FC15 for ; Thu, 26 Jul 2012 22:56:53 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q6QMura3077481 for ; Thu, 26 Jul 2012 22:56:53 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q6QMurVf077480; Thu, 26 Jul 2012 22:56:53 GMT (envelope-from nobody) Message-Id: <201207262256.q6QMurVf077480@red.freebsd.org> Date: Thu, 26 Jul 2012 22:56:53 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/170203: [kern] piped dd's don't behave sanely when dealing with a fifo X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jul 2012 23:00:22 -0000 >Number: 170203 >Category: kern >Synopsis: [kern] piped dd's don't behave sanely when dealing with a fifo >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jul 26 23:00:21 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 9-STABLE >Organization: EMC Isilon >Environment: FreeBSD forza.west.isilon.com 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #1 r238738M: Mon Jul 23 22:39:40 PDT 2012 gcooper@forza.west.isilon.com:/usr/obj/usr/src/sys/FORZA amd64 >Description: Creating a fifo and then dd'ing across the fifo using /dev/zero doesn't seem to yield the behavior one would expect to have; dd should either exit thanks to SIGPIPE being sent or the count being completed. Furthermore, the count is bogus: Terminal 1: $ dd if=fifo bs=512k count=4 0+4 records in 0+4 records out 32768 bytes transferred in 0.002121 secs (15449523 bytes/sec) $ dd if=fifo bs=512k count=4 0+4 records in 0+4 records out 32768 bytes transferred in 0.001483 secs (22096295 bytes/sec) $ dd if=fifo bs=512M count=4 0+4 records in 0+4 records out 32768 bytes transferred in 0.003908 secs (8384514 bytes/sec) Terminal 2: $ dd if=/dev/zero bs=512k count=4 of=fifo ^T load: 0.40 cmd: dd 1779 [sbwait] 2.63r 0.00u 0.00s 0% 1800k 1+0 records in 0+0 records out 0 bytes transferred in 2.639078 secs (0 bytes/sec) ^T load: 0.37 cmd: dd 1779 [sbwait] 8.19r 0.00u 0.00s 0% 1804k 1+0 records in 0+1 records out 40960 bytes transferred in 8.191172 secs (5001 bytes/sec) >How-To-Repeat: mkfifo fifo Terminal 1: dd if=fifo bs=512k count=4 Terminal 2: dd if=/dev/zero bs=512k count=4 of=fifo >Fix: >Release-Note: >Audit-Trail: >Unformatted: