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 Date: Tue, 17 Nov 2020 19:08:24 +0200 Message-ID: <83o8jvrjw7.fsf@gnu.org> References: <87r1r5428d.fsf@web.de> <874kmcvlbj.fsf@mail.trevorbentley.com> <83imasb0te.fsf@gnu.org> <871rgzvbme.fsf@mail.trevorbentley.com> <83lff6zm8f.fsf@gnu.org> <838sb1rrar.fsf@gnu.org> <87wnylm3sw.fsf@oldenburg2.str.redhat.com> <83r1osq96c.fsf@gnu.org> <87o8jwj646.fsf@oldenburg2.str.redhat.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13803"; mail-complaints-to="usenet@ciao.gmane.io" Cc: carlos@redhat.com, 43389@debbugs.gnu.org, dj@redhat.com To: Florian Weimer , Trevor Bentley michael_heerdegen@web.de, Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 17 18:21:27 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 1kf4fW-0003P4-Tr for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Nov 2020 18:21:26 +0100 Original-Received: from localhost ([::1]:56424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kf4fV-0000Ua-Uq for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Nov 2020 12:21:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kf4TW-0002Ba-QB for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 12:09:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49479) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kf4TW-000436-HH for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 12:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kf4TW-0000SA-Bt for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 12:09: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, 17 Nov 2020 17:09: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.16056329181693 (code B ref 43389); Tue, 17 Nov 2020 17:09:02 +0000 Original-Received: (at 43389) by debbugs.gnu.org; 17 Nov 2020 17:08:38 +0000 Original-Received: from localhost ([127.0.0.1]:32783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf4T8-0000RE-KP for submit@debbugs.gnu.org; Tue, 17 Nov 2020 12:08:38 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf4T6-0000R1-2I for 43389@debbugs.gnu.org; Tue, 17 Nov 2020 12:08:37 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57601) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kf4Sz-0003nU-WE; Tue, 17 Nov 2020 12:08:30 -0500 Original-Received: from [176.228.60.248] (port=2386 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kf4Sz-00082a-Bi; Tue, 17 Nov 2020 12:08:29 -0500 In-Reply-To: <87o8jwj646.fsf@oldenburg2.str.redhat.com> (message from Florian Weimer on Tue, 17 Nov 2020 17:33:13 +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:193560 Archived-At: > From: Florian Weimer > Cc: carlos@redhat.com, dj@redhat.com, 43389@debbugs.gnu.org > Date: Tue, 17 Nov 2020 17:33:13 +0100 > > > > > > > Total RSS is 1 GiB, but even 1 GiB minus 200 MiB would be excessive. Yes, I wouldn't expect to see such a large footprint. How long is this session running? (You can use "M-x emacs-uptime" to answer that.) > It's possible to generate such statistics using GDB, by calling the > malloc_info function. Emacs 28 (from the master branch) has recently acquired the malloc-info command which will emit this to stderr. You can see one example of its output here: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44666#5 which doesn't seem to show any significant amounts of free memory at all? I encourage all the people who reported similar problems to try the measures mentioned by Florian and Carlos, including malloc-info, and report the results. > My Emacs process does not look like it suffered from the aligned_alloc > issue. It would leave behind many smaller, unused allocations, not such > large ones. > [...] > >> supported by the system. Setting MALLOC_ARENA_MAX to a small value > >> counteracts that, so it's very simple to experiment with it if you have > >> a working reproducer. > > > > "Small value" being something like 2? > > Yes, that would be a good start. But my Emacs process isn't affected by > this, so this setting wouldn't help there. So both known problems seem to be not an issue in your case. What other reasons could cause that?