X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:in-reply-to:to:from:message-id:subject:date
	:mime-version:content-type:content-transfer-encoding; q=dns; s=
	default; b=HelKZhODEUEP24mn/7bKTJYPe/C2cDP46T4nzk+kOjUVo4ZDI5vpe
	/fYjzJrgRLnwpRByvv6OAvy/E0yxoyLwiOXmvJO52wsyLpXOPGWQO2yhfNNwHP4I
	X176dHwG8VQLCLGockxFvvU4Lg6StXqtRJ7e7IXpLs7WXREDGzmBPU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:in-reply-to:to:from:message-id:subject:date
	:mime-version:content-type:content-transfer-encoding; s=default;
	 bh=lgAQL7dAIEvGG6jD/3iqwbvrbBY=; b=gode6Xt84eUdJlowhPZ84On4txP2
	2emKTeV8DJD9NiIzCGM+RuKx9lKVixKi3BchLui6ujEQZvbKNDNaCkaZZvfzRKdH
	xK+o3uy1PjbaapQRgM3o5XkEv7808dfGNNopWQFWEjSzYQ0Ht9ovQrdsXGTC4ra4
	tK2AIYlvog0Zkl8=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2
X-HELO: www.hepe.com
in-reply-to: <565214E5.7030507@towo.net>
to: cygwin@cygwin.com
from: "Aaron Digulla" <digulla@hepe.com>
message-id: <1cb3-56530100-91-40254200@154582263>
subject: =?utf-8?q?Re=3A_Windows_locks_up_when_pressing_Ctrl+S_while_native_process_writes_to_terminal?=
X-Forward: 46.140.173.26
date: Mon, 23 Nov 2015 13:04:50 +0100
MIME-Version: 1.0
content-type: text/plain; charset="utf-8"
User-Agent: SOGoMail 2.3.3
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id tANC58nI029019


Am Sonntag, 22. November 2015 20:17 CET, Thomas Wolff <towo@towo.net> schrieb:

> > I found a consistent bug that happens every time:
> > ...
> > - Press Ctrl+S to stop the output in the terminal
> >
> > Bug #1: It's not possible to unfreeze the output in the terminal with Ctrl+Q. It just stays "stuck"
> I confirm this effect and you don't need a fat application to
> demonstrate it. With this Windows cmd script loop.bat:
> @echo off
> set n=0
> :loop
> echo %n%
> echo %n% >> .log
> set /A n=%n% + 1
> ping 127.0.0.1 -n 2 > nul
> goto loop
>
> run it: ./loop.bat, then use ^S; the script will actually continue to
> run but will not show any more output in a pty-based terminal (works in
> Cygwin console).

Okay. So it seems to be a consistent bug which only affects me. What happens next?

> > Bug #2: After a few seconds, the disk starts to trash. ...
> Thrashing? Might be caused by the apparently-stopped application going
> into some endless-loop activity.

I feel that Windows runs out of memory but I have no idea why. If cygwin uses the standard OS services to create pipes between processes, there will be a 4KB buffer which the native process can fill and that's it. It should then block in a call to `write()` (or the equivalent) and not be able to do anything.

I have about 2-3GB free RAM, so even if pipe would buffer all the output, it shouldn't be able to make Windows run out of memory. The Maven build reads and write files but all in all, we're talking 40-60MB tops.

I'm a bit reluctant to run more tests since it takes my computer so long to heal (it's actually my company's  computer, so I'm supposed to work, not wait for it to heal after testing a cygwin bug :-).

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://blog.pdark.de/


--
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


