From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#38644: 26.3; emacs uses 100% CPU with auto-revert-mode Date: Tue, 17 Dec 2019 14:59:23 +0100 Message-ID: <877e2vyrwk.fsf@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="96245"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 38644@debbugs.gnu.org To: Peter Ludemann Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 17 15:00:42 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 1ihDP0-000Oh0-LA for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Dec 2019 15:00:42 +0100 Original-Received: from localhost ([::1]:40834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihDOx-000605-Vi for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Dec 2019 09:00:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47812) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihDOO-0005qp-Oo for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2019 09:00:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihDON-0007fG-Aq for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2019 09:00:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34886) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihDON-0007dc-2X for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2019 09:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ihDON-0003H9-0N for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2019 09:00:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Dec 2019 14:00: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.157659117312520 (code B ref 38644); Tue, 17 Dec 2019 14:00:02 +0000 Original-Received: (at 38644) by debbugs.gnu.org; 17 Dec 2019 13:59:33 +0000 Original-Received: from localhost ([127.0.0.1]:40859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihDNs-0003Fr-PZ for submit@debbugs.gnu.org; Tue, 17 Dec 2019 08:59:33 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:58907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihDNr-0003Ff-E8 for 38644@debbugs.gnu.org; Tue, 17 Dec 2019 08:59:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1576591164; bh=/M4Os38F26llssxb+Vk4WE+eTaSaC1kBevLPeKQ+t5A=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=HNsszOSnPZQ0XwlwPiim+P74OtgQPNCHZsmMsu1Wk/25miSgTxPnFE5ZHSDb+qI/Y mSv63UnBEk3sfvmHf2d7sxp0ZnahfCz+1fzHsSm9mtAr4pVoE0xgTSbVvJfYn0YHHc 87b2tpVHdsSoAvLdOPkQueQJQXunmEPtnX0rX83Q= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from detlef.gmx.de ([217.70.140.123]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MTABT-1iGUVv2XjL-00UZbG; Tue, 17 Dec 2019 14:59:24 +0100 In-Reply-To: (Peter Ludemann's message of "Mon, 16 Dec 2019 17:23:30 -0800") X-Provags-ID: V03:K1:LHjky5l63brlyt8oZqhp9gqgGv7ZHqs0TN6pWG+A/Pytld8hI4n 6Eo9JAOJ0ZQK2Q/JGh5y1EpxWyH0msHxl0EvWZxpOv/WQWR0k4Z3+oVw6FEXsqWcecxkGjs XKNN5A8JDeqghL4X232eGt50W8XetLEV4WfjL07+Bk7fCZG6bxPiht0Xp1jPp+wkDhjUpo2 JnIGdneqlJFHB8lKhfLjw== X-UI-Out-Filterresults: notjunk:1;V03:K0:J5S/9sQ4VNg=:CSTss2LP0ha7XbL759vhbz nOXtdLIkk8keNl8i6Ukt9gNVzJXi8NuKK8NvdxFSEMuf0IMuSH807wZlkbrWKmQjWBAp/09tw qJIPnwWPJgrYLDeggd8YmilccVVOH9F0uIBjQkObIKmnRKIpubnTAp5n/WNp1kln2ZKZwJHTU H70emsoxc+RMr4GP6DRUq8Dv5OiK7l0caWpyFCGrrwcPnzk0imaae5gLF/UPDtRdfF0vjUz+Z 7mzcvytLoQkMUpY+Ko+PGuGEao8xf+t0uv22cFGyjmqKVUydby0n62enk8BJIdJVSBhfxmiY8 K+iuJrPW8S0rzDQsE+qzsWVHtY6oCRuOhwMlJJrdAJsCLVxX8K+R27HC96fc+n/dH9uMdE70D WlzEkx9QtPfRBy3yJhf8R3CgYRQQkT5iNHLmhCXKVPqhkJy1aG98eM4TY4kiDSSOedf8iZcJ4 6xu4qnZsPbKMwgtEIP+S11J02HCR9iJ/Yj6b4bDFqSywXlU9sp4HoJFi36jnfUFYmR4YhN8bu Qu0s3dhdLg0rgk7uajHKMPlx2XJoI9VVv/1ueN4ucd4gBNLV50SJf7QpR6vb49xegV8BL8vTJ EshRlN4rWDECwGz46tqmRu/vrRXGPz7APpGt5JDfA/xLzdRZB8ncyT6FKvI37o47gmWRdCkhZ MPZBoZL+LJAEWhOGNwNyTOFW7+Fa3MOsBi52nqGuENsJhqenlIczmDi9K8sSj7CiwbRyVs0rB 1CEukHqBEiGOpbgBltbIlCuUzkxzx8Gi+gy6RJRlr14fHsyUNNaUikr47hzNOZIcd0Fcxv/A 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:173482 Archived-At: Peter Ludemann writes: Hi Peter, > This problem occurs with emacs 26.3 but didn't occur with 25.x. > Possibly related to bug#33194. That's a good catch. > My hypothesis is that emacs is monitoring some files that it shouldn't > but I need some help in figuring out which files are being monitored > and whether that is indeed a bug. > > 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. (Ubuntu 18.04, emacs 26.3 on a 4-CPU > machine with SSD disk) > > The job I'm running is > parallel -v --will-cite --keep-order --group -L80 -j8 > (the problem does not go away when I change to "-j3") You are reading commands from STDIN? Which? > 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. It might be the default directory of a buffer not bound to a file. > I upgraded from emacs 25.3 to 26.3 today, with the same . > emacs.desktop, and the problem wasn't showing with emacs 25.3. In bug#33194, a patch for Emacs 27.0.50 is mentioned. Do you have a chance to run this for test? > Any suggestions on how to track down what's causing the polling? As I > mentioned, this didn't happen with emacs 25.3 with the same files > open. It also doesn't happen when I start 26.3 without the > .emacs.desktop (that is, with nothing in the Buffer List). Could you show the contents of .emacs.desktop? What happens if you set auto-revert-use-notify to nil? What's the value of (pp file-notify-descriptors) ? What do you see, if you remove the comment of the message call in file-notify-handle-event (lisp/filenotify.el, line 93)? > "strace -c" emacs when not running the CPU/IO job: > % time seconds usecs/call calls errors syscall > ------ ----------- ----------- --------- --------- ---------------- > 31.63 0.009027 3 2950 2534 recvmsg > 23.19 0.006618 3 2057 poll > 13.38 0.003819 3 1100 rt_sigprocmask > 12.10 0.003454 17 209 pselect6 > 9.17 0.002618 6 466 writev > 7.62 0.002174 5 405 rt_sigreturn > 1.21 0.000344 57 6 openat > 0.37 0.000105 4 30 1 read > 0.31 0.000089 3 26 timerfd_settime > 0.28 0.000080 11 7 ioctl > 0.22 0.000064 64 1 vfork > 0.11 0.000032 11 3 fcntl > 0.11 0.000030 4 8 close > 0.09 0.000026 1 51 9 stat > 0.06 0.000017 17 1 pipe2 > 0.06 0.000016 0 48 11 faccessat > 0.04 0.000011 11 1 getuid > 0.03 0.000009 5 2 wait4 > 0.01 0.000003 1 4 write > 0.00 0.000000 0 3 fstat > 0.00 0.000000 0 3 lseek > 0.00 0.000000 0 1 inotify_add_watch > 0.00 0.000000 0 1 1 readlinkat > ------ ----------- ----------- --------- --------- ---------------- > 100.00 0.028536 7383 2556 total inotify_add_watch is an indication, that file notifications are in place. Best regards, Michael.