From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.bugs Subject: bug#43389: 28.0.50; Emacs memory leaks using hard disk all time Date: Mon, 23 Nov 2020 18:29:40 +0100 Message-ID: References: <86y2j2brg2.fsf@protected.rcdrun.com> <83blfxth7c.fsf@gnu.org> <83y2j0qb2v.fsf@gnu.org> <831rgppg3w.fsf@gnu.org> <83zh3czbvz.fsf@gnu.org> <83blfovzxz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28605"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: fweimer@redhat.com, 43389@debbugs.gnu.org, Jean Louis , dj@redhat.com, michael_heerdegen@web.de, trevor@trevorbentley.com, carlos@redhat.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 23 18:30:26 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 1khFfW-0007JQ-3V for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 18:30:26 +0100 Original-Received: from localhost ([::1]:43378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khFfV-0005qs-3K for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 12:30:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khFf8-0005pn-Qu for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 12:30:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khFf8-0000EU-Ij for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 12:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khFf8-00075Y-G4 for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 12:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Arthur Miller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Nov 2020 17:30: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.160615259427214 (code B ref 43389); Mon, 23 Nov 2020 17:30:02 +0000 Original-Received: (at 43389) by debbugs.gnu.org; 23 Nov 2020 17:29:54 +0000 Original-Received: from localhost ([127.0.0.1]:51024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khFew-00074o-V7 for submit@debbugs.gnu.org; Mon, 23 Nov 2020 12:29:54 -0500 Original-Received: from mail-vi1eur05olkn2080.outbound.protection.outlook.com ([40.92.90.80]:45537 helo=EUR05-VI1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khFev-00074N-1e for 43389@debbugs.gnu.org; Mon, 23 Nov 2020 12:29:49 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EnzkbDxjnlTf24pAFZ0KpJswiosfb3qMgkBsOTKmQOWbbxQxz0sKjZ6UKBrXnClvw7GNy5TEnCq9WUlNfD7gpLRmtRGJbJifKgf33XLAKTz+wMunSsAW7OIMQkHjpAyu1spqSfLnWqwr7yfrfrzG4WV/KEhpnvgIbAJe7t06QuZ7xN5/KaxWUWyAZ1f6co2LHAdmyaeH4fxzEONF9IHjMEufvZvvjjyu9somqCgaT+RNo9Kg76do5VFUneUIWIdoSfD3P+YNCtWmQeeGTqMxmWH5HQMI9UIqi5DTjP9f0skb85aWZ5m6qPSzQa6lR/D9LQRqyKq6KJYJpYiVu3hlCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JTp4vtm0L2manFS9+b3+MZ4OhAONINDrSazJynyknR0=; b=NMZpTfgwtiRlVtgc+CxtXcEAxasBpzzlr6Zbq7RGSbgRnI+iK/kkLzLIfNNXiL90bGtcDu1zbmp4hZ+yIZ05uw9ffs/VbWzRnMVa0Xwn49VWp1H3Jaim3hAyzx99Dpvl/XHXDA8q0v+DeZObhwx1qGfuIf9zCEvtSPVG5iz1cYLrNPE6xE569ppPQP0fO/WMn/D1uZ79eXRHrcE5xopO/J1zQD8F0x7VBiSzNqNwe8IYho/pnJ0SasgjiDTbSiNyvtd7ShuMYAvb7im4wj81GCShSNBDr2siu2+A4OXGd5Gd6xnaEiInQbhy6VtUf35K26et71R+jorpBMeAq6t3QA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JTp4vtm0L2manFS9+b3+MZ4OhAONINDrSazJynyknR0=; b=M7OStuSVprA/i4B/9f3bDD4P6YV0WYd7UMaevxwI7Z14N6xCMTgn4U+5mn8AE24MGav29Nas1+wzaPb0Wd0o9CfowAxSeS2vhu0MRKEald4/R1xwW9p5ft7uPOTafpukCSlG8pRAqhsRiXpS8nIGfhgMRFv+/wtFvioT8oAbgKD6mgZYPjp11yL3xZPxGXXRLTxoQe176AECEqV31AcnTK5bNe0QbsIpMLaA9e69anhzsnWtRRf7zorA9RdJSw0GklP2XyPt5wgLt2DsChaH7Z127BDWHAldddNyK6sAcsaJtfj9z7E/zW9et6dw1bu6daRa0F3cBIn5QmFhEL6jpw== Original-Received: from AM6EUR05FT039.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::4e) by AM6EUR05HT183.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20; Mon, 23 Nov 2020 17:29:42 +0000 Original-Received: from AM0PR06MB6577.eurprd06.prod.outlook.com (2a01:111:e400:fc11::44) by AM6EUR05FT039.mail.protection.outlook.com (2a01:111:e400:fc11::434) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20 via Frontend Transport; Mon, 23 Nov 2020 17:29:42 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:D4EDC60DCCE878E0FF7D2231E7BFC6D819592BF00AD86660D0287D378910DB1D; UpperCasedChecksum:9E7C0C2499A44F4BCDB7597E9668296A6C2BF9BE68608236A0608C99CF5FFA1F; SizeAsReceived:7847; Count:46 Original-Received: from AM0PR06MB6577.eurprd06.prod.outlook.com ([fe80::9487:8c7d:da00:4993]) by AM0PR06MB6577.eurprd06.prod.outlook.com ([fe80::9487:8c7d:da00:4993%7]) with mapi id 15.20.3589.030; Mon, 23 Nov 2020 17:29:42 +0000 In-Reply-To: <83blfovzxz.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 23 Nov 2020 17:46:16 +0200") X-TMN: [DzqJEG4goGT7ByWby9BMGuIkx722sc6C] X-ClientProxiedBy: AM6PR04CA0007.eurprd04.prod.outlook.com (2603:10a6:20b:92::20) To AM0PR06MB6577.eurprd06.prod.outlook.com (2603:10a6:208:19a::23) X-Microsoft-Original-Message-ID: <87eekkasmz.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM6PR04CA0007.eurprd04.prod.outlook.com (2603:10a6:20b:92::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20 via Frontend Transport; Mon, 23 Nov 2020 17:29:41 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 5083479b-77da-47f9-127e-08d88fd55c99 X-MS-TrafficTypeDiagnostic: AM6EUR05HT183: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vn6IGcXhG5YAeDtAdNmRZ6LaSIZEQ6FOiIt6hYtxQuWuLJfbxbaaVor+agV5QrJbm4ePMSun4rIfI9c6/qNUphGNtxAl1G+FLXbewyAy9anbTU+RDjIcMSWiTFo+8GNBYLZ6STOAwYbsWeTFJEF7DMz1L7qtuDnpGMsPUh5jLOCP7e/AaCUe6ugDyt/DS1XLf6cHPHMqmjRDaGUZ68dyLekaQoiT1fWKFz8d18wQB98kh7ZhrPYxqKujjKjiV3yP X-MS-Exchange-AntiSpam-MessageData: Gvflj5UNXLsdLcTA/wapcMeEkhU176+oPHQStziXU7/e0B/SZRHVpEGOI/TmJ0fzv7uvn/X1NvBZegHpJgs0SO36NuI7ZGv1tG9g2ANjLCLL0MO7elvm4KR6BVr1OC8ZYEjgScB3NXPAFN/6ZB6pCw== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5083479b-77da-47f9-127e-08d88fd55c99 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2020 17:29:42.0801 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM6EUR05FT039.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6EUR05HT183 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:193933 Archived-At: Eli Zaretskii writes: >> 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. For me it happends like really, really fast. Things work normally, and then suddenly everythign freezes, and after first freeze, it takes for every to see result of any keypress. For example video in Firefox gets slow down to like a frame per minut or so; I can see that system is alive, but it is impossible to type something like (garbage-collect) and see the result; I would be sitting here for a day :-). The only thing I can is switch to another console, and then back. By that time Emacs process is restarted and everything is normal. I don't use swap file at all, and I can't believe that Emacs is eating up 32 gig or RAM either. However I can't type any command to see what it is peeking at since everything is efefctively frozen. I have seen it at 800 meg on my machine at some time, but it is far away from 32 gig I have.