On Wed, 19 Feb 2025 16:23:41 +0900 Takashi Yano wrote: > On Wed, 19 Feb 2025 07:59:00 +0100 > Cedric Blancher wrote: > > Good morning! > > > > Cygwin 3.6.0-0.374.g4dd859d01c22.x86_64 on Win10/AMD64/64bit: > > > > Pipe between Cygwin and non Cygwin (CRT/URT) randomly loses > > characters. We do not have a reproducer yet, but it is happening at > > least hourly on our test machines. Sometimes we only get a single > > character, and sometimes words are missing. > > > > Typically it happens like this: > > bash -c 'typeset bar="$( powershell -Command ...) ; echo "${bar}""', > > where bar does not contain the full output > > Please provide full command line that can reproduce your problem. > I can not see any pipe in above command. > > > Same happens with dash and ksh93. > > > > This does not happen between Cygwin processes, i.e. if I compile a > > program with UCRT and read from a Cygwin program it fails, and if I > > compile the same sources against Cygwin and pipe it into a Cygwin > > program it works.
I believe this issue is same as: https://cygwin.com/pipermail/cygwin/2025-February/257400.html I'm trying to reproduce the issue using the test case attached. However, I still cannot. Any additional information? -- Takashi Yano <takashi.y...@nifty.ne.jp>
#!/bin/bash cat > random1024.c <<EOF #include <unistd.h> #include <stdlib.h> #include <time.h> #define LEN 1024 int main() { unsigned char buf[LEN]; srand(time(NULL)); for (int i=0; i<LEN; i++) { do { buf[i] = (int)((double)rand()/RAND_MAX * 256); } while (buf[i] == 0 || buf[i] == '\n'); } write(1, buf, LEN); return 0; } EOF x86_64-w64-mingw32-gcc random1024.c -o random1024 while true; do a=$(./random1024) if [ $(/usr/bin/echo -n "$a" | wc -c) -ne 1024 ]; then break; fi done /usr/bin/echo -n "$a" | xxd /usr/bin/echo -n "$a" | wc -c
-- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple