X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DFBA53858D37
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
Subject: Re: Race condition hangs on multiple mintty/tcsh? Brad Wetmore
To: cygwin@cygwin.com
References: <BYAPR07MB59428411CD00101EF02400B4B64D0@BYAPR07MB5942.namprd07.prod.outlook.com>
 <ff57a2c8-6753-02d6-7a85-9657d70bc897@towo.net>
 <1988bd34-7a17-e70f-bf23-0044f30c8687@towo.net>
 <1193403444.420395.1596669799506@mail.yahoo.com>
From: Thomas Wolff <towo@towo.net>
X-Tagtoolbar-Keys: D20200806134608208
Message-ID: <cc296c5f-c958-21bf-3a14-9584180de591@towo.net>
Date: Thu, 6 Aug 2020 13:46:08 +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: <1193403444.420395.1596669799506@mail.yahoo.com>
X-Provags-ID: V03:K1:3izd4MfYF2ksBBacKN18CJD3Y+MhDEDQY06MIvNE2eJT+CRGcfj
 YnTu6nlfJPip/nJkCRBootmbXuZ1rICCLYw2gMKOMY4OTSedt4EVYnJBJULMn+qQRkpPFhU
 sOJ4m/llaGLc7Q5IZbAshmXgGiGLdqCwBrg81VqqmDJQQIWZxyvlK0K9Toy/t7YvyqqPcRq
 e8wukOmdfgguK9BYdT1Ow==
X-UI-Out-Filterresults: notjunk:1;V03:K0:+iQ0j8hsNts=:zVbrXlY5Ujvh+XNUk3v/AS
 7ScvEKwYoZeH3BnIlonCT5s7r9oSFfgXN5QjDwR0405flow8kLoF7gpp8npN3yvWqdGt+lAtA
 42EbneUCocv1HdeheOspeIj8PQeLPWXJ7fmeDnomhVrsWhVgbZBVrp5Cb4EGudLieY3FDM562
 DupCCz73fT4RWQf9qMAbBUXjFTV6x/qCibW16J8KTwe1pIPYVJL9b5Vis7ZRcI4cU8O7BJloL
 N7g+4OcSKRcS/TAz0oJTyO/kWHlzHLaSXuPZst2rJwGiqMKUSvT4R/TVNXR4SY3hZ+l/n9t45
 rRJ9PcWcK/gw+qkj7iVPgQ5Z7rGwxM22iFL6ojXY03kbZlWWlgmsTdPUg/8+HbHjSmiPEbqlt
 dTC382T6uSeXS20qKq1TFEi9cHL4dLs9BQ82QLzRcMP0iGm35+RkhlwMz5Gs28D+qZMDQN8iM
 RS+X/eeOex77X5KDK9o5Bq6/k/z4MKy2+46apSsoloouQWQW7mU0xw6vXY1x80Gb9k5Hk38B1
 4j+U3BosTOXttJZef5rg3SiG6f3p9lqLXT+YzJlPtfKfL3njicGYasQnbmkvt0WwXoHQrkHPc
 QI3hDeChPfuXQo+kxAO0+HyPUvSaETPOqHSO3PV6SrjDc1x4wMAqCiZQ2MZonBsIpsCuUomiT
 xbAp+z0tqYqGwkKucN31igMtEIurk7j5rsZMVquXdL+b8Rqm74XEHeArrcImWpVV9Dhp4Nrs7
 HwR0pwTsdWEpxpBaSsca9fzyHdKVsdA2QeA0CMDQ1GC5mjwhywTbvKzTISwsvpDUlNVF795kX
 hCeoB6/N04HriiBo+UCWuDOja4wbDY7iih9yjZ5o7xZsitjNJXkYBtph4dBGPG14ZYVqPHD
X-Spam-Status: No, score=-7.4 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 <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces@cygwin.com
Sender: "Cygwin" <cygwin-bounces@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 076BkhnS014694

Am 06.08.2020 um 01:23 schrieb Kevin Schnitzius via Cygwin:
> On Wednesday, August 5, 2020, 06:56:48 PM EDT, Thomas Wolff <towo@towo.net> 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.
Does anybody familiar with pty/select or recent changes have any idea?
Thomas
--
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

