Mail Archives: cygwin/2012/05/15/13:26:38
X-Recipient: | archive-cygwin AT delorie DOT com
|
X-SWARE-Spam-Status: | No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,RCVD_IN_SORBS_WEB,SPF_HELO_PASS,TW_RX
|
X-Spam-Check-By: | sourceware.org
|
From: | "James Johnston" <JamesJ AT motionview3d DOT com>
|
To: | <cygwin AT cygwin DOT com>
|
References: | <CA+7con=b9M5a_zuvg97L0wcdTVfLG=Ye8+0CPdPdgTNKn5JEtA AT mail DOT gmail DOT com>
|
In-Reply-To: | <CA+7con=b9M5a_zuvg97L0wcdTVfLG=Ye8+0CPdPdgTNKn5JEtA@mail.gmail.com>
|
Subject: | RE: rxvt loses output connection with non cygwin console processes
|
Date: | Tue, 15 May 2012 17:26:07 -0000
|
Message-ID: | <05f101cd32bf$d16a9d60$743fd820$@motionview3d.com>
|
MIME-Version: | 1.0
|
X-IsSubscribed: | yes
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com>
|
List-Archive: | <http://sourceware.org/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
|
Sender: | cygwin-owner AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
Delivered-To: | mailing list cygwin AT cygwin DOT com
|
I can reproduce this, although I did not try rolling back my Cygwin version.
The issue seems specific to .NET programs because they always do null
writes. However the following straight Win32 program written in C will also
reproduce the problem (basically the same program I've sent earlier on this
mailing list). So it is not specific to .NET.
#include <windows.h>
int main() {
char * test = "Hello world!\n";
DWORD written;
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
Sleep(1000);
WriteFile(h, test, 0, &written, NULL); /* causes problems */
Sleep(1000);
WriteFile(h, test, lstrlenA(test), &written, NULL);
return 0;
}
As the OP notes, I also only have this problem when running the test program
from a "GUI" terminal. It seems that any program doing a null write to
standard output (and probably standard error?) will trigger the problem.
From Windows command prompt / standard Windows console window: Running
Cygwin.bat to start Cygwin and then running ./Test.exe works fine.
From mintty.exe: Running ./Test.exe causes bash to hang. Test.exe runs to
completion and terminates, but bash doesn't get the hint. CPU usage is at
0%. If I use Windows Task Manager to kill bash.exe, then mintty.exe
correctly terminates.
From rxvt.exe: Running ./Test.exe causes bash to hang like with mintty.
Test.exe runs to completion and terminates but bash is hung. For some
reason, a thread in rxvt spins in an infinite loop, sucking 100% of a single
CPU core. The hung bash.exe doesn't use any CPU. If I use Windows Task
Manager to kill bash.exe, then rxvt.exe correctly exits its loop and
terminates.
> i have discovered something peculiar.
> I run my rxvt with the usual:
>
> C:\cygwin\bin\rxvt.exe -bg wheat -fg black -sl 5000 -e /bin/bash -ls
>
> now I try inside to run some *non* cygwin console program rxvt shows
> nothing, and reports 30% cpu consumption
>
> The actual program is executed, completes and control comes back to bash,
> but the output is not there.
> I can issue blindly other commands and see them in process list (e.g. ls
-lR /) I
> can also terminate the session with Ctrl-D or exit As long as rxvt is
running
> procexplorer reports 30% cpu usage.
>
> This started to happen today after I did update (setup.exe) The cygwin.dll
> version is 1.7.15-1 Now if I roll back cygwin.dll to 1.7.14-2 problem is
gone.
>
> The programs which triggers the problem are .net console applications
> (2.0 or 4.0).
> All cygwin binaries + java.exe work ok.
>
> The trigger program runs ok in cmd.exe with bash.
> And as a bonus, mintty has also similar problem. Cpu doesn't go as high
and
> input channel with bash is lost.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -