Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2009 11:27:12 +0200
From:      Tanel Rebane <tr@lc24.net>
To:        "freebsd-bugs@freebsd.org" <freebsd-bugs@freebsd.org>
Cc:        "chet@case.edu" <chet@case.edu>
Subject:   Problem regarding pipe the implementation
Message-ID:  <48E190F9B8A70A44B17C28A1DB2704510367122BCCF5@lc24-exmbx01.LC24.local>

next in thread | raw e-mail | index | archive | help
Hello,

it seems like I've ran across a problem with the pipe implementation of Fre=
eBSD.

[tanelr@fbsd-bugtest ~]$ cat pipeproblem
#!/usr/bin/env bash
for (( q =3D 0 ; q < 30 ; q++ )); do
        while read -d '' z; do result+=3D("$z"); done < <(printf "%s\000\n"=
 test | grep -a 'test')
done
[tanelr@fbsd-bugtest ~]$ ./pipeproblem
./pipeproblem: line 4: /var/tmp//sh-np-1625797870: Interrupted system call
./pipeproblem: line 4: /var/tmp//sh-np-4194883147: Interrupted system call
./pipeproblem: line 4: /var/tmp//sh-np-762535206: Interrupted system call
./pipeproblem: line 4: /var/tmp//sh-np-2528063441: Interrupted system call
./pipeproblem: line 4: /var/tmp//sh-np-1213045640: Interrupted system call
./pipeproblem: line 4: /var/tmp//sh-np-3210308902: Interrupted system call
./pipeproblem: line 4: /var/tmp//sh-np-134196816: Interrupted system call
./pipeproblem: line 4: /var/tmp//sh-np-3268002277: Interrupted system call
./pipeproblem: line 4: /var/tmp//sh-np-3950698013: Interrupted system call
./pipeproblem: line 4: /var/tmp//sh-np-2799887371: Interrupted system call
./pipeproblem: line 4: /var/tmp//sh-np-3391227547: Interrupted system call
./pipeproblem: line 4: /var/tmp//sh-np-2888089950: Interrupted system call
./pipeproblem: line 4: /var/tmp//sh-np-2618507856: Interrupted system call
[tanelr@fbsd-bugtest ~]$ bash --version
GNU bash, version 3.2.48(0)-release (i386-portbld-freebsd7.1)
Copyright (C) 2007 Free Software Foundation, Inc.
[tanelr@fbsd-bugtest ~]$ uname -a
FreeBSD fbsd-bugtest.XXXX 7.2-PRERELEASE FreeBSD 7.2-PRERELEASE #0: Tue Mar=
 31 00:25:41 CEST 2009     root@fbsd-bugtest.XXXX:/usr/obj/usr/src/sys/GENE=
RIC <mailto:root@fbsd-bugtest.XXXX:/usr/obj/usr/src/sys/GENERIC>   i386

At first I thought bash and grep were the sources of this problem but Mr. C=
het Ramey had this to say*: "I took a look at this, and it's not just due t=
o the grep.  I think it's a timing problem, but I can't tell what signal is=
 interrupting the open.  I thought it might be SIGCHLD, but I don't think s=
o now. It just seems that FreeBSD's named pipe implementation is a bit frag=
ile."

*http://www.mail-archive.com/bug-bash@gnu.org/msg04035.html

Yours faithfully,
Tanel Rebane

P.S: Please CC me as I'm not subscribed to the list. Thanks!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48E190F9B8A70A44B17C28A1DB2704510367122BCCF5>