bugmake - Bugs: bug #8294, Parallel mode may run commands...

 
 

bug #8294: Parallel mode may run commands multiple times.

Submitted by:  None
Submitted on:  Thu 25 Mar 2004 01:11:18 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.79.1Operating System: Any
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 25 Mar 2004 02:30:15 PM UTC, comment #1:

The behavior you're seeing is correct and behaving as documented in the manual, and also as mandated by the POSIX standard for make (and by decades of historical implementation).

An explicit rule with two or more targets is identical in meaning to writing that same rule multiple times, once for each target. It does NOT mean that one invocation of that rule builds all the targets.

Paul D. Smith <psmith>
Project Administrator
Thu 25 Mar 2004 01:11:18 AM UTC, original submission:

I observed it on Solaris, AIX and Windows with version 3.79, and on Windows with version 3.80

What's particular about this Makefile is that the all: rule depends on 2 files, and both files are generated by the same rule.
In non-parallel mode, everything is fine, but when run in parallel, the commands are executed twice.

After playing around with the Makefile, my conclusion is that when make needs to generate 2 files at a given time, it doesn't realize that both files are generated by the same rule, therefore make runs the rule actions in parallel in 2 different processes.

On Unix I haven't had any problem yet, but on Windows this problem failed the make as one action what locking the output files and the other action failed because it couldn't open the file for write access. It's a typical race condition.

This is my interpretation of the error without knowing the inner working of make.

Thanks,
Fred

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #1148:  Makefile added by None (146B - text/plain - Problematic Makefile)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 25 Mar 2004 02:30:15 PM UTCpsmithStatusNone=>Not A Bug
  Open/ClosedOpen=>Closed
Thu 25 Mar 2004 01:11:18 AM UTCNoneAttached File-=>Added Makefile, #1129

Back to the top


Powered by Savane 3.1-cleanup1