GNU bug report logs -
#18880
25.0.50; inotify-based file notifications missing sometimes
Previous Next
Reported by: Dima Kogan <dima <at> secretsauce.net>
Date: Wed, 29 Oct 2014 00:12:02 UTC
Severity: normal
Found in version 25.0.50
Fixed in version 24.5
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18880 in the body.
You can then email your comments to 18880 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18880
; Package
emacs
.
(Wed, 29 Oct 2014 00:12:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dima Kogan <dima <at> secretsauce.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 29 Oct 2014 00:12:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This bug is about an issue on the emacs-devel-mailing list:
http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00911.html
The main message is copied below:
I ran into an issue with inotify-base file notifications when looking at
auto-revert stuff from an earlier thread. To show the issue, I build
the latest emacs from source using
./configure --with-file-notification=inotify
I then run
./emacs --eval "`cat /tmp/tstnotify.el`" -Q -nw
with tstnotify.el being
(progn
(require 'filenotify)
(dolist (fil '("/tmp/tst1" "/tmp/tst2"))
(file-notify-add-watch fil '(change attribute-change)
(lambda (event)
(message "notify event %s" event)))
(find-file fil))
(switch-to-buffer "*Messages*"))
Here I ask for notifications for two files, and print out the events as
they come in. While emacs is running this way, I modify those two files
using an external tool. I would expect to see modification events for
both of these files, but I only see them for one of the files.
The issue is that emacs doesn't ask inotify to look at the two files, it
asks it to look at the containing directory (/tmp in both cases),
filtering out all the files we don't care about later. inotify is being
intelligent, notices that we're asking to monitor the same object twice
(/tmp), and simply returns the same descriptor a second time. Emacs is
assuming a unique descriptor, and the result is that we only get
notifications for one file.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18880
; Package
emacs
.
(Tue, 13 Jan 2015 10:31:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 18880 <at> debbugs.gnu.org (full text, mbox):
Dima Kogan <dima <at> secretsauce.net> writes:
> The issue is that emacs doesn't ask inotify to look at the two files, it
> asks it to look at the containing directory (/tmp in both cases),
> filtering out all the files we don't care about later. inotify is being
> intelligent, notices that we're asking to monitor the same object twice
> (/tmp), and simply returns the same descriptor a second time. Emacs is
> assuming a unique descriptor, and the result is that we only get
> notifications for one file.
I've committed a patch to the emacs-24 branch; could you, please, check?
Best regards, Michael.
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Tue, 17 Feb 2015 19:32:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Dima Kogan <dima <at> secretsauce.net>
:
bug acknowledged by developer.
(Tue, 17 Feb 2015 19:32:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 18880-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.5
Michael Albinus <michael.albinus <at> gmx.de> writes:
> I've committed a patch to the emacs-24 branch; could you, please, check?
No reaction for weeks; I set this bug as closed. If there are still
problems, please reopen.
Best regards, Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 18 Mar 2015 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 97 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.