[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Piping sed stalls on OpenSolaris 2010.03
From: |
Mats Erik Andersson |
Subject: |
Re: Piping sed stalls on OpenSolaris 2010.03 |
Date: |
Fri, 13 Apr 2012 19:29:11 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
fredag den 13 april 2012 klockan 07:59 skrev Paul Eggert detta:
> On 04/13/2012 03:32 AM, Mats Erik Andersson wrote:
> > { echo "A comment";
> > sed -e 's,re,txt,g' < file |
> > sed -e 's,re2,txt2,g' |
> > sed -e 's,re3,txt3,g'; } > outfile
> >
> > All other modules implement pipes using one or two levels, not three.
> > This three level construct stalls on OpenSolaris 2010.03, presumably
> > waiting for input
>
> This sounds like a serious bug with OpenSolaris.
> But perhaps it is a bug in the script.
The relevant trace part is the one given below.
Prior to the this "/usr/gnu/bin/sed", i.e., "/usr/bin/gsed"
has been put to work, using ksh93 and gmake. Same "brk" lines
were removed, and my identification of I/O has been inserted.
I find this inconclusive, except that the expected write(2)
never appears.
Best regards,
Mats E A
MEA: Comments as made by Mats Erik Andersson
14115: write(1, " o s e , " c l o s e ".., 5120) = 5120
MEA: Writing for line 299, lib/unistd.in.h
14115: read(0, " r f o r p o r t a b".., 4096) = 4096
MEA: Reading from line 243 or 481, lib/unistd.in.h
14115: read(0, " E T C W D\n _ G L _ W A".., 4096) = 4096
MEA: Reading from line 598, lib/unistd.in.h
14115: write(1, " o i d _ g l _ u n r e".., 5120) = 5120
MEA: Writing for line 466, lib/unistd.in.h
14115: read(0, " c a s t , b e c a u s".., 4096) = 4096
MEA: Reading from line 708 or later, lib/unistd.in.h
14054: waitid(P_ALL, 0, 0x08046B70, WEXITED|WTRAPPED) (sleeping...)
14077: waitid(P_ALL, 0, 0x08046AE0, WEXITED|WTRAPPED) (sleeping...)
14099: waitid(P_ALL, 0, 0x08045070, WEXITED|WTRAPPED|WSTOPPED|WCONTINUED)
(sleeping...)
14107: waitid(P_ALL, 0, 0x08044310, WEXITED|WTRAPPED|WSTOPPED|WCONTINUED)
(sleeping...)
14109: waitid(P_ALL, 0, 0x080469C0, WEXITED|WTRAPPED) (sleeping...)
14117: read(0, 0xFEF6AFD8, 1024) (sleeping...)
14119: read(0, 0x0809991C, 5120) (sleeping...)
14111: waitid(P_ALL, 0, 0x08042B50, WEXITED|WTRAPPED|WSTOPPED|WCONTINUED)
(sleeping...)
14115: write(1, 0x080A462C, 5120) (sleeping...)
14119: Received signal #2, SIGINT, in read() [default]
14119: read(0, 0x0809991C, 5120) Err#4 EINTR
14109: Received signal #2, SIGINT, in waitid() [caught]
14109: waitid(P_ALL, 0, 0x080469C0, WEXITED|WTRAPPED) Err#91 ERESTART
14109: lwp_sigmask(SIG_SETMASK, 0x00000002, 0x00000000) = 0xFFBFFEFF
[0x0000FFFF]