From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#40023: 26.3; Emacs crashes when creating process if many file handles are in use (e.g., when using ccls) Date: Wed, 11 Mar 2020 18:17:02 +0200 Message-ID: <83fteeamtd.fsf@gnu.org> References: <865E1017-DFA9-495D-BCDA-70B46FE09A27@pirk.name> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="29654"; mail-complaints-to="usenet@ciao.gmane.io" Cc: holger@pirk.name, 40023@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 11 17:18:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jC43k-0007an-LI for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Mar 2020 17:18:16 +0100 Original-Received: from localhost ([::1]:55280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jC43j-0002yG-Ls for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Mar 2020 12:18:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37868) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jC43X-0002ug-3l for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2020 12:18:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jC43W-00067k-0v for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2020 12:18:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49438) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jC43V-00067e-Ti for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2020 12:18:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jC43V-0003Na-Pz for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2020 12:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Mar 2020 16:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40023 X-GNU-PR-Package: emacs Original-Received: via spool by 40023-submit@debbugs.gnu.org id=B40023.158394342512927 (code B ref 40023); Wed, 11 Mar 2020 16:18:01 +0000 Original-Received: (at 40023) by debbugs.gnu.org; 11 Mar 2020 16:17:05 +0000 Original-Received: from localhost ([127.0.0.1]:55411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jC42a-0003MQ-U5 for submit@debbugs.gnu.org; Wed, 11 Mar 2020 12:17:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jC42Z-0003Lt-70 for 40023@debbugs.gnu.org; Wed, 11 Mar 2020 12:17:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jC42T-0005Dd-Rm; Wed, 11 Mar 2020 12:16:57 -0400 Original-Received: from [176.228.60.248] (port=3593 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jC42T-00009y-8Z; Wed, 11 Mar 2020 12:16:57 -0400 In-Reply-To: (message from Robert Pluim on Wed, 11 Mar 2020 16:32:14 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177187 Archived-At: > From: Robert Pluim > Date: Wed, 11 Mar 2020 16:32:14 +0100 > Cc: 40023@debbugs.gnu.org > > >>>>> On Wed, 11 Mar 2020 13:50:22 +0000, Holger Pirk said: > > Holger> I have spent some time digging around the code and couldn't quite figure > Holger> out the logic behind the `fd < FD_SETSIZE`-assert. I suspect the CCLS > Holger> opens files without going through emacs' infrastructure which leads to > Holger> high file descriptors which emacs cannot handle. I would say that CCLS > Holger> is, in part, to blame but emacs shouldn't simply crash. > > Emacs is limited by the limits of select, which supports a maximum of > FD_SETSIZE file descriptors, which on macOS is 1024 > > At least on macOS, itʼs possible to increase that value to eg 8192 by > setting FD_SETSIZE, which might alleviate this, but then you'd > probably run into the 'ulimit -n' maximum, so you'd have to remember > to increase that. Wasn't this fixed lately by Yamamoto-san?