* rxvt loses output connection with non cygwin console processes
@ 2012-05-15 16:59 Pawel Jasinski
2012-05-15 17:26 ` James Johnston
2012-05-16 1:59 ` Christopher Faylor
0 siblings, 2 replies; 7+ messages in thread
From: Pawel Jasinski @ 2012-05-15 16:59 UTC (permalink / raw)
To: cygwin
hi,
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.
--pawel
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: rxvt loses output connection with non cygwin console processes
2012-05-15 16:59 rxvt loses output connection with non cygwin console processes Pawel Jasinski
@ 2012-05-15 17:26 ` James Johnston
2012-05-15 17:30 ` James Johnston
2012-05-16 1:59 ` Christopher Faylor
1 sibling, 1 reply; 7+ messages in thread
From: James Johnston @ 2012-05-15 17:26 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: rxvt loses output connection with non cygwin console processes
2012-05-15 17:26 ` James Johnston
@ 2012-05-15 17:30 ` James Johnston
0 siblings, 0 replies; 7+ messages in thread
From: James Johnston @ 2012-05-15 17:30 UTC (permalink / raw)
To: cygwin
I apologize, I forgot to mention that I tried both with and without the new
"pipe_byte" CYGWIN option. It made no difference.
To OP: you'll definitely want to look into using the new "pipe_byte" option
since you are working with non-Cygwin processes. See the thread I started
late last month titled "Cygwin passes through null writes to other software
when redirecting standard input/output". If you redirect standard input for
a non-Cygwin program, you'll be affected.
> 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.
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: rxvt loses output connection with non cygwin console processes
2012-05-15 16:59 rxvt loses output connection with non cygwin console processes Pawel Jasinski
2012-05-15 17:26 ` James Johnston
@ 2012-05-16 1:59 ` Christopher Faylor
2012-05-16 10:58 ` Ken Brown
2012-05-16 16:15 ` James Johnston
1 sibling, 2 replies; 7+ messages in thread
From: Christopher Faylor @ 2012-05-16 1:59 UTC (permalink / raw)
To: cygwin
On Tue, May 15, 2012 at 06:59:14PM +0200, Pawel Jasinski wrote:
>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
This problem should be fixed in the next snapshot.
Ken Brown, if you're reading this, would you mind confirming that the
problem with emacs and gdb -mi that I recently fixed is has not been
resurrected?
(If you're not reading this then I'd still appreciate confirmation)
cgf
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: rxvt loses output connection with non cygwin console processes
2012-05-16 1:59 ` Christopher Faylor
@ 2012-05-16 10:58 ` Ken Brown
2012-05-16 14:10 ` Christopher Faylor
2012-05-16 16:15 ` James Johnston
1 sibling, 1 reply; 7+ messages in thread
From: Ken Brown @ 2012-05-16 10:58 UTC (permalink / raw)
To: cygwin
On 5/15/2012 9:59 PM, Christopher Faylor wrote:
> On Tue, May 15, 2012 at 06:59:14PM +0200, Pawel Jasinski wrote:
>> 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
>
> This problem should be fixed in the next snapshot.
>
> Ken Brown, if you're reading this, would you mind confirming that the
> problem with emacs and gdb -mi that I recently fixed is has not been
> resurrected?
It's still fixed.
Ken
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: rxvt loses output connection with non cygwin console processes
2012-05-16 10:58 ` Ken Brown
@ 2012-05-16 14:10 ` Christopher Faylor
0 siblings, 0 replies; 7+ messages in thread
From: Christopher Faylor @ 2012-05-16 14:10 UTC (permalink / raw)
To: cygwin
On Wed, May 16, 2012 at 06:57:55AM -0400, Ken Brown wrote:
>On 5/15/2012 9:59 PM, Christopher Faylor wrote:
>> On Tue, May 15, 2012 at 06:59:14PM +0200, Pawel Jasinski wrote:
>>> 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
>>
>> This problem should be fixed in the next snapshot.
>>
>> Ken Brown, if you're reading this, would you mind confirming that the
>> problem with emacs and gdb -mi that I recently fixed has not been
>> resurrected?
>
>It's still fixed.
Thank you for confirming.
cgf
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: rxvt loses output connection with non cygwin console processes
2012-05-16 1:59 ` Christopher Faylor
2012-05-16 10:58 ` Ken Brown
@ 2012-05-16 16:15 ` James Johnston
1 sibling, 0 replies; 7+ messages in thread
From: James Johnston @ 2012-05-16 16:15 UTC (permalink / raw)
To: cygwin
> On Tue, May 15, 2012 at 06:59:14PM +0200, Pawel Jasinski wrote:
> >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
>
> This problem should be fixed in the next snapshot.
Confirmed fixed with both my C test program and a .NET program too.
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-05-16 16:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-15 16:59 rxvt loses output connection with non cygwin console processes Pawel Jasinski
2012-05-15 17:26 ` James Johnston
2012-05-15 17:30 ` James Johnston
2012-05-16 1:59 ` Christopher Faylor
2012-05-16 10:58 ` Ken Brown
2012-05-16 14:10 ` Christopher Faylor
2012-05-16 16:15 ` James Johnston
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).