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

 
 

bug #27374: fatal error reading included makefile silently ignored

Submitter:  Michael Coleman <mkc>
Submitted:  Wed 02 Sep 2009 07:26:22 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  3.81 Operating System:  POSIX-Based
Fixed Release:  4.0 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by mdorey (Posted a comment)
  • -email is unavailable- added by mkc (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-15 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.0

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code