From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.bugs Subject: bug#43389: 28.0.50; Emacs memory leaks Date: Mon, 23 Nov 2020 21:55:57 +0300 Message-ID: References: <837dqir9kx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28659"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0 (3d08634) (2020-11-07) Cc: fweimer@redhat.com, 43389@debbugs.gnu.org, 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 19:57:45 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 1khH20-0007KE-He for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 19:57:44 +0100 Original-Received: from localhost ([::1]:59908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khH1z-0008IK-Ij for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 13:57:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khH1L-00088V-Df for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 13:57:08 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khH1J-0006nx-OZ for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 13:57:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khH1J-0002ya-M5 for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 13:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jean Louis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Nov 2020 18:57: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.160615779511397 (code B ref 43389); Mon, 23 Nov 2020 18:57:01 +0000 Original-Received: (at 43389) by debbugs.gnu.org; 23 Nov 2020 18:56:35 +0000 Original-Received: from localhost ([127.0.0.1]:51155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khH0s-0002xl-Pb for submit@debbugs.gnu.org; Mon, 23 Nov 2020 13:56:35 -0500 Original-Received: from static.rcdrun.com ([95.85.24.50]:34189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khH0r-0002xU-1D for 43389@debbugs.gnu.org; Mon, 23 Nov 2020 13:56:33 -0500 Original-Received: from localhost ([::ffff:41.202.241.56]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002C1AE3.000000005FBC05DA.00000579; Mon, 23 Nov 2020 18:56:26 +0000 Content-Disposition: inline In-Reply-To: <837dqir9kx.fsf@gnu.org> 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:193947 Archived-At: * Eli Zaretskii [2020-11-18 18:04]: > > Date: Wed, 18 Nov 2020 00:45:48 +0300 > > From: Jean Louis > > Cc: eliz@gnu.org, fweimer@redhat.com, trevor@trevorbentley.com, > > michael_heerdegen@web.de, carlos@redhat.com, 43389@debbugs.gnu.org > > > > Maybe some simple new and automatic function could be temporarily > > included to spit errors to output on what is Emacs doing when it > > starts swapping (if it is swapping), then such errors could at least > > be captured in a file even if I have to reboot computer. I use now M-x vsize-with-timer for 2GB and M-x good-bye to capture that basic data. (defun vsize-value () (let* ((attributes (process-attributes (emacs-pid))) (vsize-name (car (elt attributes 5))) (vsize-value (cdr (elt attributes 5)))) (list vsize-name vsize-value))) (defun vsize-check (&optional gb) (let* ((vsize (cadr (vsize-value))) (gb (or gb 2)) (gb-1 1048576.0) (gb (* gb gb-1))) (when (> vsize gb) (message "vsize: %.02fG" (/ vsize gb-1))))) (defun vsize-with-timer (gb) (interactive "nGiB: ") (let ((timer (run-with-timer 1 30 'vsize-check gb))) (message "Timer: %s" timer))) (defun good-bye () (interactive) (let* ((garbage (garbage-collect)) (size 0) (buffers-size (dolist (buffer (buffer-list) size) (setq size (+ size (buffer-size buffer))))) (uptime (emacs-uptime)) (pid (emacs-pid)) (vsize (vsize-value)) (file (format "~/tmp/emacs-session-%s.el" pid)) (list (list (list 'uptime uptime) (list 'pid pid) (list 'garbage garbage) (list 'buffers-size buffers-size) (list 'vsize vsize)))) (with-temp-file file (insert (prin1-to-string list))) (message file)))