public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [1.7] Pipes intermittently lose data on Cygwin 1.7
@ 2008-12-20  9:15 Lawrence Mayer
  2008-12-20 20:31 ` Lawrence Mayer
  0 siblings, 1 reply; 14+ messages in thread
From: Lawrence Mayer @ 2008-12-20  9:15 UTC (permalink / raw)
  To: cygwin

Pipes intermittently lose data on Cygwin 1.7.0-35 and -36. This bug 
appears generic to pipes under Cygwin 1.7 and not limited to any 
particular app.

To reproduce this bug, create a ~ 5 MB text file foo.

tr \32 \0 < foo | tr \0 \32 > bar

should make bar = foo. But intermittently, bar is truncated and missing 
the end of foo. You can quickly tell by monitoring the file sizes: 
intermittently bar is smaller than foo.

The bug appears generic to pipes under Cygwin 1.7, e.g.

sed s/\x1a/\x0/ foo | sed s/\x0/\x1a/ > bar

sort foo | tr \32 \0 > bar

cat foo | tr \32 \0 > bar

tac foo | tac > bar

cat foo | cat | cat > bar

all cause intermittent loss of data, where bar is sometimes truncated 
and missing the end of foo (or beginning of foo in tac example). (The 
last example contains 2 pipes, since cat foo | cat > bar appears more 
resistant to this bug and only occasionally loses data.)

This bug is difficult to reproduce on my system when foo < ~ 3 MB. Hence 
the recommendation above for foo ~ 5 MB.

This bug is present in Cygwin 1.7.0-35 and 1.7.0-36. I have not tested 
earlier 1.7 builds.

This bug appears new to Cygwin 1.7 and not present in Cygwin 1.5.25-15.

Greetings,
Lawrence

Versions tested:
Cygwin 1.7.0-36 and 1.7.0-35 with coreutils 7.0-2 and sed 4.1.5-2
Cygwin 1.5.25-15 with coreutils 6.10-2 and sed 4.1.5-2

OS: Windows Server 2003 sp2 32-bit. Cygwin installed on NTFS drive C:.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-12-23 20:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-20  9:15 [1.7] Pipes intermittently lose data on Cygwin 1.7 Lawrence Mayer
2008-12-20 20:31 ` Lawrence Mayer
2008-12-22 17:32   ` Christopher Faylor
2008-12-22 18:32     ` Lawrence Mayer
2008-12-22 18:47       ` Christopher Faylor
2008-12-22 20:07         ` Lawrence Mayer
2008-12-22 22:41           ` Christopher Faylor
2008-12-23  0:28             ` Lawrence Mayer
2008-12-23 19:00               ` Christopher Faylor
2008-12-23 20:32                 ` Lawrence Mayer
2008-12-23  0:49           ` Allan Schrum
2008-12-23  2:36             ` Lawrence Mayer
2008-12-23  3:03               ` Allan Schrum
2008-12-23  6:43                 ` Lawrence Mayer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).