From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Trevor Bentley Newsgroups: gmane.emacs.bugs Subject: bug#43389: 28.0.50; Emacs memory leaks using hard disk all time Date: Mon, 30 Nov 2020 18:17:28 +0100 Message-ID: <87pn3usr13.fsf@mail.trevorbentley.com> References: <83y2j0qb2v.fsf@gnu.org> <83zh3czbvz.fsf@gnu.org> <83blfovzxz.fsf@gnu.org> <87o8jnu5f2.fsf@mail.trevorbentley.com> <83o8jmu49z.fsf@gnu.org> <522e3cc0-c563-3308-7264-1b09cd5e264b@redhat.com> <87o8jltglg.fsf@mail.trevorbentley.com> <43b8f55b-d201-76e0-2d19-d97dec8798aa@redhat.com> <87im9ttfeg.fsf@mail.trevorbentley.com> <399d4681-940a-c782-b91e-750e62840cb6@redhat.com> <83pn40qkyb.fsf@gnu.org> <418751f6-41be-a5e2-908a-ea4196d5fb9b@redhat.com> <83y2inq2sp.fsf@gnu.org> <60253612-49f0-a1aa-b9e6-39cfef8d62b5@redhat.com> <83mtz3p7qy.fsf@gnu.org> <83lfenp78f.fsf@gnu.org> <83h7pbp5wh.fsf@gnu.org> <83v9dpn9em.fsf@gnu.org> <87sg8ts766.fsf@mail.trevorbentley.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23986"; mail-complaints-to="usenet@ciao.gmane.io" Cc: fweimer@redhat.com, 43389@debbugs.gnu.org, bugs@gnu.support, dj@redhat.com, michael_heerdegen@web.de, To: Eli Zaretskii , carlos@redhat.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 30 18:18:13 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 1kjmoW-00068F-Eh for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Nov 2020 18:18:12 +0100 Original-Received: from localhost ([::1]:55788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjmoV-0002bz-DQ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Nov 2020 12:18:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjmoM-0002ak-IG for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2020 12:18:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44982) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjmoM-00015W-AX for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2020 12:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjmoM-0005Qb-6B for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2020 12:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Trevor Bentley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Nov 2020 17:18: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.160675665820826 (code B ref 43389); Mon, 30 Nov 2020 17:18:02 +0000 Original-Received: (at 43389) by debbugs.gnu.org; 30 Nov 2020 17:17:38 +0000 Original-Received: from localhost ([127.0.0.1]:56526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjmnx-0005Pq-Un for submit@debbugs.gnu.org; Mon, 30 Nov 2020 12:17:38 -0500 Original-Received: from mail.trevorbentley.com ([37.187.5.80]:35651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjmnx-0005L8-2y for 43389@debbugs.gnu.org; Mon, 30 Nov 2020 12:17:37 -0500 Original-Received: from localhost (c188-150-0-48.bredband.comhem.se [188.150.0.48]) by mail.trevorbentley.com (Postfix) with ESMTPSA id 937E7602C8; Mon, 30 Nov 2020 18:17:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.trevorbentley.com; s=mail; t=1606756649; bh=AQ9D0+k22Us+dPUGA/3wK2zYbzr76otqUNZ2nz5/oWM=; h=From:To:Cc:Cc:Subject:In-Reply-To:References:Date:From; b=PMo///+h9f6KeQMUpxFx5qYq8TBwLjtoTY/4AHOoLgz9r69PuxfrJLy6Kgzlhd4Jw kmh8oaLFJ/rXVGxU2RoAGC3RiyXuPn5+GxzjJfuDMCaho+SQOV1cOxQZ6gjX/NhhkT aqaRxDHCjz6lwZq90JKoLZRQIUwV8e9Q6VU6eRxs= In-Reply-To: <87sg8ts766.fsf@mail.trevorbentley.com> 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:194661 Archived-At: > I'll have an mtrace for you from the current experiment (X11 > focus leak) tomorrow or Monday. I hope it's the same issue. Ok, here is my latest memory log and a matching libmtrace: https://trevorbentley.com/mtrace3/ This capture is unique in three ways: 1) Compared to my other tests, this one did not run emacs-slack and did about half of its leaking from X11 focus events, and the other half drifting upwards during idle. This session has barely done anything. 2) I added a custom (malloc-trim) command, and called it after making my standard memory log. At the end of the log, you can see that after the trim memory usage fell from 4GB to 50MB. Unfortunately, this malloc_trim() might make the libmtrace trace harder to make sense of. But, at least in this case, it meant 99% of the memory could be given back to the OS? 3) I ran the built-in emacs profiler. The profiler memory results are in the log, both in normal and reversed format, with the largest element expanded. I don't know how to interpret it, but it looks like maybe a periodic timer started by helm is responsible for 3+GB of RAM? Also note that the (garbage-collect) call is timed now. 318 seconds for this one. -Trevor