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: Mon, 16 Nov 2020 22:16:12 +0200 Message-ID: <838sb1rrar.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17430"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43389@debbugs.gnu.org To: fweimer@redhat.com, carlos@redhat.com, dj@redhat.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 16 21:17: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 1kekw4-0004Mt-8n for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Nov 2020 21:17:12 +0100 Original-Received: from localhost ([::1]:34308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kekw3-00060X-7L for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Nov 2020 15:17:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kekvu-0005yU-G6 for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 15:17:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kekvu-0001Y1-4R for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 15:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kekvt-0006mM-PT for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 15:17:01 -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, 16 Nov 2020 20:17:01 +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.160555779526023 (code B ref 43389); Mon, 16 Nov 2020 20:17:01 +0000 Original-Received: (at 43389) by debbugs.gnu.org; 16 Nov 2020 20:16:35 +0000 Original-Received: from localhost ([127.0.0.1]:57411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kekvS-0006lf-W0 for submit@debbugs.gnu.org; Mon, 16 Nov 2020 15:16:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kekvO-0006lN-Up for 43389@debbugs.gnu.org; Mon, 16 Nov 2020 15:16:33 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40825) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kekvI-0001Eo-R0; Mon, 16 Nov 2020 15:16:24 -0500 Original-Received: from [176.228.60.248] (port=1578 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kekvD-0004Cu-8W; Mon, 16 Nov 2020 15:16:20 -0500 In-Reply-To: <83lff6zm8f.fsf@gnu.org> (message from Eli Zaretskii on Thu, 12 Nov 2020 16:24:48 +0200) 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:193468 Archived-At: Bringing on board of this discussion glibc malloc experts: Florian Weimer, DJ Delorie, and Carlos O'Donell. For some time (several months, I think) we have reports from Emacs users that the memory footprints of their Emacs sessions sometimes start growing very quickly, from several hundreds of MBytes to several gigabytes in a day or even just few hours, and in some cases causing the OOMK to kick in and kill the Emacs process. Please refer to the details described in the discussions of this bug report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43389 and 3 other bugs merged to it, which describe what sounds like the same problem. The questions that I'd like to eventually be able to answer are: . is this indeed due to some malloc'ed chunk that is being used for prolonged periods of time, and prevents releasing parts of the heap to the system? IOW, is this pathological, but correct behavior, or is this some bug? . if this is correct behavior, can Emacs do something to avoid triggering it? For example, should we consider tuning glibc's malloc in some way, by changing the 3 calls to mallopt in init_alloc_once_for_pdumper? Your thoughts and help in investigating these problems will be highly appreciated. Please feel free to ask any questions you come up with, including about the details of Emacs's memory management and anything related. Thanks!