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

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD1A73857C6B
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1596737270;
bh=XN000AIfLa9QjysmwRnVobXO6kVMgGYiN4OKjhViefY=;
h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=v2iXutW/Alidpjsh+eUtIWTRh+jKfEyyaC/n1ssaeABzUhMcRIReOLrpbpRpuEb/r
5Zt/9ZwykBo+47FEHJrGg84j8QO3ZWrcGEzoPDxEnijHEQQfijG/7Z+/QlVZFqCTed
6jeHOBcvZggIQQN+CR27yt1FfJqq3FW15XQhBPHo=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6E4333857C58
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=Xvy20Y+ioMkrmm7wfmh6jM6A55tBsuRWuuOulCAanjpwW8cb9uQy1cJuOpimbAnBs+AGcTxDwAvFDtrEG//xn9h8R2LtpnIOQfilo5m5DHolL8iQjv74zJ0+0TPqH4mln5c3APivNaWio7XP7sTJBGTi2YZmPP7CUd3NGEa0nqbUim4wqPUTcnDK99t76bZoBxwZ34JMz4jIWRVA2Th5s1ZnbKgaNoodnkSHt5c6DPUB5iwXO799mnZRofW3qF858enlTihlLpw3P7fN5acUS5SCPiMsDKqeqW+8Fp/uG87XtSGeKbUZq5YnIpIjNgWzCv+2ZUmzb3Bn/S8yYbP4+Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=bQVMjEKbGUucBNCOu14dw0Em73UYpxS3FAgb6rjyXHQ=;
b=WPwo2sEfnguADuu/POxhXkSmB4KmPNhhEOOZ9XFsc1Ey0X86hzgvUt0/f7O4CMzdFdtxj3JkygiQa0rJkmWl4Ufu43mhdT2ZOXWfUcoUxXBhdfnvn3p8CByT/0aeGY4BSEYm5BLfLb9usWDqaZvkuq/IsZ//kX7vOFE/zI8/ll7wkmp25iJPfDyokxASTpTYM6Hvvl1n1IaMyIZJ5XJzn8CNrg8h8w3Qv0aanVcXyU9cQnwHQKf5D9qgA9+/k5SN3YS8jjF3I5cGl4l69AOQH6+81TUYgH3YxjL8R5zn9BBYcKMUZfo9BGGGXaI7BBn7a/APL9wIQIAbGa1LtYuz1w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
dkim=none; arc=none
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: Race condition hangs on multiple mintty/tcsh? Brad Wetmore
Thread-Topic: Race condition hangs on multiple mintty/tcsh? Brad Wetmore
Thread-Index: AQHWaeMcEUs4G39yG0GOUgNgBeXLv6krY4v+
Date: Thu, 6 Aug 2020 18:07:45 +0000
Message-ID: <BYAPR07MB59421E727E0CC742E4A4DA41B6480@BYAPR07MB5942.namprd07.prod.outlook.com>
References: <BYAPR07MB59428411CD00101EF02400B4B64D0 AT BYAPR07MB5942 DOT namprd07 DOT prod DOT outlook DOT com>
In-Reply-To: <BYAPR07MB59428411CD00101EF02400B4B64D0@BYAPR07MB5942.namprd07.prod.outlook.com>
Accept-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-incomingtopheadermarker: OriginalChecksum:730E2289EA817F1E7A29B9849E7F2944106046B6465D64BCE7A570435635465A;
UpperCasedChecksum:307FEA6C6992083E0926C912201D1F6F45124E39C0107BBCEA9A56F2BE832226;
SizeAsReceived:7105; Count:44
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [D2UK54T2Yyk2sG8wvVr+vG4K51eB1Teqykj24UpeBHMWHM1Y0Rvga9T3Btt/FIIu4WkVoZ9fPdk=]
x-ms-publictraffictype: Email
x-incomingheadercount: 44
x-eopattributedmessage: 0
x-ms-office365-filtering-correlation-id: 3bb9326b-cbad-4ea2-83a4-08d83a339edc
x-ms-traffictypediagnostic: BN8NAM12HT115:
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: aY9lbYNluv6JjOpDkTfvXkOou0n5yWIjNG98Y35EXw86lByK4FwdD1NR/O1bOcib5kKKVY4/QKQuh74HdjNVx1Adpvluk6WARJjNrBy3kF4JoA8BeSASVAglSlGiAbD/IuP0sRqb7fIkz/T75aCjkkzbyg7X3eD3tc+N+8SG3OXqu95TgItn6P2UCzoV1TAK7Rs2rdBX0zejn3J9RghUMw==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:0; SRV:;
IPV:NLI; SFV:NSPM; H:BYAPR07MB5942.namprd07.prod.outlook.com; PTR:; CAT:NONE;
SFTY:; SFS:; DIR:OUT; SFP:1901;
x-ms-exchange-antispam-messagedata: pJ91uLrlXKos6F4zR51VKBUXLE81dmEPh9FLxHYLlBWw0vtrrG0djaxpfoPk/eO/ciXd9wJcffwLtlHV0hl4dmJAilaBjcEu702eOCap1M3U/JOTtZOoTQTrCduhbN1UuElizrTNpx+Wo0TFs6VK74B1nL+cb4mzI7j0aCXW5tz2tLnxvwTY3wzEiKpa1A3JXN97BQ4yR2+SRZspns4Sdg==
x-ms-exchange-transport-forked: True
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-AuthSource: BN8NAM12FT061.eop-nam12.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-Network-Message-Id: 3bb9326b-cbad-4ea2-83a4-08d83a339edc
X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Aug 2020 18:07:45.5010 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8NAM12HT115
X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS,
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-Content-Filtered-By: Mailman/MimeDel 2.1.29
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-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>
From: Brad Wetmore via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Brad Wetmore <bradfordwetmore AT hotmail DOT com>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

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

Brad

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