delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/05/23/18:30:26

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:in-reply-to:message-id
:references:mime-version:content-type; q=dns; s=default; b=PM+Vd
AURe+uCSEwvYYEzDal6tTib8/tBiIm9v3HZp2bHUPNNUROA197cf4sDkISI+V8gr
bHftWTCCC+Hd/QgGSUOpzAVtUGglm1q8VS89H4EEuqZxm3JBawgtnfCxlzVCEyGb
cPyP8bOUaUwdOHOm5mvcXr+QdlB5UiSqG8YKOM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:in-reply-to:message-id
:references:mime-version:content-type; s=default; bh=FgLb9lzko0T
7d7AcgNdG8CaV3do=; b=jFlfk10GPfHvIN/Chf2M+8YNbBjVY8/hnXKu14GnO6q
L7m30R2lIS6FcgeuoR7O+CBqdgTvMXeCDqq7hDMDRkvJovB6Szi2Kdld5Nr16zhl
EPfCipMqzq4LSHsM8OdrAsyVOIXPpLqOfGpZ8J3X9QxP0UgjOFM2PK4OSsmu19N0
=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,SPF_PASS,TO_NO_BRKTS_PCNT autolearn=ham version=3.3.1
Date: Thu, 23 May 2013 17:29:56 -0500 (CDT)
From: Satish Balay <balay AT fastmail DOT fm>
To: cygwin AT cygwin DOT com
Subject: Re: make, PATH & "Win32 error 487"
In-Reply-To: <20130523211458.GA12260@calimero.vinschen.de>
Message-ID: <alpine.LFD.2.03.1305231721580.1918@mcs.anl.gov>
References: <alpine DOT LFD DOT 2 DOT 03 DOT 1305230950500 DOT 1918 AT mcs DOT anl DOT gov> <20130523160711 DOT GB25295 AT calimero DOT vinschen DOT de> <20130523211458 DOT GA12260 AT calimero DOT vinschen DOT de>
User-Agent: Alpine 2.03 (LFD 1266 2009-07-14)
MIME-Version: 1.0

On Thu, 23 May 2013, Corinna Vinschen wrote:

> On May 23 18:07, Corinna Vinschen wrote:
> > On May 23 10:14, Satish Balay wrote:
> > >   [...]
> > > - It appears to be related to the huge length of one of the commands - and
> > >   length of PATH
> > > - I tried it on 3 different machines [with differences in default installed software]
> > >   win2008/x64  - breaks when PATH is over 1.5K chars
> > >   win2003/x32 - breaks when PATH is over  2K chars
> > >   win7/x32    - breaks when PATH is over 20K chars.
> > > 
> > > Any ideas on how to debug this further to better understand the issue
> > > - or workarrounds? This is with latest cygwin [and rebaseall done
> > > correctly]
> > 
> > There's perhaps not much you can do.  First of all, the problem is known
> > for a while, but even though we're trying a lot of stuff to make sure
> > that fork works, the OS has some funny notions sometimes, which make it
> > hard to get fork 100% reliable.
> > 
> > In this case, there's a subtil difference between the first shell
> > started from make, and a forked subshell.  The difference is something
> > to do with the size of $PATH which results in a different position of
> > the main stack in the forked child process.  This breaks fork because
> > fork semantics require to be able to reproduce the parent memory in the
> > child process.
> > 
> > Thanks for the test case.  I'm just investigating what happens exactly,
> > and I have a few ideas how we can workaround this problem to make fork
> > a bit more reliable in this situation.  This requires some fiddling
> > around, so, just stay tuned for a couple of days.
> 
> After some experimenting, it looks like I found a surprisingly simple
> solution.  I checked in a patch to CVS, and I'm just generating a new
> developer's snapshot.  Please try the just uploaded today's snapshot
> from http://cygwin.com/snapshots/  Exchanging just the DLL should be
> sufficient.  Please report back.

I just tried the snapshot cygwin dll on the win2008 box - and it
appears to work! [both for the test case and the actual build that
triggered the problem]. This run is with about 20K chars in PATH

> 
> Btw., there's an upper bound for the size of a single environment
> variable of about 32K.  Right now, if $PATH reaches this size, forking
> any further process fails silently.  I don't know why yet, but as far
> as I'm concerned this is no pressing issue.

Sure - hopefully no one has such huge PATHs - so not an issue.

thanks!

Satish

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019