This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PCH merge: bootstrap failure, gengtype consumes all file descriptors


> Date: Mon, 10 Jun 2002 16:44:27 -0400 (EDT)
> From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
> Cc: gcc-bugs@gcc.gnu.org, gcc@gcc.gnu.org
> 
> I've been getting bootstrap failures in stage1 on solaris2.7 when
> running gengtype, it says:
> 
>  > opening output file: Too many open files
...
> fds open	after call
> --------------------------
> 3		(prior to open_base_files)
> 12		open_base_files
> 29		write_gc_types

Yes.  What you're seeing is that there are a large number of output
files; they get opened as they are needed, but not closed until
processing is complete.

One reason they aren't closed is that gengtype uses tmpfile(), so it
can't close and re-open them because it doesn't know where they are.

> (And BTW the return value is not checked so we don't know we got an
> error.)

Actually, it is:

  f = tmpfile();
  if (f == NULL)
    { 
      perror ("couldn't create temporary file");
      exit (1);
    }

I suspect that if you get the error you quoted, it really does mean that
you were only one FD short.

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]