X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C3EE386F023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1596723980; bh=/ZSgu6ZZ07s+/5AzJDXTA7liqrLpWPl7kDmSpPc9h/g=; h=Date:From:To:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=QNBrm9vpZDrm2QSVDWDJBQT04piyD6NA6aq31B57YajPgndqB8H87wfrsHOfR3Jky QLYvem+q6yTd8M1iuS29yhziCP74BRKWXnxexIbnBN2UdNbD/uCPXbmUKMOb5ZFoXV XGGLSyfTn1d6BnkJ2UbPp32iJhuuFK/1E0KlWQUw= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 93CF1384605A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=corinna-cygwin AT cygwin DOT com Date: Thu, 6 Aug 2020 16:26:14 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Race condition hangs on multiple mintty/tcsh? Brad Wetmore Message-ID: <20200806142614.GH1107715@calimero.vinschen.de> Mail-Followup-To: cygwin AT cygwin DOT com References: <1988bd34-7a17-e70f-bf23-0044f30c8687 AT towo DOT net> <1193403444 DOT 420395 DOT 1596669799506 AT mail DOT yahoo DOT com> <3d594543-c992-a22c-4631-f786cf34f76b AT towo DOT net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <3d594543-c992-a22c-4631-f786cf34f76b@towo.net> X-Provags-ID: V03:K1:ZmsjX2ANkgftHn8KP3MvmDzWx2/4s9Vy4NomPaTzhH35HYyG+p0 nGynhR/g4HRntKTpfh1f1pcrqX05+jtiPudxt2r5MELO/74fjUjQS7+QN+0jPTcvrP5WJfJ EKLvQs5S/x1bKa0I5xca7gG1j777VHv5bw/yOfnEEBFszNephFkbH+o7qBKFxRu3J4zqrlk fDhkFNzZ46qf0IZfB/u8Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:LsQHyN3wfzY=:ozWW8LiW/wQNzzyeMIimXe jyjOKazLBw2V0+A/EdKYB8u6ZFlbheBrI6YAFUkYg3NhnC+lGUf96/ag7zV3uEGdPF8g9mRey fqH6wyhmIxwLecToOzfmxVMM/MKSU7wmhAABJZPndsS5kI7r0MNR2XFKxtMazAHpY6FdC2m7p 0bdulA5AbdrsuXtxZcGJQ2bcPGoWtGBLgf+KrAfyk3qe8y+r0UboksvSj3uXc9UeOOxJomlio EjsUrtozFuK7qSoTe5m7Ffb0bFO9XYJAlkXffXZSY24alrA+KHeCACkAWPwV/UjwM4LV474Cf hWSkJAgJbO1jsV/LIrMX0oeR2jX04k3fsj1fFafDnfipsQnLtcNQ+RFN7kMVODiVSwXqFct0v WDoxOwl4g9w0X76lW4LOISIkMagBV4gGQaj+Jqu4es6BtePf1XyskSjVcoI3IWp7MXZ2Duo9c fg3a5umJslJ97my2CSZoW6A1HYk+LRxWYQP//uozzEcBjH6Y6rEn4ujM6zGv7w4iUnynZgerC n5fRovLqDuKv8HwA/m17IOhYPe1XHOk2uLAgu8Co6DnKWmFKUk4JUXVtKJ9vM3Zq0HzDug6lZ +bcs0UyU3f5SjhTSKB8oZG+nt0VNB3EftU5MOGljAj58Fdbu6fxAfzPmqKTK6DRdY9mEhi+ZV AwhBQQHU/6Z2qBgDNQraHvZZu0DqLTNz3R9TA58J/M4SSYEITDAN/No4Uv6E4+R91vGT6khIR m6Hfs1dY1xCC5wwFTgkmZzuil9mjZxhIFo4gmZ8nu9/tQDRBQEfFvTUTJuIg83bYDDNJ2N5kq X4ce1rmzF5WRybcGXWjXN8UugVNCzirKXWUBD+7LzWQFQ/4UtDjGiWsymmjttPKBcU/L8E+um jFjRv+J2b8+C7QfT508w== X-Spam-Status: No, score=-100.0 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="utf-8" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 076EQmfG004324 On Aug 6 15:31, Thomas Wolff wrote: > Am 06.08.2020 um 13:46 schrieb Thomas Wolff: > > Am 06.08.2020 um 01:23 schrieb Kevin Schnitzius via Cygwin: > > > On Wednesday, August 5, 2020, 06:56:48 PM EDT, Thomas Wolff > > > wrote: > > > > Am 04.08.2020 um 12:02 schrieb Thomas Wolff: > > > > > Am 04.08.2020 um 00:13 schrieb Brad Wetmore via Cygwin: > > > > > > Hi, > > > > > > > > > > > > I generally kick off multiple (10) mintty sessions, and place them > > > > > > around the screen. > > > > > > > > > > > > C:/cygwin64/bin/mintty.exe -i /Cygwin-Terminal.ico \ > > > > > --position @3 --position 120,0 --size 80x71 /bin/tcsh & > > > > > > C:/cygwin64/bin/mintty.exe -i /Cygwin-Terminal.ico \ > > > > > > --position @3 --position 715,0 --size 80x45 /bin/tcsh & > > > > > > C:/cygwin64/bin/mintty.exe -i /Cygwin-Terminal.ico \ > > > > > > --position @3 --position 715,660 --size 80x24 /bin/tcsh & > > > > > > > > > > > > Within the last 6 months or so, about 2-3 of them would hang and > > > > > > either mintty/tcsh would not start. I put a "sleep 1" in between each > > > > > > invocation and that seemed to take care of it. > > > > > > > > > > > > With the latest cygwin update, about 8 of them just hang even with > > > > > > the sleep 1. I put in a "sleep 2", and now everything is coming up > > > > > > again. > > > > > > > > > > > > Not sure if this is a mintty or tcsh issue, but just wondering if > > > > > > others are seeing this before I start trying to debug this. > > > > > I can reproduce such behaviour with /bin/bash (easy cross-check), and > > > > > in fact the shell is running in that case (easy test via `echo > > > > > > .log`), so I have a vague and unpleasant suspicion it might in fact be > > > > > related to mintty although I have no idea how that would happen. To be > > > > > analysed. > > > > When in this state, on the pty from which mintty receives child process > > > > output, select() does not report a ready for reading condition; > > > > could it > > > > be related to the recent poll/select patch? I could not reproduce it in > > > > cygwin 3.0.7. > > > for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do > > > mintty  -i /Cygwin-Terminal.ico  --position @3 --position 120,$i > > > --size 80x24 /bin/bash & done > > > > > > This does not fail for me.  Nor does it fail from cmd or powershell > > > using a script. > > > > > > I tried 3.1.4 and 3.1.6 on Windows 10.  I tried up to 100 instances > > > of of mintty... > > Thanks for testing. It is in fact hard to reproduce, maybe also > > depending on system load (speculating). > > I could reproduce one case of one of three terminals being unresponsive > > also with xterm. > And it also happens if I drop select() from mintty (and use just > non-blocking read()). > > Does anybody familiar with pty/select or recent changes have any idea? > ? Something with the pseudo console? Can you test w/o pseudo console code, just to check? Other than that we probably need some bisecting to find the cause. Corinna -- Corinna Vinschen Cygwin Maintainer -- 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