delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/08/06/14:49:29

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 477923857C58
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=towo.net
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo AT towo DOT net
Subject: Re: Race condition hangs on multiple mintty/tcsh? Brad Wetmore
To: cygwin AT cygwin DOT com
References: <BYAPR07MB59428411CD00101EF02400B4B64D0 AT BYAPR07MB5942 DOT namprd07 DOT prod DOT outlook DOT com>
<BYAPR07MB59421E727E0CC742E4A4DA41B6480 AT BYAPR07MB5942 DOT namprd07 DOT prod DOT outlook DOT com>
From: Thomas Wolff <towo AT towo DOT net>
X-Tagtoolbar-Keys: D20200806204835263
Message-ID: <97552ff1-8aca-cbd0-db22-d59c381ed6c6@towo.net>
Date: Thu, 6 Aug 2020 20:48:35 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.11.0
MIME-Version: 1.0
In-Reply-To: <BYAPR07MB59421E727E0CC742E4A4DA41B6480@BYAPR07MB5942.namprd07.prod.outlook.com>
X-Provags-ID: V03:K1:Z6Xvw+Rv5X8AoVTFnIwSHXNsHaIMGbVpxyjJ+bbGr3d2mbfGpvC
8tMWr065NvXOa5WpCO2qh7z4R4QvMINg26ZpMnPvMLTax3tNnJB9VmBagN3S/Pj1GyYWIZx
g3hZsN8XV6bzPDLYL+39QsZylND0jRpdFSd2j+P9eqRKOxXHRMAhov9ibhWJEhyxa+hPut6
CqPSzBWfBKy6gnrU1qblw==
X-UI-Out-Filterresults: notjunk:1;V03:K0:4o3qttjDsAo=:VvBSM5c+8/WvCugFIIZGw1
PqGT42Zjnea7m73KBsBOE9xShW6EdlqFrxa1Dbe34B5GL0AEo3KT/JH+412jjfpDzYPvbN1yy
+DWfriE0zhI/SFIXPhDm/XnA2UII9CNXsWQLZpfDiWDFci/jwCDGDB5mhtAIe2RxyU5jI8oK9
erbWxzTOZK8uOS7DQ0S3+u+9jMILaVD9jv5QJqzWk4+SzvLJMAG2htBz8KCnuNd9EpKF+iR68
WjfSRS45mDHzyYGhm4lRzJdoSKD3846Q0Z+CqnAfhBuL38GZGfLhPwZijdlQEtpaUmAeS3VEE
EjTL+clPom0lZ98N1UWj9AWelspd0QilElI2ofjtAA3M+LUnlUgQXAdRjqnHO8KrhJPtDDmQX
IKAtyRqIIHO+xVF6aQ1IVTYgJY+Rv3DxC03FuIRIkRy5eqdMW5dfFwwNo9eGtpU/WuyduwSOx
1HuiGUINyK/leXMm0KjV9dov83J47m7X9s2/EgpnCCRl+H/iRpfHB5h5h58RmBWo67TjdFQX3
bRfmRiI8naZp1Ah0qvzgqw+Jt7m5UkhrjzpI6qLHzfemRo14zbSrZbihD7tem1s+Pbf7ZRQOZ
J07Jq8fNuSJ/jW8ekUbweC7mwCnKAsit5iERXMnDU3TnDL5DpyrEvS1xd8IOwADNMeTX+eYxJ
xit+vb8lNmn8Yn6kWDcvJafHGocdKcGuEFo7BiLhsnNNniazL4g31QNARCh1vF6yDHSW1kbDx
Vdm3EVcIYl76/rjpuxB/qS2nT37fLut6PUclPVTYuVLIDiAY3ZLTaOm2lZUbhA3vql8i6yWAq
Uiy6Xfn7QTaN5bu/8Ezlw5IbkhS3/p7r/psuzYv2Xj/+J+PS9tfBIHt8XqHFi0d6I2zKPHm
X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,
SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

Am 06.08.2020 um 20:07 schrieb Brad Wetmore via Cygwin:
> [I apologize if this doesn't thread correctly:  I've been getting the digest, and can't respond directly.  And I have no idea how my name ended up in the Subject line:  Rookie Move!]
>
> More debug information, and a workaround/solution:
>
> I am running:
>
>      Windows 10 Version 1909, fully patched.
>      Cygwin v3.1.6-1
>      Openssh v8.3p1-1
>      mintty v3.2.0-1
>      tcsh v6.22.02-1
>
> The issue seems to be a race condition setting up ssh-agent, and then immediately starting up the the mintty/tcsh terminals. My guess is that something in ssh-agent is not fully setup yet, and is causing read hiccups in mintty.
>
> My startup script looks like:
>
>       #!/bin/sh
>
>      if [ -z "$SSH_AGENT_PID" ] ; then
>           echo "Starting ssh-agent"
>           eval $(ssh-agent)
>           ssh-add
>           #sleep 3
>       fi
>
>      C:/cygwin64/bin/mintty.exe -i /usr/share/mintty/icon/wsl.ico \
>           --position 0,0 --size 80x24 --fg black --bg white /bin/tcsh &
>       #sleep 1
>       ...9 more invocations deleted...
>
> Without the sleep 3 after starting ssh-agent, I see one of three conditions:
>
> 1. The mintty window is created, but immediately crashes printing a dozen or so "Use "exit" to leave tcsh" before it does. At least that I think it says, it happens fast! ;)
>
> 2. The mintty window is created, and is ready for input. On the first keypress, it prints a dozen or so "Use "exit" to leave tcsh" and crashes.
>
> 3. The mintty window is created, and hangs. No prompt.
>
> I get conditions #1/2 when I don't pause between mintty invocations.
> I get condition #2 when I pause for 1 second between mintty invocations.
>
> If I pause for 3 seconds after starting ssh-agent, then everything works as expected.
>
> Note this issue occurs only during the first setup of 10 terminals. Running it again does not tickle the issue, probably because ssh-agent is fully up.
>
> Hope this helps.
You had previously reported the issue without ssh involved. Does this 
make it reproducible more often? Otherwise let's not make things 
unnecessarily complicated.
--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019