From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#43389: 28.0.50; Emacs memory leaks using hard disk all time Date: Thu, 26 Nov 2020 16:30:14 +0200 Message-ID: <83eekgqjgp.fsf@gnu.org> References: <86y2j2brg2.fsf@protected.rcdrun.com> <83blfxth7c.fsf@gnu.org> <83y2j0qb2v.fsf@gnu.org> <831rgppg3w.fsf@gnu.org> <83zh3czbvz.fsf@gnu.org> <83blfovzxz.fsf@gnu.org> <87o8jnu5f2.fsf@mail.trevorbentley.com> <83o8jmu49z.fsf@gnu.org> <522e3cc0-c563-3308-7264-1b09cd5e264b@redhat.com> <87a6v4thst.fsf@mail.trevorbentley.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36259"; mail-complaints-to="usenet@ciao.gmane.io" Cc: fweimer@redhat.com, 43389@debbugs.gnu.org, bugs@gnu.support, dj@redhat.com, carlos@redhat.com, michael_heerdegen@web.de To: Trevor Bentley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 26 15:31:31 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiIJ1-0009K2-19 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Nov 2020 15:31:31 +0100 Original-Received: from localhost ([::1]:49930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiIIz-0003cp-TH for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Nov 2020 09:31:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiIIb-0003ca-K3 for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2020 09:31:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kiIIY-0000V5-5w for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2020 09:31:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kiIIY-0008Sa-28 for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2020 09:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Nov 2020 14:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43389 X-GNU-PR-Package: emacs Original-Received: via spool by 43389-submit@debbugs.gnu.org id=B43389.160640105232504 (code B ref 43389); Thu, 26 Nov 2020 14:31:02 +0000 Original-Received: (at 43389) by debbugs.gnu.org; 26 Nov 2020 14:30:52 +0000 Original-Received: from localhost ([127.0.0.1]:40419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiIIN-0008SC-Ed for submit@debbugs.gnu.org; Thu, 26 Nov 2020 09:30:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiIIC-0008RV-Rf for 43389@debbugs.gnu.org; Thu, 26 Nov 2020 09:30:41 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43182) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiII6-0000GH-Uj; Thu, 26 Nov 2020 09:30:34 -0500 Original-Received: from [176.228.60.248] (port=4181 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kiII6-0001U6-AH; Thu, 26 Nov 2020 09:30:34 -0500 In-Reply-To: <87a6v4thst.fsf@mail.trevorbentley.com> (message from Trevor Bentley on Thu, 26 Nov 2020 13:37:54 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194334 Archived-At: > From: Trevor Bentley > Cc: bugs@gnu.support, fweimer@redhat.com, 43389@debbugs.gnu.org, > dj@redhat.com, michael_heerdegen@web.de > Cc: > Date: Thu, 26 Nov 2020 13:37:54 +0100 > > If it's one trace per thread, though, then we at least know that > my emacs process in question is blazing through threads. I don't see how this could be true, unless some library you use (ImageMagick?) starts a lot of threads. Emacs itself is single-threaded, and the only other threads are those from GTK, which should be very few (like, 4 or 5). This assumes you didn't use Lisp threads, of course. > Other thing to note (for Eli): I wrapped garbage-collect like so: > > --- > (defun trev/garbage-collect (orig-fun &rest args) > (message "%s -- Starting garbage-collect." > (current-time-string)) (let ((time (current-time)) > (result (apply orig-fun args))) > (message "%s -- Finished garbage-collect in %.06f" > (current-time-string) (float-time (time-since time))) result)) > (add-function :around (symbol-function 'garbage-collect) > #'trev/garbage-collect) > --- > > This printed a start and stop message each time I evaluated > garbage-collect manually. It did not print any messages in 11 > hours of running unattended. That's expected, because the automatic GC doesn't call garbage-collect. garbage-collect is just a thin wrapper around a C function, called garbage_collect, and the automatic GC calls that function directly from C. And you cannot advise C functions not exposed to Lisp. If you want to have record of the times it took each GC to run, you will have to modify the C sources.