Date: Fri, 4 Dec 2009 22:35:14 GMT From: Dominik Ernst <dernst@gmx.de> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/141177: fsync() on FIFO causes panic() on zfs Message-ID: <200912042235.nB4MZEjV047490@www.freebsd.org> Resent-Message-ID: <200912042240.nB4Me2tR020150@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <sys/types.h> #include <unistd.h> #include <fcntl.h> 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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912042235.nB4MZEjV047490>