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


View this message in rfc822 format

From: Mattias Engdegård <mattiase <at> acm.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Michael Albinus <michael.albinus <at> gmx.de>, 40023 <at> debbugs.gnu.org
Subject: bug#40023: 26.3 Emacs crashes when creating process if many file handles are in use (e.g., when using ccls)
Date: Tue, 14 Apr 2020 18:02:47 +0200
14 apr. 2020 kl. 15.58 skrev Robert Pluim <rpluim <at> gmail.com>:

> With lsp-mode I think itʼs one fd per directory containing a monitored
> file, but either way itʼs a limitation, and one that people are
> running into.

Are you sure? In contrast to inotify, kqueue can't detect changes to the contents of files (or to their inodes) by monitoring their containing directory.

> - the patch from
>  <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40023#32>, which
>  reduces RLIMIT_NOFILE to FD_SETSIZE.

It's perhaps the least bad option for emacs-27. In addition to the file monitoring requirement, there's the concern that the macOS libs raise RLIMIT_NOFILE for reasons of their own, and that more things will break when they no longer get what they want.

> - select() -> poll(). GNU/Linux, macOS and *BSD all have poll, plus
>  thereʼs a gnulib module for it that we could perhaps use on
>  MS-Windows. As Eli says, not a small change.

Right. macOS doesn't have ppoll but Emacs doesn't seem to make any use of the sigmask argument.

> (increasing FD_SETSIZE is a no-go: it works on macOS, maybe on *BSD,
> and is on very shaky standards-compliance ground).

Agreed.





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.