From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Robert Pluim 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: Tue, 14 Apr 2020 18:14:19 +0200 Message-ID: References: <865E1017-DFA9-495D-BCDA-70B46FE09A27@pirk.name> <87pncdgg5b.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="80052"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Albinus , 40023@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 14 18:15:28 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 1jOODf-000KZD-Hj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Apr 2020 18:15:27 +0200 Original-Received: from localhost ([::1]:33608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOODe-0002ib-HT for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Apr 2020 12:15:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49506) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOODM-0002dS-5S for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2020 12:15:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOODG-0003Wk-I1 for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2020 12:15:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51265) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOODG-0003We-El for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2020 12:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jOODG-0000mC-9p for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2020 12:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Apr 2020 16:15:02 +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.15868808692928 (code B ref 40023); Tue, 14 Apr 2020 16:15:02 +0000 Original-Received: (at 40023) by debbugs.gnu.org; 14 Apr 2020 16:14:29 +0000 Original-Received: from localhost ([127.0.0.1]:34578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jOOCj-0000l9-5a for submit@debbugs.gnu.org; Tue, 14 Apr 2020 12:14:29 -0400 Original-Received: from mail-wm1-f67.google.com ([209.85.128.67]:39156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jOOCh-0000kv-N8 for 40023@debbugs.gnu.org; Tue, 14 Apr 2020 12:14:28 -0400 Original-Received: by mail-wm1-f67.google.com with SMTP id y24so14652543wma.4 for <40023@debbugs.gnu.org>; Tue, 14 Apr 2020 09:14:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=6iJUqvuvYvzvPs55UThcGlyg/txBAXcs1/0WjqA45Ak=; b=flqy7JSWFzlpWBukeoZJW1AJLlUvvL3VSCri5KFDld5owdqCZ4NZB8hXaxb6Xyjcfs l62FRefun/R2JvAJqyikneeERzZAFkZtj4108yqupwAgxND3AmGEBm7AyK0uQJ/6uLS6 qkWhoDVzg6AasRGIaLv/WXlyRyXlab8Oc/vcfnygnM7EOIrUZANeo137VVhFe6jGtCts zrTQPk0G2lw7WXemY2w4oH5ZKU60+DHiHjFhQB0Eyqah+6K9a0P7ktfNmIS9lpcNtF92 bRzgGqYlYPAXLF0CxDuZlxXW/cMW5jB3sT7gWZNTnAf1fN+UXj0ZmxMz7ybvQDEnp7Ok FEPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=6iJUqvuvYvzvPs55UThcGlyg/txBAXcs1/0WjqA45Ak=; b=TQCMgbwOfPHHLsMay93n0H04LJAhByF7ugJDtzAFls9VUcj5y2SBoCiWo3Mx3hNNu+ GZ0CyMB/go7zv2+IWg15I40yjAJKbwJb6ph/JGFurMPlNE4uXUda9wy2RM2Epzq4wjhQ GYC4K74zd7FjY2KzQq2E1Qo5o82dsVpIpqd3tZxfFpmqu7tfVs2EEKVKLCuC+ggLN8oa HBxsPWysdRmp5Yd3kV0KIZidRff5/yDR4MO0016WUaOTBozQ1TjuXQph4EaZevOB+F8U qy4p0l8YJFctPtFRBA3hJ3+p8YIUC3I8q2SzBb/gY7ykBqZ2wVDaTGgrjBISeqn3ygUN vTjA== X-Gm-Message-State: AGi0PubzW5K8b62J6m240AwnlQgR0uHZKFD3t7MYxElo7Ix3+wfGYiOb Weqk8knycr7p1oIMA/ACJgmqNjIu X-Google-Smtp-Source: APiQypJxWt0rLewo3e/ORaP6kNo26m6TFGaUgQIQCMVz/2DH3qyojNPH/3jyz45yK4yfDN+KaqCu6Q== X-Received: by 2002:a7b:cf25:: with SMTP id m5mr630979wmg.65.1586880861356; Tue, 14 Apr 2020 09:14:21 -0700 (PDT) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:f1a6:22e0:cfda:c9f2]) by smtp.gmail.com with ESMTPSA id i97sm21180949wri.1.2020.04.14.09.14.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:14:20 -0700 (PDT) In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Tue, 14 Apr 2020 18:02:47 +0200") 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:178359 Archived-At: >>>>> On Tue, 14 Apr 2020 18:02:47 +0200, Mattias Engdeg=C3=A5rd said: Mattias> 14 apr. 2020 kl. 15.58 skrev Robert Pluim : >> With lsp-mode I think it=CA=BCs one fd per directory containing a mo= nitored >> file, but either way it=CA=BCs a limitation, and one that people are >> running into. Mattias> Are you sure? In contrast to inotify, kqueue can't detect chan= ges to Mattias> the contents of files (or to their inodes) by monitoring their Mattias> containing directory. C-x C-f my-dodgy-memory-disclaimer.txt :-) >> - the patch from >> , which >> reduces RLIMIT_NOFILE to FD_SETSIZE. Mattias> It's perhaps the least bad option for emacs-27. In addition to= the Mattias> file monitoring requirement, there's the concern that the macO= S libs Mattias> raise RLIMIT_NOFILE for reasons of their own, and that more th= ings Mattias> will break when they no longer get what they want. Libraries have no business messing with RLIMIT_NOFILE, but this is macOS we=CA=BCre talking about. >> - select() -> poll(). GNU/Linux, macOS and *BSD all have poll, plus >> there=CA=BCs a gnulib module for it that we could perhaps use on >> MS-Windows. As Eli says, not a small change. Mattias> Right. macOS doesn't have ppoll but Emacs doesn't seem to make= any use of the sigmask argument. Right, we always pass NULL. It=CA=BCs unfortunately very much a flag-day change that would need testing on loads of different platforms. Or we #ifdef it to death. Robert