delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Date: | Mon, 8 Mar 2010 14:56:57 -0500 |
From: | Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com> |
To: | "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>, |
"Schmidt, Oliver" <oliv DOT schmidt AT sap DOT com> | |
Subject: | Re: Cygwin 1.7: Concurrency Issue with Shared State Initialization |
Message-ID: | <20100308195656.GA17237@ednor.casa.cgf.cx> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>, "Schmidt, Oliver" <oliv DOT schmidt AT sap DOT com> |
References: | <B10B50309DC54D45A855FD66F56015F71D07C78CAE AT DEWDFECCR03 DOT wdf DOT sap DOT corp> |
MIME-Version: | 1.0 |
In-Reply-To: | <B10B50309DC54D45A855FD66F56015F71D07C78CAE@DEWDFECCR03.wdf.sap.corp> |
User-Agent: | Mutt/1.5.20 (2009-06-14) |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On Mon, Mar 08, 2010 at 06:35:02PM +0100, Schmidt, Oliver wrote: >We call from a non-Cygwin shell a non-Cygwin gnumake. The Makefile >rules mostly call a non-Cygwin C compiler and linker. However Makefile >rules calling gawk, cat, cp, echo, mkdir, rm, sed, sh, ... are calling >Cygwin executables. > >If (and only if) we run gnumake in this scenario with the --jobs option >to perform a parallel build then we experience sporadic failures of the >Cygwin executables. Fortunately these failures still happen now and >then when running them with strace. So it was quite easy to find out >that the shared variable installation_root isn't correctly initialized >when things go wrong. > >Checking out src/winsup/cygwin/shared.cc I stumbled over these lines > > /* Initialize installation root dir. */ > if (!installation_root[0]) > init_installation_root (); Yeah, that's one place that's missing synchronization. I'll check in something tonight which attempts to solve this problem. It's a somewhat tricky problem because adding a mutex here would slow down every invocation of a cygwin program and we don't want to add to the "Why is Cygwin so slow???" scenarios if we can help it. cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |