From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs 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 Message-ID: <87d0rmjumt.fsf@gmx.de> References: <878t2gbisr.fsf@gmx.de> <83pnvskl8b.fsf@gnu.org> <83lg6fjq6f.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1541242585 9021 195.159.176.226 (3 Nov 2018 10:56:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Nov 2018 10:56:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 33194@debbugs.gnu.org To: Justin Van Winkle Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 03 11:56:20 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gItbI-0002Fs-9s for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Nov 2018 11:56:20 +0100 Original-Received: from localhost ([::1]:55093 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gItdO-0007B9-EA for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Nov 2018 06:58:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gItdD-0006pR-D0 for bug-gnu-emacs@gnu.org; Sat, 03 Nov 2018 06:58:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gItcz-0005Sc-JJ for bug-gnu-emacs@gnu.org; Sat, 03 Nov 2018 06:58:10 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56395) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gItcy-0005N7-5K for bug-gnu-emacs@gnu.org; Sat, 03 Nov 2018 06:58:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gItcx-00027g-Vi for bug-gnu-emacs@gnu.org; Sat, 03 Nov 2018 06:58:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Nov 2018 10:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33194 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33194-submit@debbugs.gnu.org id=B33194.15412426778148 (code B ref 33194); Sat, 03 Nov 2018 10:58:02 +0000 Original-Received: (at 33194) by debbugs.gnu.org; 3 Nov 2018 10:57:57 +0000 Original-Received: from localhost ([127.0.0.1]:60653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gItcr-00027L-1m for submit@debbugs.gnu.org; Sat, 03 Nov 2018 06:57:57 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:54269) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gItcp-000279-Gm for 33194@debbugs.gnu.org; Sat, 03 Nov 2018 06:57:56 -0400 Original-Received: from detlef.gmx.de ([79.140.122.77]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LsChr-1fXtQp1IFD-013yhh; Sat, 03 Nov 2018 11:57:48 +0100 Original-Received: from detlef.gmx.de ([79.140.122.77]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LsChr-1fXtQp1IFD-013yhh; Sat, 03 Nov 2018 11:57:48 +0100 In-Reply-To: (Justin Van Winkle's message of "Tue, 30 Oct 2018 14:55:22 -0400") X-Provags-ID: V03:K1:ZLte9qNVEVef0IwEP5QHm/ggswMoxG14AI2ajgY/7UIBxzw3HsC U7i83XS58y77hQAqcLVjZbkt9PNmQCESjI4IygrlKEZN10XCNRqxQSzVpQ/1jOSqpjMKTJ7 qWR3GQOvQQNO52QW3FBqO3AibLwJ8QK8jcE1yVf0L42zPUM5ykLnMEyZPQjkUN9IPFw/IIb S0uMW3S84wCgeqhN0VuhQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:pE08IIuz0tA=:vZ+L1GmqLwhl5mN9ORRtd1 wfHmXnYMxbwFwhdm5PjCbA7CJU53N1uwAdKCD7mkxWh8vieEsprZP7j15/yacyO3pFmhHCTyI T+wHxZp/roriV+6LHFZ2QuZ1gfpjSvil/dYL0ctNOSU3ZApLCCws9EFndoff6gYLcKx541DyC sQBzZuuK6gqE7xcE6bFd0YB1UGTigA737QQKwJ4FvkuJMcXMIxT5Wl+vo3mirH46+7Pogey9v rjkXqHsG8X569+WdfjtDOpAUH4l36ty0ZqVGQJrIAva7hX83x3Xc4T6mjPYSSs1euQtqHJSra K39neehi83cg3aWUQEBuqQkuJsY15Znja4ERWXsOl7PTA0EaBQGnOF4CNGYNmsidFPk9FLDKn JauVouWu61iQieNRsqEkEA7UfeqRsHE/39JqDqggLfHV6hpuO584AsgH5fAWVucrxWyhi2kp9 vSvJcb8u6iJGQJ50y/Tnt9iVI9ZeTjuUeOH869R/2Swa2uBA0DBvwgcOgQ/p23qlWFo6kiMoW e3WZPj89pEya6g/YIJ0XILx7zZ2YuRUNyxfSmQM+ybjwbCdwGAmWD57GnN714RDtho8d6Sd7y Pkt+Dpk3fV7/Ws5it2GOmCJ9Z/dhr1mSJGsFBtV60hGr30qqzxOfnQhvMnS1iKgmmVZ/VVu7I 1ha8HF3NMH6QoUM4K0MGG8TnZlLJeOQIlFvzJr3+UNKBoMi37uLjzosRrf8zsLydHu2Bf0sOm +84+jMMfcB/S/d+g3rHWrKyC7M3XDEmIKuMGVKp1jZoJbMdv/vPbLGmLLlpcR/XitaQJFJoQ 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" Xref: news.gmane.org gmane.emacs.bugs:151975 Archived-At: Justin Van Winkle 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 da= ta ((1 . 0) #s(file-notify--watch /home/albinus .emacs auto-revert-notify-h= andler) (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-notif= y-handler) (1 . 4) #s(file-notify--watch /home/albinus nil auto-revert-noti= fy-handler) (1 . 5) #s(file-notify--watch /home/albinus nil auto-revert-not= ify-handler) (1 . 6) #s(file-notify--watch /home/albinus nil auto-revert-no= tify-handler) (2 . 0) #s(file-notify--watch /usr/local/src/emacs/src nil au= to-revert-notify-handler) (1 . 7) #s(file-notify--watch /home/albinus nil a= uto-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 n= il auto-revert-notify-handler) (1 . 11) #s(file-notify--watch /home/albinus= nil auto-revert-notify-handler) (1 . 12) #s(file-notify--watch /home/albin= us 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-h= andler) (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/sr= c/elpa/packages/debbugs nil auto-revert-notify-handler) (3 . 4) #s(file-not= ify--watch /usr/local/src/elpa/packages/debbugs nil auto-revert-notify-hand= ler) (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 n= il 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-n= otify--watch /usr/local/src/elpa/packages/debbugs nil auto-revert-notify-ha= ndler) (3 . 8) #s(file-notify--watch /usr/local/src/elpa/packages/debbugs n= il 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-not= ify--watch /usr/local/src/elpa/packages/debbugs nil auto-revert-notify-hand= ler) (4 . 0) #s(file-notify--watch /usr/local/src/elpa nil auto-revert-noti= fy-handler) (3 . 11) #s(file-notify--watch /usr/local/src/elpa/packages/deb= bugs nil auto-revert-notify-handler) (5 . 0) #s(file-notify--watch /usr/loc= al/src/emacs-25/doc/misc nil auto-revert-notify-handler) (3 . 12) #s(file-n= otify--watch /home/albinus/src/elpa/packages/debbugs nil auto-revert-notify= -handler) (6 . 0) #s(file-notify--watch /home/albinus/src/tramp/texi nil au= to-revert-notify-handler) (6 . 1) #s(file-notify--watch /home/albinus/src/t= ramp/texi nil auto-revert-notify-handler) (6 . 2) #s(file-notify--watch /ho= me/albinus/src/tramp/texi nil auto-revert-notify-handler) (4 . 1) #s(file-n= otify--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 aut= o-revert-notify-handler) (8 . 2) #s(file-notify--watch /home/albinus/src/tr= amp/lisp nil auto-revert-notify-handler) (9 . 0) #s(file-notify--watch /hom= e/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-noti= fy--watch /home/albinus nil auto-revert-notify-handler) (1 . 16) #s(file-no= tify--watch /home/albinus nil auto-revert-notify-handler) (4 . 2) #s(file-n= otify--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-r= evert-notify-handler) (3 . 14) #s(file-notify--watch /usr/local/src/elpa/pa= ckages/debbugs nil auto-revert-notify-handler) (3 . 15) #s(file-notify--wat= ch /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-r= evert-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/e= lpa nil auto-revert-notify-handler) (3 . 17) #s(file-notify--watch /home/al= binus/src/elpa/packages/debbugs nil auto-revert-notify-handler) (3 . 18) #s= (file-notify--watch /usr/local/src/elpa/packages/debbugs nil auto-revert-no= tify-handler) (1 . 17) #s(file-notify--watch /home/albinus nil auto-revert-= notify-handler) (1 . 18) #s(file-notify--watch /home/albinus nil auto-rever= t-notify-handler) (1 . 19) #s(file-notify--watch /home/albinus nil auto-rev= ert-notify-handler) (1 . 20) #s(file-notify--watch /home/albinus nil auto-r= evert-notify-handler) (1 . 21) #s(file-notify--watch /home/albinus nil auto= -revert-notify-handler) (1 . 22) #s(file-notify--watch /home/albinus nil au= to-revert-notify-handler) (1 . 23) #s(file-notify--watch /home/albinus nil = auto-revert-notify-handler) (1 . 24) #s(file-notify--watch /home/albinus ni= l auto-revert-notify-handler) (1 . 25) #s(file-notify--watch /home/albinus = nil auto-revert-notify-handler) (1 . 26) #s(file-notify--watch /home/albinu= s nil auto-revert-notify-handler) (1 . 27) #s(file-notify--watch /home/albi= nus .newsrc-dribble auto-revert-notify-handler) (1 . 28) #s(file-notify--wa= tch /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-noti= fy--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 n= il 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.