From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12olkn2090.outbound.protection.outlook.com [40.92.23.90]) by sourceware.org (Postfix) with ESMTPS id 6E4333857C58 for ; Thu, 6 Aug 2020 18:07:47 +0000 (GMT) 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 Received: from BN8NAM12FT061.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc66::4e) by BN8NAM12HT115.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc66::343) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.10; Thu, 6 Aug 2020 18:07:45 +0000 Received: from BYAPR07MB5942.namprd07.prod.outlook.com (2a01:111:e400:fc66::44) by BN8NAM12FT061.mail.protection.outlook.com (2a01:111:e400:fc66::175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.10 via Frontend Transport; Thu, 6 Aug 2020 18:07:45 +0000 Received: from BYAPR07MB5942.namprd07.prod.outlook.com ([fe80::2928:516b:ace1:976f]) by BYAPR07MB5942.namprd07.prod.outlook.com ([fe80::2928:516b:ace1:976f%5]) with mapi id 15.20.3261.019; Thu, 6 Aug 2020 18:07:45 +0000 From: Brad Wetmore To: "cygwin@cygwin.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: References: In-Reply-To: Accept-Language: en-US Content-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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2020 18:07:49 -0000 [I apologize if this doesn't thread correctly: I've been getting the diges= t, 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 immed= iately starting up the the mintty/tcsh terminals. My guess is that somethin= g in ssh-agent is not fully setup yet, and is causing read hiccups in mintt= y. 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 o= r so "Use "exit" to leave tcsh" before it does. At least that I think it sa= ys, it happens fast! ;) 2. The mintty window is created, and is ready for input. On the first keypr= ess, 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