From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Peter Ludemann Newsgroups: gmane.emacs.bugs Subject: bug#38644: 26.3; emacs uses 100% CPU with auto-revert-mode Date: Tue, 17 Dec 2019 10:27:36 -0800 Message-ID: References: <83fthj3p1b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ab50c50599ea7d17" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="206068"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38644@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 17 19:33:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ihHej-000rRw-6Y for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Dec 2019 19:33:13 +0100 Original-Received: from localhost ([::1]:45064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihHeh-0007ab-NM for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Dec 2019 13:33:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46655) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihHak-00030x-1R for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2019 13:29:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihHai-0005VK-Ls for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2019 13:29:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36412) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihHai-0005VD-I0 for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2019 13:29:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ihHag-0006AG-E1 for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2019 13:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Peter Ludemann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Dec 2019 18:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38644 X-GNU-PR-Package: emacs Original-Received: via spool by 38644-submit@debbugs.gnu.org id=B38644.157660730223647 (code B ref 38644); Tue, 17 Dec 2019 18:29:02 +0000 Original-Received: (at 38644) by debbugs.gnu.org; 17 Dec 2019 18:28:22 +0000 Original-Received: from localhost ([127.0.0.1]:42385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihHa2-00069K-8J for submit@debbugs.gnu.org; Tue, 17 Dec 2019 13:28:22 -0500 Original-Received: from mail-lf1-f53.google.com ([209.85.167.53]:41869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihHa0-000697-4f for 38644@debbugs.gnu.org; Tue, 17 Dec 2019 13:28:20 -0500 Original-Received: by mail-lf1-f53.google.com with SMTP id m30so7663576lfp.8 for <38644@debbugs.gnu.org>; Tue, 17 Dec 2019 10:28:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=Ro1zzJ8l7OM1AmDdCpAV4Bkh0ESf9OvlfKXE9/4U8KY=; b=YY3xsiTjXNWM54wjuPRS5LffN3vczabUnHJJDrCnrz/7z5l3d2O6wgc4ajlKbEynB/ VYxXiOfZZS8oxdiVRsBab35LM0PclOmihM8e1OqNHOIUyYdu9XjmbO0ZHN6dlXGOivBd RirNn6gxdc29Ho829rGYTxWPMebapw6XYLcvHT9Zxg1Bw/A9P8c9ywt0LzBcc1Fb0PSc /rCQpmsaVeWdCifbwzphLcSNrAsM23AWn3FbCTzLTWm0OWRNL5TnYdGlW4cz1Ji8iuFq EBV6br+uCx9goypwoFUVId38hDhDeGlzxrCkw5hGtgNMV+MsikFGhhvozx9Od8LNmC/l R72g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=Ro1zzJ8l7OM1AmDdCpAV4Bkh0ESf9OvlfKXE9/4U8KY=; b=LYRhAjvBgQhZL5xILJhycowyuVWr1tBTtXL2bv//vnYCpkXZKgRFZS90nhrKDfhj8a rsVXY2dOk+F6AeYTu3XHwE2cwbx9sq8L2QFYSQzLOJM86W+hkjEVieIe+aLtWfd0lfZz 9jyP0cNR9tk8s/PdFFSOShzf2ZjBV+PNa34cqkbJGH+UzCxDlo98Me8ixpX7YLwK/8km VASCwnWM8wWmYNiNc5uVSHrR2yZ0mG/idikaupNirH2aKFIuTZ0lG66Od72ByupeTUdE eUKezUwvC4RetvK5OeABQ6o53DPXV4yy7KykZHmYQH1M6bIz2YjkPazPn5KFQlCqYB2K x96w== X-Gm-Message-State: APjAAAX+zh1aJE95SEugH53plYhrXY1JiF8Xfxzb1WnCcXXvQMqC8l7W FGWKTI9eC4xTq8dsUF1XCKwceaSR14ojjdSxtQOarCBkdgk= X-Google-Smtp-Source: APXvYqyzw8KIzU7gWHUciOvrrwcbKrl3/vOdSxRQX2azu/ZwaBtNU+JTKHQViGqgoAi5BzHmQhiRqbnW/PT2YgmyKXo= X-Received: by 2002:a19:cb54:: with SMTP id b81mr3594525lfg.188.1576607293328; Tue, 17 Dec 2019 10:28:13 -0800 (PST) In-Reply-To: <83fthj3p1b.fsf@gnu.org> 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: 209.51.188.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:173495 Archived-At: --000000000000ab50c50599ea7d17 Content-Type: text/plain; charset="UTF-8" So many questions (thank-you!) ... I'll try to answer them soon (and there are also a few experiments I should try first). But first: I see different versions of this discussion at https://lists.gnu.org/archive/html/bug-gnu-emacs/2018-10/msg00997.html and http://emacs.1067599.n8.nabble.com/bug-33194-26-1-Auto-revert-mode-causes-emacs-to-use-100-cpu-whenever-a-file-is-being-written-to-in-ty-tt468378.html#none (the former has a 2nd thread, which mentions the patch in Emacs 27) ... what is the correct way to interact with emacs bugs? On Tue, 17 Dec 2019 at 08:17, Eli Zaretskii wrote: > > From: Peter Ludemann > > Date: Mon, 16 Dec 2019 17:23:30 -0800 > > > > My hypothesis is that emacs is monitoring some files that it shouldn't > > Emacs actually monitors the directory of every file whose buffer has > auto-revert-mode turned on, if you use file notifications for > auto-reverting (which is the default). > > > When I run a CPU-bound job that also does quite a bit of I/O, emacs > > becomes very unresponsive -- running "top", I see CPU usage for emacs go > > into the 50-100% range. > > Does "a bit of I/O" includes creating, deleting, or modifying files in > a directory where you have a file whose buffer has auto-revert-mode? > > > As far as I know, I don't have any of the output files or directories > > open (I have global-auto-revert-mode set) -- all the outputs go into one > > directory and when I search the Buffer List, I don't see that > > directory. > > Turn off auto-revert-use-notify and try again, would be my advice. > --000000000000ab50c50599ea7d17 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
So many questions (thank-you!) ... I'll try to answer them = soon (and there are also a few experiments I should try first).

<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">But fi= rst: I see different versions of this discussion at=C2=A0https://lists.gnu.org/archive/html/b= ug-gnu-emacs/2018-10/msg00997.html=C2=A0and=C2=A0http://emacs.1067599.n8.nabble= .com/bug-33194-26-1-Auto-revert-mode-causes-emacs-to-use-100-cpu-whenever-a= -file-is-being-written-to-in-ty-tt468378.html#none=C2=A0(the former has= a 2nd thread, which mentions the patch in Emacs 27) ... what is the correc= t way to interact with emacs bugs?


On Tue, 17 Dec 2019 at 08:17= , Eli Zaretskii <eliz@gnu.org> wr= ote:
> From: = Peter Ludemann <peter.ludemann@gmail.com>
> Date: Mon, 16 Dec 2019 17:23:30 -0800
>
> My hypothesis is that emacs is monitoring some files that it shouldn&#= 39;t

Emacs actually monitors the directory of every file whose buffer has
auto-revert-mode turned on, if you use file notifications for
auto-reverting (which is the default).

> When I run a CPU-bound job that also does quite a bit of I/O, emacs > becomes very unresponsive -- running "top", I see CPU usage = for emacs go
> into the 50-100% range.

Does "a bit of I/O" includes creating, deleting, or modifying fil= es in
a directory where you have a file whose buffer has auto-revert-mode?

> As far as I know, I don't have any of the output files or director= ies
> open (I have global-auto-revert-mode set) -- all the outputs go into o= ne
> directory and when I search the Buffer List, I don't see that
> directory.

Turn off auto-revert-use-notify and try again, would be my advice.
--000000000000ab50c50599ea7d17--