[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #18124] make-3.81 isn't parallel build safe

From: Paul D. Smith
Subject: [bug #18124] make-3.81 isn't parallel build safe
Date: Tue, 09 Jun 2009 15:14:23 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/2009042513 Ubuntu/8.04 (hardy) Firefox/3.0.10

Update of bug #18124 (project make):

                  Status:                    None => Fixed                  
             Assigned to:                    None => psmith                 
             Open/Closed:                    Open => Closed                 
           Fixed Release:                    None => CVS                    


Follow-up Comment #4:

OK, this is a complicated scenario but Petr Machata did a nice job of
explaining it in comment #21 in the Red Hat Bugzilla bug entry.  However the
fix implemented there seems to me a bit too tricky.

My understanding of the bug is that if (a) we are a submake called in a
jobserver context (so we have jobserver-fds set), and (b) we were invoked with
an explicit value of -jN to override the jobserver settings and make us a new
master server, AND (c) we have to re-exec ourselves due to remaking of
makefiles, THEN when we re-exec ourselves we have closed our FDs but we still
have --jobserver-fds in MAKEFLAGS.  This causes the re-exec'd make to re-run
the "make us a new master server" code and re-close those FDs... which were
already closed before we re-exec'd and so might now be open for different
reasons (directory cache for example).

The change Petr did was to simply not close the FDs unless we were the
original master (restarts == 1) but this doesn't feel right to me: sub-masters
need to clean up as well.

I made changes so that if we're re-execing and we're a jobserver master, we
won't leave stray instances of --jobserver-fds in the MAKEFLAGS variable once
we've closed the FDs.  This should allow the re-exec to get a "clean"
jobserver environment (with -jN on the command line, and no --jobserver-fds). 
This also has the added bonus that the warning "disabling jobserver mode" is
only printed once, not every time we re-exec.

Roland McGrath (IIRC) once emailed me and expressed distaste for the whole
idea of the --jobserver-fds option in MAKEFLAGS; he may have been right.  I'll
have to go dig up his email because I don't, offhand, remember the suggested


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]