bugmake - Bugs: bug #11518, 3.80 and CVS 20040803 - regression...

 
 

bug #11518: 3.80 and CVS 20040803 - regression from 3.79.1 with multiple targets

Submitted by:  Giuliano Procida <myxie>
Submitted on:  Fri 07 Jan 2005 01:30:46 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 4.0Operating System: POSIX-Based
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 07 Apr 2005 09:37:04 PM UTC, comment #4:

I've reviewed the diff you sent and, while the message printed during debugging says that "source" is newer than "target2", if you look at the actual time-last-modified you'll see that it isn't so: the timestamps are identical. Whenever timestamps are identical make assumes the target is up to date. So, to me the behavior of make is correct here. However, it does seem like the debug statement is being generated based on incomplete information and is thus sometimes printing a different result than make actually believes. That should be investigated.

Paul D. Smith <psmith>
Project Administrator
Mon 10 Jan 2005 04:34:26 PM UTC, comment #3:

Please be aware that most modern UNIX filesystems provide sub-second timestamp capability, but that NFS does not. So, using local filesystems vs. NFS filesystems may well show different behavior when your makefiles are using what is essentially undefined behavior WRT file updates and timestamps.

Paul D. Smith <psmith>
Project Administrator
Mon 10 Jan 2005 11:50:10 AM UTC, comment #2:

I think it is prossibly a fs timestamp issue.

We do have some clock skew here as well, but I think sleeping for a few seconds between touch source and make -rd should be enough to negate this.

I've reproduced the problem as a difference between Solaris 2.8 NFS (NetApp server) and tmpfs.

I've had a look through remake.c but I've not been able to work out exactly where things go wrong. I've attached a diff of traces which shows the different behaviour. It also shows stat calls that suggest make is incorrect in asserting that 'target2' is older than 'source'.

If I have time, I'll put more debug info in remake.c and try again.

Command line:

touch source; sleep 5; truss -o /tmp/make.nfs.trace -ae -vall -wall .../make-20040803/bin/make -rd

Regards,
Giuliano.

Giuliano Procida <myxie>
Fri 07 Jan 2005 10:57:43 PM UTC, comment #1:

Definitely the comments and situation raised in 2404 also applies here.

I cannot reproduce the problem, though: with both 3.80 and the CVS HEAD code, the second run on my system says "Nothing to be done for `all'". This must be some kind of difference in your filesystem, etc.

However, the reality is that it's not really deterministic what make will do with a makefile that, at best, "skirts the rules" like this one does. It depends on timestamps, filesystem semantics (for example filesystems that implement subsecond timestamps may behave differently than ones that don't, etc.)

Still, I'll leave this bug open for now and if you find out any information about why the versions behave differently I'll be interested to hear it.

Paul D. Smith <psmith>
Project Administrator
Fri 07 Jan 2005 01:30:46 PM UTC, original submission:

The answer could well be the same as that for #2404, "not a bug". Let me know.

Makefile:

.PHONY: all clean

all: target1 target2

clean:
rm -f target1 target2

target1 target2: source
touch -r source target1 target2

GNU make 3.79.1 runs the rule once only; make using 3.80 or the version pulled out of CVS on 2004/08/03 both run the rule twice. make -d shows:

3.80:

Must remake target `target2'

3.79.1:

No need to remake target `target2'

Tracing the system calls shows that 3.79.1 stats target2 after having run the rule to make target1. The later versions do not.

Regards,
Giuliano.

Giuliano Procida <myxie>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #2348:  make.diff.trace added by myxie (14KiB - application/octet-stream - make trace diff)

 

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 07 Apr 2005 09:37:04 PM UTCpsmithStatusNone=>Not A Bug
  Open/ClosedOpen=>Closed
Mon 10 Jan 2005 11:50:10 AM UTCmyxieAttached File-=>Added make.diff.trace, #2049

Back to the top


Powered by Savane 3.1-cleanup1