bugmake - Bugs: bug #15502, "make -j" does not cope...

 
 

bug #15502: "make -j" does not cope with EAGAIN in vfork

Submitted by:  None
Submitted on:  Sat 21 Jan 2006 10:20:02 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.81Operating System: POSIX-Based
Fixed Release: 4.0Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 09 Oct 2013 05:03:10 AM UTC, comment #1:

In the next release we use fork() not vfork() and from what I can tell the code definitely considers a failure to fork to cause the target to be marked failed.

However, I can't seem to reproduce this problem. If I set my ulimit to 6 (on a basic login) then it all works, but if I set it to 5 then I get a failure in the shell, not make. Still I think this is fixed; if not please add a comment.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
 Spam posted by sevanath
Sat 21 Jan 2006 10:20:02 PM UTC, original submission:

When the limit on the number of processes is reached, "make -j" still tries to launch additional processes. This causes vfork to fail with EAGAIN, but the target whose commands failed in this way are neither redone nor marked with a clear error message.

Here's a transcript of a session from a Debian GNU/Linux box with Make 3.81beta4 (it might be necessary to play with the argument to "ulimit -u" to reproduce this, depending on the number of other processes that run under the user's UID):

eliz@fencepost:~$ cat mkf4
recurse: ; @$(MAKE) --no-print-directory -f mkf4 INC=yes all
all: 0 1 2; @echo success

0: ; @echo $(MAKEFLAGS)

INC = no
ifeq ($(INC),yes)
-include 1.inc 2.inc
endif

1.inc: ; @echo ONE.inc; sleep 2; echo TWO.inc; echo '1: ; @echo ONE; sleep 2; echo TWO' > $@
2.inc: ; @sleep 1; echo THREE.inc; echo '2: ; @sleep 1; echo THREE' > $@
eliz@fencepost:~$ make -j -f mkf4
--no-print-directory -j -- INC=yes
ONE
THREE
TWO
success
eliz@fencepost:~$ ulimit -S -u 9
eliz@fencepost:~$ make -j -f mkf4
make[1]: vfork: Resource temporarily unavailable
--no-print-directory -j -- INC=yes
ONE
TWO

As you see, after limiting the number of jobs, the commands for 2.inc are not run because vfork fails, but Make doesn't say anything about failing to remake the target.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by sevanath (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 09 Oct 2013 05:03:10 AM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Component Version4.0=>3.81
      Fixed ReleaseNone=>4.0

    Back to the top


    Powered by Savane 3.1-cleanup1