make, PATH & "Win32 error 487"

Corinna Vinschen corinna-cygwin@cygwin.com
Fri May 24 09:04:00 GMT 2013


On May 23 17:29, Satish Balay wrote:
> 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

Thanks for your feedback!


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

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



More information about the Cygwin mailing list