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: Mon, 23 Nov 2020 17:46:16 +0200 Message-ID: <83blfovzxz.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8646"; mail-complaints-to="usenet@ciao.gmane.io" Cc: fweimer@redhat.com, 43389@debbugs.gnu.org, dj@redhat.com, michael_heerdegen@web.de, trevor@trevorbentley.com, carlos@redhat.com To: Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 23 16:51:17 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 1khE7Y-00022W-1G for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 16:51:16 +0100 Original-Received: from localhost ([::1]:42790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khE7W-0002o9-QW for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 10:51:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khE3V-0006Ng-Mc for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 10:47:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39199) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khE3S-0000lp-4v for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 10:47:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khE3S-0004Ov-2Z for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 10:47: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: Mon, 23 Nov 2020 15:47: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.160614639216880 (code B ref 43389); Mon, 23 Nov 2020 15:47:02 +0000 Original-Received: (at 43389) by debbugs.gnu.org; 23 Nov 2020 15:46:32 +0000 Original-Received: from localhost ([127.0.0.1]:50745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khE2x-0004OB-Qi for submit@debbugs.gnu.org; Mon, 23 Nov 2020 10:46:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khE2w-0004Ny-Ap for 43389@debbugs.gnu.org; Mon, 23 Nov 2020 10:46:30 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46177) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khE2q-0000bT-Hm; Mon, 23 Nov 2020 10:46:24 -0500 Original-Received: from [176.228.60.248] (port=2853 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1khE2o-0003qr-Co; Mon, 23 Nov 2020 10:46:24 -0500 In-Reply-To: (message from Jean Louis on Mon, 23 Nov 2020 13:59:47 +0300) 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:193922 Archived-At: > Date: Mon, 23 Nov 2020 13:59:47 +0300 > From: Jean Louis > Cc: fweimer@redhat.com, 43389@debbugs.gnu.org, dj@redhat.com, > michael_heerdegen@web.de, trevor@trevorbentley.com, carlos@redhat.com > > In the IceWM window manager I have visual representation of memory > usage and that is how I get feeling, there is also tooltip telling me > that more and more memory is used. When it starts to swap like 3 GB > then I turn on symon-mode and in Emacs I see more and more swapping. I think I described how to write an Emacs function that you could use to watch the vsize of the Emacs process and alert you to it being above some threshold. > The heap file is here 24M, maybe not needed for review: > https://gnu.support/files/tmp/2020-11-23/jeprof.23826.0.f.heap > > Visualization is here 20K PDF file: > https://gnu.support/files/tmp/2020-11-23/jeprof.23826.0.f.heap.pdf > > Do you see anything interesting inside that should tell about memory leaks? I'm not sure. I think I see that you have some timer that triggers a lot of memory allocations because it conses a lot of Lisp objects. Whether that is part of the problem or not is not clear. Next time when your session causes the system to swap, please type: M-: (garbage-collect) RET and post here the output of that (it should be a list of numbers whose meanings are explained in the doc string of garbage-collect). Also, I think I asked to tell how large are your buffers by evaluation the following (again, near the point where your session causes the system to page heavily): (let ((size 0)) (dolist (buffer (buffer-list) size) (setq size (+ size (buffer-size buffer))))) It is important to have both these pieces of information from the same session at the same time near the point where you must kill Emacs, so that we know how much memory is actually used by your session at that point (as opposed to memory that is "free" in the heap, but was not returned to the OS). Thanks.