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: Tue, 24 Nov 2020 21:35:03 +0200 Message-ID: <83d002tuoo.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> <87ft4ytw2c.fsf@mail.trevorbentley.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36919"; 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 Tue Nov 24 20:36:09 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 1khe6j-0009Tu-Nj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Nov 2020 20:36:09 +0100 Original-Received: from localhost ([::1]:57734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khe6i-0001mI-PP for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Nov 2020 14:36:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khe6c-0001lw-Qh for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 14:36:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khe6c-0004DG-Je for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 14:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khe6c-0000kg-Hb for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 14:36: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: Tue, 24 Nov 2020 19:36: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.16062465162830 (code B ref 43389); Tue, 24 Nov 2020 19:36:02 +0000 Original-Received: (at 43389) by debbugs.gnu.org; 24 Nov 2020 19:35:16 +0000 Original-Received: from localhost ([127.0.0.1]:33056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khe5r-0000jZ-If for submit@debbugs.gnu.org; Tue, 24 Nov 2020 14:35:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khe5p-0000jM-1f for 43389@debbugs.gnu.org; Tue, 24 Nov 2020 14:35:13 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49575) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khe5j-00041u-BD; Tue, 24 Nov 2020 14:35:07 -0500 Original-Received: from [176.228.60.248] (port=1958 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1khe5h-0006ap-OB; Tue, 24 Nov 2020 14:35:06 -0500 In-Reply-To: <87ft4ytw2c.fsf@mail.trevorbentley.com> (message from Trevor Bentley on Tue, 24 Nov 2020 20:05:15 +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:194106 Archived-At: > From: Trevor Bentley > Cc: bugs@gnu.support, fweimer@redhat.com, 43389@debbugs.gnu.org, > dj@redhat.com, michael_heerdegen@web.de, carlos@redhat.com > Cc: > Date: Tue, 24 Nov 2020 20:05:15 +0100 > > I just updated the log on my website. Same instance a day later, > after yet another memory spike up to 4.3GB. Concatenated to the > end: > > https://trevorbentley.com/emacs_malloc_info.log I don't think I can interpret that. In particular, how come "total" is 4GB, but I see no comparable sizes in any of the other fields? where do those 4GB hide? Carlos, can you help interpreting this report? > Some interesting observations: > - (garbage-collect) takes forever, like on the order of 5-10 > minutes, with one CPU core pegged to 100% and emacs frozen. Is this with the default values of gc-cons-threshold and gc-cons-percentage? > - The leaking stops for a while after (garbage-collect). It was > leaking 1MB per second for this last log, and stopped growing > after the garbage collection. Now, what happens in that session once per second (in an otherwise idle Emacs, I presume?) to cause such memory consumption? Some timers? If you run with a breakpoint in malloc that just shows the backtrace and continues, do you see what could consume 1MB every second? > Question 1: (garbage-collect) shows the memory usage *after* > collecting, right? Yes. > Is there any way to get the same info without actually reaping dead > references? What do you mean by "reaping dead references" here? > It could be that there really were 4.3GB of dead references. Not sure I understand what are you trying to establish here. > Question 2: are the background garbage collections equivalent to > the (garbage-collect) function? I certainly don't notice 5-10 > minute long pauses during normal use, though "gcs-done" is > incrementing. Does it have a different algorithm for partial > collection during idle, perhaps? There's only one garbage-collect, it is called for _any_ GC. What do you mean by "during normal use" in this sentence: I certainly don't notice 5-10 minute long pauses during normal use, though "gcs-done" is incrementing. How is what you did here, where GC took several minutes, different from "normal usage"? > Question 3: I've never used the malloc_trim() function. Could > that be something worth experimenting with, to see if it releases > any of the massive heap back to the OS? That's for glibc guys to answer. Thanks.