From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.bugs Subject: bug#22814: 25.0.91; Emacs runs out of file descriptors on OS X Date: Fri, 26 Feb 2016 21:51:09 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1143dd1872c8bb052cb2757e X-Trace: ger.gmane.org 1456519939 19131 80.91.229.3 (26 Feb 2016 20:52:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Feb 2016 20:52:19 +0000 (UTC) To: 22814@debbugs.gnu.org, Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 26 21:52:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aZPMw-0004aU-EC for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Feb 2016 21:52:10 +0100 Original-Received: from localhost ([::1]:52084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZPMv-0006X8-JP for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Feb 2016 15:52:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZPMs-0006X3-9v for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 15:52:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZPMo-00068x-8E for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 15:52:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZPMo-00068f-3J for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 15:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aZPMn-0007TK-RY for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 15:52:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Feb 2016 20:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22814 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22814-submit@debbugs.gnu.org id=B22814.145651987728668 (code B ref 22814); Fri, 26 Feb 2016 20:52:01 +0000 Original-Received: (at 22814) by debbugs.gnu.org; 26 Feb 2016 20:51:17 +0000 Original-Received: from localhost ([127.0.0.1]:47917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZPM5-0007SK-0x for submit@debbugs.gnu.org; Fri, 26 Feb 2016 15:51:17 -0500 Original-Received: from mail-vk0-f53.google.com ([209.85.213.53]:35981) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZPM3-0007S5-8m for 22814@debbugs.gnu.org; Fri, 26 Feb 2016 15:51:15 -0500 Original-Received: by mail-vk0-f53.google.com with SMTP id c3so88232899vkb.3 for <22814@debbugs.gnu.org>; Fri, 26 Feb 2016 12:51:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=LcNFUGeZYxoiN2JMIEzqRIkJ13EJoIuRhFw/wjFskc0=; b=wkP9dMsQju13qIH1xfvs7yGxgIvNJUO29Pw68DDks4kgRRZ92/MHwP41q/GR2e+sqA +vhsXWXnZIEEisg5MhiH9zFUryTuWrhuXlGbO5DN+pf0dBC9vtgbLcBPDA4YL++FAPeP T0/higSahDssnlDqgQ96roUBRw6cWS/t82KGPhte31YWukTOb60Vpc5S+jDn13GC3Fru vHTHr2pCywLJcdx6odP6qDLlQmkmGi8nK9gBfjhupSpg8KW564UEFdWiKzbMTY0ITDzJ YGgHf2j/p64ieUcPyIJMxTaogrKvrnGlEqM/79ZfCYSQ5KPKH9sjPfl5B0XEHJp1hPg6 sK+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=LcNFUGeZYxoiN2JMIEzqRIkJ13EJoIuRhFw/wjFskc0=; b=WKM0U8o/ukT3DZI+MGYmMrPRonXwTzdmQptbSgbaeBQBeGQavZlYZ7q6NCEWHz1Vus yGwdw1/kBE/Oir/7uZKuL9k6/M3ShXIauqTKEdZmPwYDZkjh8nUHJt7p22UtkqegwciJ 1gLJGy4D/HW3b/TmZboK5uKx3L+yLhVpR+HOckfqWM72LC4IKMd6sQsqnpoalUMRC7gN HMGOnuLPnNDu1H867wJBRSEI9oPa78AAbd4GAHlLJ6pggH8kagEa3Db08mVvgjgAMV8U 9UTqNNBQqhudT0HT9P/yPz9/6/8zF8D0qbIJ7tYdgADzvLXh3UNB9BSEsN9M8oitKpAN lAkw== X-Gm-Message-State: AD7BkJLqtXQqsM0O5aB2AehvgK+HEwYt6HhxYPV2Y3NY2gAwBDZ73b9xoSc29ydkqLkOOuUD5vPr4xTnq82Dsw== X-Received: by 10.31.138.73 with SMTP id m70mr2766947vkd.70.1456519869808; Fri, 26 Feb 2016 12:51:09 -0800 (PST) Original-Received: by 10.31.214.131 with HTTP; Fri, 26 Feb 2016 12:51:09 -0800 (PST) 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: 208.118.235.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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113911 Archived-At: --001a1143dd1872c8bb052cb2757e Content-Type: text/plain; charset=UTF-8 Hi! >>> You are using "global-auto-revert-mode: t". kqueue does not support a >>> directory monitor, therefore it starts a new file notification monitor >>> for every single file, indeed. >>> >>> I believe it is questionable to run auto-revert-mode for so many files, >>> but that's your choice. In order to suppress kqueue running for >>> auto-revert-mode, you shall set auto-revert-use-notify to nil. >>> >>> Maybe there are means in OS X to increase the number of file descriptors >>> for Emacs, don't know. I don't use OS X. >>> >>> I will add a note to the Emacs manual. >> >> I suggest adding this to etc/PROBLEMS as well. > > Done. Closing the bug. Unfortunately, I don't think this is enough. If Emacs hangs because the file notification system runs out of resources (file descriptors or processes), it should detect this by itself and revert to other, safer, methods (e.g. the timer-based system). One simple way to handle this is to define a variable with "max" number of files the notification system can handle. We can set this to, say, 200 on OS X and unlimited on other systems. I would suggest leaving the bug open until someone figures out how to increase the resources in OS X, or the file notification system can handle that it runs out of resources. -- Anders Lindgren --001a1143dd1872c8bb052cb2757e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

>>> You are usi= ng "global-auto-revert-mode: t". kqueue does not support a
<= div>>>> directory monitor, therefore it starts a new file notifica= tion monitor
>>> for every single file, indeed.
>>>=C2=A0
>>> I believe it is questionable to= run auto-revert-mode for so many files,
>>> but that= 9;s your choice. In order to suppress kqueue running for
>>= > auto-revert-mode, you shall set auto-revert-use-notify to nil.
>>>=C2=A0
>>> Maybe there are means in OS X = to increase the number of file descriptors
>>> for Emacs= , don't know. I don't use OS X.
>>>=C2=A0
<= div>>>> I will add a note to the Emacs manual.
>><= /div>
>> I suggest adding this to etc/PROBLEMS as well.
>
> Done. Closing the bug.

Unfort= unately, I don't think this is enough.

If Emac= s hangs because the file notification system runs out of resources (file de= scriptors or processes), it should detect this by itself and revert to othe= r, safer, methods (e.g. the timer-based system).

O= ne simple way to handle this is to define a variable with "max" n= umber of files the notification system can handle. We can set this to, say,= 200 on OS X and unlimited on other systems.

I wou= ld suggest leaving the bug open until someone figures out how to increase t= he resources in OS X, or the file notification system can handle that it ru= ns out of resources.

=C2=A0 =C2=A0 -- Anders Lindg= ren

--001a1143dd1872c8bb052cb2757e--