From owner-freebsd-bugs@FreeBSD.ORG Fri Dec 4 22:40:03 2009 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 4C6841065679 for ; Fri, 4 Dec 2009 22:40:03 +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 0F0E58FC13 for ; Fri, 4 Dec 2009 22:40:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nB4Me2J3020156 for ; Fri, 4 Dec 2009 22:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nB4Me2tR020150; Fri, 4 Dec 2009 22:40:02 GMT (envelope-from gnats) Resent-Date: Fri, 4 Dec 2009 22:40:02 GMT Resent-Message-Id: <200912042240.nB4Me2tR020150@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, Dominik Ernst Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 803611065696 for ; Fri, 4 Dec 2009 22:35:14 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 6F93B8FC21 for ; Fri, 4 Dec 2009 22:35:14 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nB4MZEEp047491 for ; Fri, 4 Dec 2009 22:35:14 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id nB4MZEjV047490; Fri, 4 Dec 2009 22:35:14 GMT (envelope-from nobody) Message-Id: <200912042235.nB4MZEjV047490@www.freebsd.org> Date: Fri, 4 Dec 2009 22:35:14 GMT From: Dominik Ernst To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/141177: fsync() on FIFO causes panic() on zfs 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: Fri, 04 Dec 2009 22:40:03 -0000 >Number: 141177 >Category: kern >Synopsis: fsync() on FIFO causes panic() on zfs >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 04 22:40:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Dominik Ernst >Release: 8.0-RELEASE >Organization: >Environment: FreeBSD traal 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sun Nov 29 01:42:39 UTC 2009 root@:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Having created a FIFO on a zfs filesystem with someone reading on it, causes a panic() if you write() and fsync() on it. Seems zfs related since I could not reproduce it with a FIFO on a UFS filesystem. Reproduced it so far on two different machines running 8.0/amd64 and once in VirtualBox using stock kernel and base system for 8.0/i386. >How-To-Repeat: mkfifo /mnt/zfs/testpipe tail -f /mnt/zfs/testpipe & cc test.c -o test ./test with ./test.c being something like this: #include #include #include int main(void) { char fifo[] = "/mnt/zfs/testpipe"; int fd; fd = open(fifo, O_WRONLY); if(fd < 0) { perror("open"); return 1; } write(fd, "asdf\n", sizeof(char)*5); fsync(fd); close(fd); return 0; } alternatively vim from ports can be used too, typing something like this on an opened file: :w >> /mnt/zfs/testpipe >Fix: >Release-Note: >Audit-Trail: >Unformatted: