GNU bug report logs - #22814
25.0.91; Emacs runs out of file descriptors on OS X

Previous Next

Package: emacs;

Reported by: David Caldwell <david <at> porkrind.org>

Date: Fri, 26 Feb 2016 06:19:02 UTC

Severity: normal

Found in version 25.0.91

Fixed in version 26.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 22814 <at> debbugs.gnu.org, andlind <at> gmail.com
Subject: bug#22814: 25.0.91; Emacs runs out of file descriptors on OS X
Date: Fri, 04 Mar 2016 08:53:24 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

Hi Eli,

>> Indeed, Emacs tries to read the docstring of the just fetched
>> function. And it tries to open etc/DOC for this, which fails due to the
>> missing file descriptor availability.
>> 
>> I don't believe we need to handle this case; if Emacs is running out of
>> file descriptors, anything could happen.
>
> The only part that might be worth improving is the error message: it's
> a far cry from what really went wrong.  If you can find a way of
> making it say something about "too many open files", that'd be all the
> improvement we can hope for.

I would apply the following patch:

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs-25/src/doc.c.~2e78353fabe11c768627c50e48375de5693ce7ee~
--- /home/albinus/src/emacs-25/src/doc.c
***************
*** 126,131 ****
--- 126,134 ----
    fd = emacs_open (name, O_RDONLY, 0);
    if (fd < 0)
      {
+       if ((errno == EMFILE) || (errno == ENFILE))
+ 	report_file_error ("Read error on documentation file", file);
+ 
  #ifndef CANNOT_DUMP
        if (!NILP (Vpurify_flag))
  	{
--8<---------------cut here---------------end--------------->8---

This ends up in the following error message:

Read error on documentation file: Too many open files, /home/albinus/src/emacs-25/lisp/emacs-lisp/cl-seq.elc

Is it OK to apply it to the emacs-25 branch, or shall it go to master?

Best regards, Michael.




This bug report was last modified 8 years and 231 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.