From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outgoing-yousee-5.gl-mut-gbl.as8677.net (outgoing-yousee-5.gl-mut-gbl.as8677.net [193.201.76.65]) by sourceware.org (Postfix) with ESMTPS id 426413857C42 for ; Mon, 3 Aug 2020 09:10:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 426413857C42 Received: from filter.yousee.as8677.net (localhost [10.26.226.131]) by mwumf0307.yousee.as8677.net (SMTP Server) with ESMTP id 4BKsXz1nS1z18VT9g for ; Mon, 3 Aug 2020 11:10:11 +0200 (CEST) Received: from mwumf0307 (front03-smtp-abo-yousee.worldlinemail.net [10.26.226.131]) by mwumf0307.yousee.as8677.net (SMTP Server) with ESMTP id 4BKsXz1JbKz18VT9Y for ; Mon, 3 Aug 2020 11:10:11 +0200 (CEST) Received: from mwumf0307 (front03-smtp-abo-yousee.worldlinemail.net [10.26.226.131]) (Authenticated sender: donpedro@tdcadsl.dk) by mwumf0307.yousee.as8677.net (SMTP Server) with ESMTPA for ; Mon, 3 Aug 2020 11:10:10 +0200 (CEST) Message-ID: <9c44f4351d459a2ba8d27c65bf71679208cb13d6.camel@tdcadsl.dk> Subject: Re: Synchronization problem with posix_spawn From: Peter Dons Tychsen To: cygwin@cygwin.com Date: Mon, 03 Aug 2020 11:10:10 +0200 In-Reply-To: <20200731081025.GB460314@calimero.vinschen.de> References: <864b3031-9fc8-beb3-ba7c-1ade4c31a288@cornell.edu> <20200730115913.GL4206@calimero.vinschen.de> <20200730171723.GA460314@calimero.vinschen.de> <86051625-646d-065a-8543-1c3086411d3d@cornell.edu> <20200731081025.GB460314@calimero.vinschen.de> User-Agent: Evolution 3.36.4 (3.36.4-1.fc32) MIME-Version: 1.0 X-yse-mailing: LEGIT X-yse-spamcause: OK, (0)(0000)gggruggvucftvghtrhhoucdtuddrgeduiedrjeeggdduudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfvffevpdggtfgfpffufgeuufevtffkuefgpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkffuhffvffgjfhgtfggggfesthejredttderjeenucfhrhhomheprfgvthgvrhcuffhonhhsucfvhigthhhsvghnuceoughonhhpvggurhhosehtuggtrggushhlrdgukheqnecuggftrfgrthhtvghrnheptdeigfegueduveekvdegfeeufeeihfegledvkeevieeiheffiedtkeeuiedtjeffnecukfhppedutddrvdeirddvvdeirddufedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghlohepmhifuhhmfhdtfedtjedpihhnvghtpedutddrvdeirddvvdeirddufedupdhmrghilhhfrhhomhepughonhhpvggurhhosehtuggtrggushhlrdgukhdprhgtphhtthhopegthihgfihinhestgihghifihhnrdgtohhm Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, 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-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: Mon, 03 Aug 2020 09:10:14 -0000 Hi all, On Fri, 2020-07-31 at 10:10 +0200, Corinna Vinschen wrote: > Oh well. I did a quick test with your new testcase (thanks for > that!) > and it seems to be a bit more complicated than I anticipated > yesterday. > The parent-child relationship between the processes is broken. I > have > to think a while about this problem, stay tuned. I also have seen this problem. I propose a different solution however. Why no get rid of the call to fork() all together. One of the things bogging down performance on larger setups is the calls to fork() are is inherently slow and should be avoided at all costs. Instead why don't we just call spawn(vpe) instead, which is quite stable and fast. This would give a _huge_ boost to e.g. larger build jobs. Make supports posix_spawn, but it does not help on cygwin at it just calls back into fork(). The current implementation is probably something that makes sense on BSD/linux as fork() is lightning fast there. Just an idea... /pedro