From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) by sourceware.org (Postfix) with ESMTPS id E7E203844046 for ; Thu, 6 Aug 2020 13:31:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E7E203844046 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=towo.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo@towo.net Received: from [192.168.178.45] ([95.90.245.244]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MuluP-1kvVIZ1Qcl-00rs5S for ; Thu, 06 Aug 2020 15:31:28 +0200 Subject: Re: Race condition hangs on multiple mintty/tcsh? Brad Wetmore To: cygwin@cygwin.com References: <1988bd34-7a17-e70f-bf23-0044f30c8687@towo.net> <1193403444.420395.1596669799506@mail.yahoo.com> From: Thomas Wolff X-Tagtoolbar-Keys: D20200806153124265 Message-ID: <3d594543-c992-a22c-4631-f786cf34f76b@towo.net> Date: Thu, 6 Aug 2020 15:31:24 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:SbG61QRoMMF0tGmi694o44GxenvBhFJiaMJPpCVpEuoazP+lOit GxlcdT5ibn9DmFwpR6LRYX6+AflevrDZXfo8JgapsXppiJ4SABDLCd7693KWvwSPAjCsjSj GGRC4Xi3ojxX7/mTQSmKBmDdkFv1sFVkH6giB+xb3gJDp8JknmfT9/nZk9+m98eKMunhiSb BrNbbvnlin+aynqf0Cuig== X-UI-Out-Filterresults: notjunk:1;V03:K0:MWE4rsq12gM=:dxajprYjExK9J3OjuoRUyx YxPAnS057URG/IlQHQogBjM0jbQ9q6+C7LDwpTmVKt1MO5huAFbkOAk2rvGl6OGgLchFTaRtM yq8tVZRzXryPL4LW8OZ89eq5LyJZ1jwunuEjOebRaTQ8eNOP2A6AfHqler1CDnZ/4xm6dYVT1 VRqlF37Xi+ty2sy+WxOH+6AmYc1Ctmav8doBneWzBKAHAjjYXRtkRfaAaRYYUOhC+5zmrEiQf K7yoHP5Aay+rhrjRw5178cSTubC3LV7nM4A457LfjSqq3Scma3MVLpgcWwoO2afWx3oLBOKlG TIkw53a+kSdZfVZX0Ju4sLivXBnY2EVlfHZMRDgYMJkeeaxiyXUNi2+jZ6cWYjasS5Wgo29yD zdJIvq18TYpq8BOzgN2MljaVrMDm8eJqG9qUdmvtC3PhkWVTEkMBdicmxEYX54cyTalFeTqhh ZzkOzjQJU9vb/tfXTvgY2fgwsXUnHGFmx54N0U/mjtOFAyzWRLmua57uAKhUOfSPy5HmU2vEX 9SGyVMSzQQI5JyGOusvv3oB/ZO+aLExyfNSYdXIomZvc79bsNvXTDcvwhtLD6hEs6V/J5oaG0 LwPY0S1LpoDO9tZUtVIZ440vbkSOfb0e0opcedyBGsX8dhFSMLHw2W4ghsLz0cIXM0zPg1TCi 6WBNnD8lrrKBVV5KlH7XFlvAm/oRXAe3GYnAPhfvXKD7rlYebj2Lw6UBF+RcTmoh8+hz7/RTc KptrB78bfQk1mCLJdOwkyZrIuds0UkWJ84hl0MEwV7KiQwrYWT4PzNS7M1jz4fcqhuhbLpMj6 KZQa624O8/AfewQhBSY+CPJG0rJg8HG30v51iRSKLeFBaZiWMvFh3MAkrtgnUIiZe5g+ek0 X-Spam-Status: No, score=-7.3 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@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 13:31:31 -0000 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? ? > Thomas