bugmake - Bugs: bug #27374, fatal error reading included...

 
 

bug #27374: fatal error reading included makefile silently ignored

Submitted by:  Michael Coleman <mkc>
Submitted on:  Wed 02 Sep 2009 07:26:22 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.

 

Sun 15 Sep 2013 08:42:55 PM UTC, comment #3:

We can't stop immediately on any type of error, because we have to allow the user to provide a rule that can resolve the problem if the error is recoverable. That includes not just things like missing files but also permissions errors, etc.

I added a check only for unrecoverable errors, and failed immediately.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Wed 02 Sep 2009 08:31:44 PM UTC, comment #2:

Oops. I get the same message; I hadn't noticed that it scrolled off the top of my terminal.

Nonetheless, I still think make should drop dead immediately in this case and also return an error status. My understanding is that 'include' may sometimes (always?) ignored a missing included file, but I don't think that this condition sensibly falls under that mandate.

(I'm tempted to say that make should specifically disallow a file from including itself (even indirectly). Perhaps there is some use for this, though.)

Michael Coleman <mkc>
Wed 02 Sep 2009 08:08:17 PM UTC, comment #1:

I see the error message:

martind@whitewater:~/playpen/make-27374$ make -f make.bug > /dev/null && echo success
make.bug:1: make.bug: Too many open files
success
martind@whitewater:~/playpen/make-27374$

The failure happens (for me) here in the strace:

read(1023, "include make.bug\n\necho ::\n\t@echo"..., 4096) = 41
open("make.bug", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/include/make.bug", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/local/include/make.bug", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/include/make.bug", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/locale.alias", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 EMFILE (Too many open files)
write(2, "make.bug:1: ", 12make.bug:1: ) = 12
write(2, "make.bug: Too many open files", 29make.bug: Too many open files) = 29
write(2, "\n", 1

Martin Dorey <mdorey>
Wed 02 Sep 2009 07:26:22 PM UTC, original submission:

While including a makefile, if a fatal error (e.g., no more filehandles available) is generated, make does not give any error or warning, even if the include is not preceded by a '-'.

This can be reproduced like so, assuming that the top-level makefile is named 'make.bug':

include make.bug

echo ::
@echo echoing

This will recurse until the filehandle limit is hit, then complete with no diagnostics nor error status.

I think that an error like exceeding the filehandle limit should always draw an immediate fatal error, as this is not the kind of error that should ever be ignored.

Michael Coleman <mkc>

 

(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 mdorey (Posted a comment)
  • -unavailable- added by mkc (Submitted the item)
  •  

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

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 15 Sep 2013 08:42:55 PM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.0

    Back to the top


    Powered by Savane 3.1-cleanup1