[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33194: 26.1; Auto-revert mode causes emacs to use 100% cpu whenever
From: |
Michael Albinus |
Subject: |
bug#33194: 26.1; Auto-revert mode causes emacs to use 100% cpu whenever a file is being written to in the home directory |
Date: |
Sat, 03 Nov 2018 11:57:46 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Justin Van Winkle <justin.vanwinkle@gmail.com> writes:
Hi Justin,
> I mean it is certainly a bug to use 100% of a cpu just because a file
> that is in the same directory to a file you are editing is being
> written to, but it may not be unintentional behavior.
I could reproduce the problem. I have a running Emacs for some days, and
I've enabled `global-auto-revert-mode'. Starting scp copy of a large
file outside Emacs, brought Emacs up to 100% cpu usage.
The variable `file-notify-descriptors' contains
#s(hash-table size 97 test equal rehash-size 1.5 rehash-threshold 0.8125 data
((1 . 0) #s(file-notify--watch /home/albinus .emacs auto-revert-notify-handler)
(1 . 1) #s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1
. 2) #s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 .
3) #s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 4)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 5)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 6)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (2 . 0)
#s(file-notify--watch /usr/local/src/emacs/src nil auto-revert-notify-handler)
(1 . 7) #s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1
. 8) #s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 .
9) #s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 10)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 11)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 12)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (3 . 0)
#s(file-notify--watch /usr/local/src/elpa/packages/debbugs nil
auto-revert-notify-handler) (3 . 1) #s(file-notify--watch
/usr/local/src/elpa/packages/debbugs nil auto-revert-notify-handler) (3 . 2)
#s(file-notify--watch /usr/local/src/elpa/packages/debbugs nil
auto-revert-notify-handler) (3 . 3) #s(file-notify--watch
/usr/local/src/elpa/packages/debbugs nil auto-revert-notify-handler) (3 . 4)
#s(file-notify--watch /usr/local/src/elpa/packages/debbugs nil
auto-revert-notify-handler) (3 . 5) #s(file-notify--watch
/usr/local/src/elpa/packages/debbugs nil auto-revert-notify-handler) (1 . 13)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (3 . 6)
#s(file-notify--watch /home/albinus/src/elpa/packages/debbugs nil
auto-revert-notify-handler) (3 . 7) #s(file-notify--watch
/usr/local/src/elpa/packages/debbugs nil auto-revert-notify-handler) (3 . 8)
#s(file-notify--watch /usr/local/src/elpa/packages/debbugs nil
auto-revert-notify-handler) (3 . 9) #s(file-notify--watch
/usr/local/src/elpa/packages/debbugs nil auto-revert-notify-handler) (3 . 10)
#s(file-notify--watch /usr/local/src/elpa/packages/debbugs nil
auto-revert-notify-handler) (4 . 0) #s(file-notify--watch /usr/local/src/elpa
nil auto-revert-notify-handler) (3 . 11) #s(file-notify--watch
/usr/local/src/elpa/packages/debbugs nil auto-revert-notify-handler) (5 . 0)
#s(file-notify--watch /usr/local/src/emacs-25/doc/misc nil
auto-revert-notify-handler) (3 . 12) #s(file-notify--watch
/home/albinus/src/elpa/packages/debbugs nil auto-revert-notify-handler) (6 . 0)
#s(file-notify--watch /home/albinus/src/tramp/texi nil
auto-revert-notify-handler) (6 . 1) #s(file-notify--watch
/home/albinus/src/tramp/texi nil auto-revert-notify-handler) (6 . 2)
#s(file-notify--watch /home/albinus/src/tramp/texi nil
auto-revert-notify-handler) (4 . 1) #s(file-notify--watch /usr/local/src/elpa
nil auto-revert-notify-handler) (7 . 0) #s(file-notify--watch /usr/share/info
nil auto-revert-notify-handler) (8 . 0) #s(file-notify--watch
/home/albinus/src/tramp/lisp nil auto-revert-notify-handler) (8 . 1)
#s(file-notify--watch /home/albinus/src/tramp/lisp nil
auto-revert-notify-handler) (8 . 2) #s(file-notify--watch
/home/albinus/src/tramp/lisp nil auto-revert-notify-handler) (9 . 0)
#s(file-notify--watch /home/albinus/src/tramp nil auto-revert-notify-handler)
(1 . 14) #s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1
. 15) #s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 .
16) #s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (4 . 2)
#s(file-notify--watch /usr/local/src/elpa nil auto-revert-notify-handler) (4 .
3) #s(file-notify--watch /usr/local/src/elpa nil auto-revert-notify-handler) (3
. 13) #s(file-notify--watch /usr/local/src/elpa/packages/debbugs nil
auto-revert-notify-handler) (3 . 14) #s(file-notify--watch
/usr/local/src/elpa/packages/debbugs nil auto-revert-notify-handler) (3 . 15)
#s(file-notify--watch /usr/local/src/elpa/packages/debbugs nil
auto-revert-notify-handler) (3 . 16) #s(file-notify--watch
/usr/local/src/elpa/packages/debbugs nil auto-revert-notify-handler) (4 . 4)
#s(file-notify--watch /usr/local/src/elpa nil auto-revert-notify-handler) (4 .
5) #s(file-notify--watch /usr/local/src/elpa nil auto-revert-notify-handler) (3
. 17) #s(file-notify--watch /home/albinus/src/elpa/packages/debbugs nil
auto-revert-notify-handler) (3 . 18) #s(file-notify--watch
/usr/local/src/elpa/packages/debbugs nil auto-revert-notify-handler) (1 . 17)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 18)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 19)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 20)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 21)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 22)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 23)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 24)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 25)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 26)
#s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 . 27)
#s(file-notify--watch /home/albinus .newsrc-dribble auto-revert-notify-handler)
(1 . 28) #s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1
. 29) #s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (1 .
30) #s(file-notify--watch /home/albinus nil auto-revert-notify-handler) (10 .
0) #s(file-notify--watch /usr/local/share/emacs/27.0.50/lisp filenotify.el.gz
auto-revert-notify-handler) (10 . 1) #s(file-notify--watch
/usr/local/share/emacs/27.0.50/lisp nil auto-revert-notify-handler)))
As we can see, many identical entries #s(file-notify--watch /home/albinus nil
auto-revert-notify-handler).
Every incoming event for "/home/albinus" triggers the many calls of
`auto-revert-notify-handler', although one entry would be sufficient. I
will check, where all these entries come from.
Best regards, Michael.
- bug#33194: 26.1; Auto-revert mode causes emacs to use 100% cpu whenever a file is being written to in the home directory,
Michael Albinus <=