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 11:59:42 +0200 Message-ID: References: <86y2j2brg2.fsf@protected.rcdrun.com> <83blfxth7c.fsf@gnu.org> <83y2j0qb2v.fsf@gnu.org> <831rgppg3w.fsf@gnu.org> <83zh3czbvz.fsf@gnu.org> <83k0udw3jb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32791"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android 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 11:00:12 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 1kh8dn-0008Pa-Tc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 11:00:11 +0100 Original-Received: from localhost ([::1]:58588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kh8dm-0008JI-EU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 05:00:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kh8df-0008J7-Dq for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 05:00:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37493) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kh8df-0006BT-4s for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 05:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kh8de-0005kd-VU for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 05:00: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 10:00: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.160612559822065 (code B ref 43389); Mon, 23 Nov 2020 10:00:02 +0000 Original-Received: (at 43389) by debbugs.gnu.org; 23 Nov 2020 09:59:58 +0000 Original-Received: from localhost ([127.0.0.1]:49039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kh8dZ-0005jo-Np for submit@debbugs.gnu.org; Mon, 23 Nov 2020 04:59:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kh8dV-0005ja-CZ for 43389@debbugs.gnu.org; Mon, 23 Nov 2020 04:59:56 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40523) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kh8dO-000643-Td; Mon, 23 Nov 2020 04:59:46 -0500 Original-Received: from [2a02:14f:80:56e9::1] (port=42526) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1kh8dN-0005ZB-AI; Mon, 23 Nov 2020 04:59:46 -0500 In-Reply-To: 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:193901 Archived-At: On November 23, 2020 10:11:22 AM GMT+02:00, Jean Louis = wrote: > * Eli Zaretskii [2020-11-22 23:17]: > > > Date: Sun, 22 Nov 2020 22:52:14 +0300 > > > From: Jean Louis > > > Cc: fweimer@redhat=2Ecom, 43389@debbugs=2Egnu=2Eorg, dj@redhat=2Ecom= , > > > michael_heerdegen@web=2Ede, trevor@trevorbentley=2Ecom, > carlos@redhat=2Ecom > > >=20 > > > I am now following this strategy here: > > > > https://github=2Ecom/jemalloc/jemalloc/wiki/Use-Case%3A-Leak-Checking > >=20 > > That uses a different implementation of malloc, so I'm not sure it > > will help us=2E >=20 > It will not help if you are able to interpret the PDF reports and you > do not see anything helpful=2E If you do interpret those PDF reports > please tell me as such could be useful to find possible causes or find > other issues in Emacs=2E Granted, I looked at the reports before writing that response=2E I don't = see there anything related to Emacs code=2E > Does this here tells you anything? > https://gnu=2Esupport/files/tmp/2020-11-22/jeprof=2E26889=2E0=2Ef=2Eheap= =2Epdf It says that most of memory was allocated by a subroutine of jemalloc=2E = As I'm not familiar with how jemalloc works, I see no way for us to draw an= y significant conclusions from that=2E > Does this add module isra=2E0 inside tells you anything? AFAIU, it's some internal jemalloc midule=2E > I am using dynamic modules like vterm and libpq, can that influence > memory or create memory leaks? I have no idea, but I don't think I see any of their functions in these re= ports=2E > What is tst_post_reentrancy_raw, is that something that eats memory? I don't know=2E It's something internal to jemalloc=2E > I am still running this session with jemalloc and I wish to see if > anything will happen that blocks the work similar how it blocks with > the normal run=2E This helps slightly in determination=2E As if run of > Emacs with jemalloc does not cause problems one time, maybe 2-5 times > or 10 times, that may be deduce problem to standard malloc and not > Emacs=2E The glibc malloc is the prime suspect anyway=2E I don't really believe Em= acs had such a glaring memory leak=2E So trying different malloc implement= ations is from my POV waste of time at this stage=2E > Then in the next session I will try again the tools as described and > submit data=2E >=20 > To help me understand, do you think problem is in Emacs or in glibc > malloc? I suspect the problem is in how we use glibc's malloc -- there are some us= age patterns that cause glibc to be suboptimal in its memory usage, and I h= ope we will find ways to fine tune it to our needs=2E But that is just a guess, and so I wish you'd use the tools pointed out by= Carlos, because they are the most efficient way of collecting evidence tha= t might allow us to make some progress here=2E We have the attention of the best experts on the issue; let's use their at= tention and their time as best as we possibly can=2E TIA