GNU bug report logs - #40023
26.3; Emacs crashes when creating process if many file handles are in use (e.g., when using ccls)

Previous Next

Package: emacs;

Reported by: Holger Pirk <holger <at> pirk.name>

Date: Wed, 11 Mar 2020 14:33:01 UTC

Severity: normal

Merged with 39164, 40555

Found in versions 27.0.60, 27.0.90, 26.3

Fixed in version 27.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 40023 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: holger <at> pirk.name, 40023 <at> debbugs.gnu.org
Subject: Re: bug#40023: 26.3; Emacs crashes when creating process if many
 file handles are in use (e.g., when using ccls)
Date: Thu, 19 Mar 2020 11:41:37 +0100
>>>>> On Thu, 12 Mar 2020 17:46:58 +0100, Robert Pluim <rpluim <at> gmail.com> said:
    >>> If someone has an 'emacs -Q' testcase I can look at it. Soon we will
    >>> all be spending lots of time at home here :-(

    Eli> We could simply install the proposed workaround on the emacs-27 branch
    Eli> for now, I think.

So I installed lsp-mode and ccls, added lsp to c-mode-hook, visited
emacs/src/font.c and then said yes when it asked me if I wanted to
watch all the files (there are ~6500). I then recompiled emacs using
M-x compile, and saw no crash.

This is with emacs-master. I checked with emacs-26 and saw no crash. I
did look in *lsp-log*, and saw a bunch of messages saying:

Failed to create a watch for File watching not possible, no file descriptor left: 975: message

(this is with 'ulimit -n 4096')

so I think this is very much dependent on which language server youʼre
using. Note also that itʼs watching directories, not files, I had to
create a bunch of extra directories to get that message.

I have:

    ccls --version
    ccls version 8.0.0 (tags/RELEASE_800/final)

Robert




This bug report was last modified 5 years and 94 days ago.

Previous Next


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