[Regarding BFD: BFD 2.15.93 20041018 internal error, aborting at
cache.c line 495 in bfd_cache_lookup_worker]
On Wed, Oct 26, 2005 at 10:15:26AM +0930, Alan Modra wrote:
> The BFD error is most likely due to the operating system returning an
> error, "Too many open files". I'm guessing from the dump you show
> below that gdb is being invoked by the checkpoint process in order to
> debug some other serious problem.
> I see there are a number of open gdb reports about this problem, so it
> looks to me like gdb is failing to close files for some reason. BFD
> will manage files, closing and reopening as needed to avoid this sort of
> system limit, but only if files are opened by BFD. If an open file
> descriptor is passed to BFD, then BFD assumes that the caller will
> manage files. (grep for cacheable in bfd/opncls.c).
Hmm, on looking over the code in bfd_cache_lookup_worker, I see we
unnecessarily limit the file position on systems that provide fseeko64
and ftello64. So you might be hitting a file size limit. I'm applying
the following patch to remove this limit and to provide better
* cache.c (bfd_open_file): Set bfd_error_system_call on failure
to open file.
(bfd_cache_lookup_worker): Remove check that file pos is in
unsigned long range. Print system error before aborting.