www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT 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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=XWRjeD1/Nc3dxLYqSPZWeOuy9Jdtwd3n8HpmVkxF45pRD24hIpxEN | |
lIIOQ7D3++J9SXx8AqlOQ2Nj9UUS4mRal/06756ec7RAM1y1PcrHr7gMhLJTtH1B | |
gxnHOgYRmWqF2/atxuh/CC0ESCK6lMOb2ex5suo+eoRxPKxr4pJh44= | |
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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=hbxYdRy4FRH7Rh/pOKUlqLy/e04=; b=Tx69/av9U4927IED0+q1+d8gWquf | |
pEUSxSVWcO3U8Lrx7KH7RfyC/tocEV8FXhNzvwW+WaYz4JENupdteUdQJfQhucla | |
EL7/zRjVKo/t8mTnbRndAzg8ZkSkMVSqGnAjxvPSi5hBayRQpXBb8LHI1D3ftRFX | |
f2HgYxRkp71rvHc= | |
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 |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-4.9 required=5.0 tests=AWL,BAYES_00,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Mon, 2 Mar 2015 15:44:26 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Cygwin hangs up if several keys are typed during outputting a lot of texts. |
Message-ID: | <20150302144426.GK3213@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <20150228144019 DOT 0e4cfdb3a26bfac361b538e2 AT nifty DOT ne DOT jp> <20150228140251 DOT GA11124 AT calimero DOT vinschen DOT de> <20150302204502 DOT 39b3e03ad5084b0b5add5d10 AT nifty DOT ne DOT jp> |
MIME-Version: | 1.0 |
In-Reply-To: | <20150302204502.39b3e03ad5084b0b5add5d10@nifty.ne.jp> |
User-Agent: | Mutt/1.5.23 (2014-03-12) |
--IJFRpmOek+ZRSQoz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Takashi, On Mar 2 20:45, Takashi Yano wrote: > On Sat, 28 Feb 2015 15:02:51 +0100 > Corinna Vinschen <corinna-cygwin AT cygwin DOT com> wrote: >=20 > > Hmm, I can reproduce this even with stty -echo. The tty code is not >=20 > Some shells seem to re-enable echo when it goes back into prompt. > Please put both 'stty' and 'yes' in one command line, separating > them with semi-colon. Uh, ok, I didn't realize that. > > exactly my domain, so I'm not sure at the moment where to look. I guess > > the locking strategy in the tty code is not robust enough. Did you have > > a look into the cygwin sources in the meantime, by any chance? >=20 > To tell the truth, I have looked into the source code. > I guess the mechanism of blocking is as follows. >=20 > 1) Buffer of named pipe gets full-filled by a lot of data written > by slave side. > 2) WriteFile() in fhandler_pty_master::doecho(), which is called > from master side by key input, is blocked because the buffer > is full. > 3) If a handling to read from the pipe is in the same thread as > key input, the thread falls into deadlock. >=20 > To check buffer space before WriteFile() is one idea, > but it is not smart, I suppose... I think that's not it. For testing I added code to convert the WriteFile calls in fhandler_pty_slave::write, fhandler_pty_master::doecho and fhandler_pty_slave::write to overlapped I/O and made sure to wait for the result after the output mutex has been released. This change has no effect at all. Looks like this needs some more digging. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --IJFRpmOek+ZRSQoz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJU9HdKAAoJEPU2Bp2uRE+g7ckP/3HLR+zpsXEclMuDbCIWU0Gy AFDCY3oaW8KHrq9Rt1cVCMYW2JaA/Gv3OP4Ydi5G1cKCz+nOrkPmIHpFjCu6hTnA CLsRJy2iWGNiNmpRnstXKsMGtP2C7oDlWqAQVohNkhnnonKPyWq4gLE415AM3bzD Oj3LXj2bu6Fm4nP01diW6/MGPWFsGmfItDa3fEeGNqXxPLQW409e9bhm2dnWxtLr 8Rrwyih/hBJLt9oYMB77X410UgqEkuIFItAn/u7uibJNNGs15Bl+hdLhXNoK6f5g pFdna2slIjc9em+HMHDtrVESTs9/CGDy5AERfkB9bIGt7+iK3gSjD5NcPSzHh5jb cj88Z7FsIITptnl6SMgrGEgmxVPlNprZFwXnR+FbrceNx9/WIugkrbaHdtUNv1dI ZvtemIkUwHcKNxOGkgZZMeSyv/BDx5LOjhEzI/5YAj63cwIMnzd3SMRLVAGUTyzB rIz5gA467z3BQmXomW0+/f6JLxHvt+HhEErTEy0ykdyFagdujmDZXOKa6n/9RYA6 oiK/wDoWVCntPv2tEduGp+KzrU5Pm19mvbsSJvPBj3cAaXlAmMCIUcAIihNjotTI uovbX0fWCTCiMZydNKx2TmjUZcixjAec8UUNEWYCSh8n3mX4CE7Bg29qb85ZvYid bCW7djUwbHpA5NnaIoYT =GLCr -----END PGP SIGNATURE----- --IJFRpmOek+ZRSQoz--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |