GNU bug report logs -
#22814
25.0.91; Emacs runs out of file descriptors on OS X
Previous Next
Reported by: David Caldwell <david <at> porkrind.org>
Date: Fri, 26 Feb 2016 06:19:02 UTC
Severity: normal
Found in version 25.0.91
Fixed in version 26.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Anders Lindgren <andlind <at> gmail.com> writes:
> Can you debug this?
>
> Not within a reasonable time frame, unfortunately.
I've debugged this on FreeBSD 10. It has larger limits:
--8<---------------cut here---------------start------------->8---
albinus <at> freebsd10:~/src/emacs-25 % ulimit -u
5749
albinus <at> freebsd10:~/src/emacs-25 % ulimit -n
28791
--8<---------------cut here---------------end--------------->8---
1. Run unlimited number of file-notify-add-watch:
--8<---------------cut here---------------start------------->8---
(let ((temporary-file-directory file-notify--test-tmpfile))
(while t
(setq file-notify--test-tmpfile1 (file-notify--test-make-temp-name))
(write-region
"any text" nil file-notify--test-tmpfile1 nil 'no-message)
(should (file-notify-add-watch
file-notify--test-tmpfile1 '(change) #'ignore))))
--8<---------------cut here---------------end--------------->8---
--8<---------------cut here---------------start------------->8---
albinus <at> freebsd10:~/src/emacs-25 % gmake -C test/automated file-notify-tests SELECTOR='\"09\"'
Test file-notify-test09-sufficient-ressources condition:
(file-error "Opening output file" "Too many open files in system" "/tmp/file-notify-test-parent11031I_Y/file-notify-test11031BbD")
FAILED 1/2 file-notify-test09-sufficient-ressources
albinus <at> freebsd10:~/src/emacs-25 % ls /tmp/file-notify-test-parent11031I_Y | wc -l
20291
--8<---------------cut here---------------end--------------->8---
2. Run limited number of file-notify-add-watch:
--8<---------------cut here---------------start------------->8---
(let ((temporary-file-directory file-notify--test-tmpfile))
(dotimes (_i 10000)
(setq file-notify--test-tmpfile1 (file-notify--test-make-temp-name))
(write-region
"any text" nil file-notify--test-tmpfile1 nil 'no-message)
(should (file-notify-add-watch
file-notify--test-tmpfile1 '(change) #'ignore)))
(read))
--8<---------------cut here---------------end--------------->8---
--8<---------------cut here---------------start------------->8---
albinus <at> freebsd10:~/src/emacs-25 % gmake -C test/automated file-notify-tests SELECTOR='\"09\"'
[...]
root <at> freebsd10:~ # lsof -p 11075 | grep file-notify-test | wc -l
10000
--8<---------------cut here---------------end--------------->8---
Obviously, Emacs keeps an open file descriptor per watched file, as expected.
> -- Anders
Best regards, Michael.
This bug report was last modified 8 years and 231 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.