From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#22814: 25.0.91; Emacs runs out of file descriptors on OS X Date: Sat, 27 Feb 2016 20:12:18 +0100 Message-ID: <87egbynf1p.fsf@gmx.de> References: <87twkupoq9.fsf@gmx.de> <83d1ricxyp.fsf@gnu.org> <87lh66nv22.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456600406 8658 80.91.229.3 (27 Feb 2016 19:13:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Feb 2016 19:13:26 +0000 (UTC) Cc: 22814@debbugs.gnu.org To: Anders Lindgren Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 27 20:13:15 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 1aZkIk-0006Do-6n for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Feb 2016 20:13:14 +0100 Original-Received: from localhost ([::1]:55951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZkIj-0004DD-CJ for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Feb 2016 14:13:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZkIf-0004Cp-Dt for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2016 14:13:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZkIX-0002Gg-VY for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2016 14:13:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZkIX-0002GY-RG for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2016 14:13:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aZkIX-0005Vw-ND for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2016 14:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Feb 2016 19:13: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.145660035221153 (code B ref 22814); Sat, 27 Feb 2016 19:13:01 +0000 Original-Received: (at 22814) by debbugs.gnu.org; 27 Feb 2016 19:12:32 +0000 Original-Received: from localhost ([127.0.0.1]:49064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZkI3-0005V7-Ry for submit@debbugs.gnu.org; Sat, 27 Feb 2016 14:12:32 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:62168) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZkI2-0005Uv-9B for 22814@debbugs.gnu.org; Sat, 27 Feb 2016 14:12:30 -0500 Original-Received: from detlef.gmx.de ([93.209.85.192]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MfBsk-1aGQDU3Pw2-00OpFx; Sat, 27 Feb 2016 20:12:22 +0100 In-Reply-To: (Anders Lindgren's message of "Sat, 27 Feb 2016 20:00:30 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-Provags-ID: V03:K0:+T0pjCX+mN1CGoQ8mxxXAQFRPyI1gRXYQxwFUI/Y59pdMFuz568 IcOV6gbg86Ft81aZDKWHiNnR+nJvhPaPbU2oLqQC+4wCpMslb6hnjxM7tJ0+obqEyjmhg1t 76B40MXeFMsj1KCNDGkwLTgC7TygMWJeQn/NLFVpWwePO4himfVGrqlliZehJMXnqjSUhdB aApkYAGgMAnnJMBpca10Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:HlCtexY0zsg=:5zGvn6wxjBGB8ZmKvuaq40 eZyFJvh9iXdZrwE0R4l0fdQjl3sFuogDkW49RkYSrW7AuXk9u/08qvf/X4ciuBYkFfSgLKDul FKM3glGigzGvOyWJUXdtjmVcFJiYtlY1gtdtIwZYPIB3yjCcVdHE7sFxCDLmO066mHM9daHDE etak9nPGCrd4+p5N+L5/xlbyuxwPM7+wYEx+QoVLyq0vGdLu18Yo1MnbHeHGHiVM+qjs/qe0v lXI+PqRz36w5VSKnhK0BYplaWaG+DYfJLb/zcz7PlVbulv7nCuokUXEZg/srrRFfeoh1HaBL+ /JG3yDj/1iGomoZ0WR69wNl1fpSH2Cmm4QcktIdTlgO9E/34qF9eQJMmq/ey8nPjpghx1X7yv YHD6cZgElVAQ/7jP1tBzT27xrDcvfnc7hSaz5k6ckI/feJAXXDc12eVJAKs27tOL2W5gUaPOS uHgOpiu1QIEDWYHSg6T31mmVd3N8P3vVOgEH+b2j69rU9L6PVH7W8wRQy1EnSi268KdVDFxXd Q/o/9zFfXyR7JHNBZPV4bibSix7fa0z0Hxon1Ta+Mw6BnP+wt+17FmQVoLnzFtoCVDBTPXA8B w9SJqOf1LsTkct7QYXOuAfYyoYwEhNvvn0V0e2xEbSCDNGONO48+jgk00ga5+YDoaQTGaCJd6 k7E+/DfRk27Z4GBDo6xKn6t59qVuqNlL0E8C8waf9ocubIvAeHqqklAIgIkEcgivdh5YQmtcv uELKMuOrUCaE1qZ2Gb/mozmqG+EEu1dScjGjT4ToNkBVkM+hulTwBt82S6uNL2treM0fcrLj 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:113964 Archived-At: Anders Lindgren writes: > Hi! Hi Anders, > I don't think the problem is what kqueue does when it run out of file > descriptors, but how the rest of the Emacs process acts when this > happens. For example, can it even read and write files? Can > subprocesses be started? > > The question, then, is how should the kqueue system work so that it > doesn't run Emacs out of file descriptors? For example, if it would be > possible to check how many are available, it could stop when there > are, say, 50 remaining. Effectively, this would give a user 200 files > that are auto-reverted using the notification system, and the rest > would be handled by the old timer system. Something like this I plan to implement in kqueue.c and inotify.c. For gfilenotify.c this shouldn't be necessary, it switches to polling already when necessary. But maybe I retest. Remote backends (inotifywait, gvfs-monitor-dir) are different, here it isn't the number of file descriptors but the number of processes allowed to start, which counts. I'll give it some thinking as well. Tramp is written in Lisp, the checks will be harder to perform. Maybe I'll introduce a hardcoded limit of possible file notification watches. w32notify.c I cannot touch. Hopefully, somebody else takes the ball. All of this shall go into the master, I believe. For the emacs-25 branch we know what to do, described somewhere earlier in this bug's messages. > -- Anders Best regards, Michael.