From unknown Thu Aug 14 22:18:05 2025 X-Loop: don@donarmstrong.com Subject: bug#1053: 23.0.60; 600 MB memory not freed after keyboard-quit Reply-To: "Peter Tury" , 1053@debbugs.gnu.org Resent-From: "Peter Tury" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 29 Sep 2008 19:30:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1053 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122271601216816 (code B ref -1); Mon, 29 Sep 2008 19:30:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.5 required=4.0 tests=AWL,BAYES_00,FOURLA, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 29 Sep 2008 19:20:12 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8TJK7mb016551 for ; Mon, 29 Sep 2008 12:20:08 -0700 Received: from mx10.gnu.org ([199.232.76.166]:35925) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KkOFn-00066q-Fu for emacs-pretest-bug@gnu.org; Mon, 29 Sep 2008 15:17:55 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KkOHs-0004JJ-0S for emacs-pretest-bug@gnu.org; Mon, 29 Sep 2008 15:20:06 -0400 Received: from gv-out-0910.google.com ([216.239.58.190]:16391) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KkOHr-0004If-Af for emacs-pretest-bug@gnu.org; Mon, 29 Sep 2008 15:20:03 -0400 Received: by gv-out-0910.google.com with SMTP id i36so163883gve.17 for ; Mon, 29 Sep 2008 12:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=s/WqamvLJsrCkrEqCA2l1shn9o7dgaPSPEaQihryRog=; b=nny5e8ln7wXWUyl4thTEbjQ7Y5FmJOjjWRKza65JSEPFNbOCfvLroBwan5TmxaPuqN qkhl+mIPyERmsAgQsBfChJF6GGWKzkj9lpNwXj+987r58oJdmwMYkSCp6xScGoYeXSBQ f/m+/qNSQ3/Zhfcum9jfm7/T+wSBegqT8XaBY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=f86E1gQrhjAie1uQSXXgTt4MYs5Y4d0DBJwvmI2canHo9i5lwvAbuSkpIhAEUh3Vpz Xch7FXpuH2oAVDZO4L6Kay2TRlCuAon/hamGio0KYLPNwVybIcxU4kGSUpXp2CMxlvCY Sh30ZyLu2gF2uq2FL0dLYzg4MEESBSEfwU6wg= Received: by 10.103.215.17 with SMTP id s17mr4080745muq.61.1222716000310; Mon, 29 Sep 2008 12:20:00 -0700 (PDT) Received: by 10.103.16.3 with HTTP; Mon, 29 Sep 2008 12:20:00 -0700 (PDT) Message-ID: Date: Mon, 29 Sep 2008 21:20:00 +0200 From: "Peter Tury" To: emacs-pretest-bug@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Hi, I am not sure if this is a real bug... I run this function for ~1.5 hours without stopping: (defun yyy (n k &optional tup) (if (< 0 k) (mapcar (lambda (x) (when (or (null tup) (> x (car (last tup)))) (yyy n (1- k) (append tup (list x))))) (number-sequence 1 n)) ;(message "%S" tup) <- yes, this was commented out )) ;; I started yyy this way: (progn (message "start: %s" (current-time-string)) (yyy 90 5) (message "end: %s" (current-time-string))) ((I know mapc should be used above instead of mapcar; but think this is a test program. It caused Emacs22 to give a "Warning! Memory limit exceeded" on Windows2000 with 4GB memory, after running for ~20 minutes... -- now I tried to reproduce this on Linux with Emacs23 with 1 GB memory. The warning didn't come, but the following happened: )) Emacs eat up all of the memory + a big chunk of the swap: Emacs itself used ~620MB memory after 1.5 hours (not really increasing after some time). Then I decided to stop it. Went to Emacs and typed C-g. Nothing happened for a while, but after that buffer content was redrawn and I could move the point (with the arroy keys): I thought yyy-process is stopped and I can use Emacs again. But after a while Emacs again stopped responding. Even the buffer content was not redrawn. I tried C-g again and again, but nothing happened. I hoped just memory freeing takes a long time, so left my PC for some minutes. This didn't helped either. But after a while I could again use Emacs: killed the buffer (containing yyy) and moved around the point just to see it works. But memory still was occupied: Emacs used ~600MB. Later I killed Emacs (with C-x C-c) and got back the memory. I think Emacs should free the memory if I stop the process (with C-g) what filled up the memory...at least after some minutes garbage collection should work? Or is this behaviour described above a feature of (keyboard-)quit? Thanks, P ---------- In GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2008-09-03 on ubuntu-tury Windowing system distributor `The X.Org Foundation', version 11.0.10400090 configured using `configure '--with-xft=no'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: hu_HU.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: savehist-mode: t which-function-mode: t show-paren-mode: t recentf-mode: t iswitchb-mode: t icomplete-mode: t display-time-mode: t desktop-save-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: Recent messages: Loading info...done uncompressing parted.info.gz...done uncompressing parted.info.gz...done uncompressing parted.info.gz...done Loading vc-cvs...done Loading cc-mode...done hellow.java has auto save data; consider M-x recover-this-file Wrote /home/xxx/.emacs.desktop.lock Desktop: 6 buffers restored. For information about GNU Emacs and the GNU system, type C-h C-a. From unknown Thu Aug 14 22:18:05 2025 X-Loop: don@donarmstrong.com Subject: bug#1053: 23.0.60; 600 MB memory not freed after keyboard-quit Reply-To: Stefan Monnier , 1053@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 30 Sep 2008 01:50:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1053 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122273896314804 (code B ref -1); Tue, 30 Sep 2008 01:50:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 30 Sep 2008 01:42:43 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8U1gd3P014797 for ; Mon, 29 Sep 2008 18:42:40 -0700 Received: from mx10.gnu.org ([199.232.76.166]:43162) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KkUDy-0004ZF-K2 for emacs-pretest-bug@gnu.org; Mon, 29 Sep 2008 21:40:26 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KkUG5-0001GU-VU for emacs-pretest-bug@gnu.org; Mon, 29 Sep 2008 21:42:38 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:18837) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KkUG5-0001GE-Nl for emacs-pretest-bug@gnu.org; Mon, 29 Sep 2008 21:42:37 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuYEAAMh4UjO+KDT/2dsb2JhbACBZLpCgWeBBA X-IronPort-AV: E=Sophos;i="4.33,334,1220241600"; d="scan'208";a="27739348" Received: from 206-248-160-211.dsl.teksavvy.com (HELO pastel.home) ([206.248.160.211]) by ironport2-out.teksavvy.com with ESMTP; 29 Sep 2008 21:42:37 -0400 Received: by pastel.home (Postfix, from userid 20848) id ED7AC4B4DE; Mon, 29 Sep 2008 21:42:36 -0400 (EDT) From: Stefan Monnier To: Peter Tury Cc: 1053@debbugs.gnu.org, emacs-pretest-bug@gnu.org Message-ID: References: Date: Mon, 29 Sep 2008 21:42:36 -0400 In-Reply-To: (Peter Tury's message of "Mon, 29 Sep 2008 21:20:00 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. > could move the point (with the arroy keys): I thought yyy-process is > stopped and I can use Emacs again. But after a while Emacs again > stopped responding. Even the buffer content was not redrawn. I tried It was probably busy doing garbage-collection. > C-g again and again, but nothing happened. I hoped just memory freeing > takes a long time, so left my PC for some minutes. This didn't helped > either. But after a while I could again use Emacs: killed the buffer > (containing yyy) and moved around the point just to see it works. But > memory still was occupied: Emacs used ~600MB. Later I killed Emacs > (with C-x C-c) and got back the memory. Releasing such memory is surprisingly difficult, so you may indeed end up with a large Emacs process with a large heap that takes a long time to GC, so every time Emacs calls the GC your Emacs appears frozen. If you try M-: (garbage-collect) RET in such a process you should see how long it takes, and the returned value contains useful info to have a vague idea of what's going on. Stefan From unknown Thu Aug 14 22:18:05 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Peter Tury" Subject: bug#1053: closed (Re: bug#1053: 23.0.60; 600 MB memory not freed after keyboard-quit) Message-ID: References: X-Gnu-PR-Message: they-closed 1053 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: wontfix notabug Reply-To: 1053@debbugs.gnu.org Date: Sat, 09 Jul 2011 17:57:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1310234222-24513-1" This is a multi-part message in MIME format... ------------=_1310234222-24513-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #1053: 23.0.60; 600 MB memory not freed after keyboard-quit which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 1053@debbugs.gnu.org. --=20 1053: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1053 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1310234222-24513-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 1053-done) by debbugs.gnu.org; 9 Jul 2011 17:56:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qfbla-0006Mm-8S for submit@debbugs.gnu.org; Sat, 09 Jul 2011 13:56:34 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QfblY-0006MW-H1 for 1053-done@debbugs.gnu.org; Sat, 09 Jul 2011 13:56:33 -0400 Received: from localhost ([127.0.0.1]:45937) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfblT-0003ko-38; Sat, 09 Jul 2011 13:56:27 -0400 From: Glenn Morris To: 1053-done@debbugs.gnu.org Subject: Re: bug#1053: 23.0.60; 600 MB memory not freed after keyboard-quit References: X-Spook: Mafia FIPS140 LLNL supercomputer Perl-RSA Al-Qaeda jihad X-Ran: NkfmG7}MK14k*[%b,ih`USuIY7D.S){+;yK4SUgjY/%L'0@+/__[Z]1dJh1'h:QeI:9=(7 X-Hue: blue X-Attribution: GM Date: Sat, 09 Jul 2011 13:56:26 -0400 In-Reply-To: (Stefan Monnier's message of "Mon, 29 Sep 2008 21:42:36 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 1053-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) I don't see a need to keep open this particular report, which was marked "wontfix" some time ago. Stefan Monnier wrote: > Releasing such memory is surprisingly difficult, so you may indeed end > up with a large Emacs process with a large heap that takes a long time > to GC, so every time Emacs calls the GC your Emacs appears frozen. ------------=_1310234222-24513-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From tury.peter@gmail.com Mon Sep 29 12:20:11 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.5 required=4.0 tests=AWL,BAYES_00,FOURLA, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 29 Sep 2008 19:20:12 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8TJK7mb016551 for ; Mon, 29 Sep 2008 12:20:08 -0700 Received: from mx10.gnu.org ([199.232.76.166]:35925) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KkOFn-00066q-Fu for emacs-pretest-bug@gnu.org; Mon, 29 Sep 2008 15:17:55 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KkOHs-0004JJ-0S for emacs-pretest-bug@gnu.org; Mon, 29 Sep 2008 15:20:06 -0400 Received: from gv-out-0910.google.com ([216.239.58.190]:16391) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KkOHr-0004If-Af for emacs-pretest-bug@gnu.org; Mon, 29 Sep 2008 15:20:03 -0400 Received: by gv-out-0910.google.com with SMTP id i36so163883gve.17 for ; Mon, 29 Sep 2008 12:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=s/WqamvLJsrCkrEqCA2l1shn9o7dgaPSPEaQihryRog=; b=nny5e8ln7wXWUyl4thTEbjQ7Y5FmJOjjWRKza65JSEPFNbOCfvLroBwan5TmxaPuqN qkhl+mIPyERmsAgQsBfChJF6GGWKzkj9lpNwXj+987r58oJdmwMYkSCp6xScGoYeXSBQ f/m+/qNSQ3/Zhfcum9jfm7/T+wSBegqT8XaBY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=f86E1gQrhjAie1uQSXXgTt4MYs5Y4d0DBJwvmI2canHo9i5lwvAbuSkpIhAEUh3Vpz Xch7FXpuH2oAVDZO4L6Kay2TRlCuAon/hamGio0KYLPNwVybIcxU4kGSUpXp2CMxlvCY Sh30ZyLu2gF2uq2FL0dLYzg4MEESBSEfwU6wg= Received: by 10.103.215.17 with SMTP id s17mr4080745muq.61.1222716000310; Mon, 29 Sep 2008 12:20:00 -0700 (PDT) Received: by 10.103.16.3 with HTTP; Mon, 29 Sep 2008 12:20:00 -0700 (PDT) Message-ID: Date: Mon, 29 Sep 2008 21:20:00 +0200 From: "Peter Tury" To: emacs-pretest-bug@gnu.org Subject: 23.0.60; 600 MB memory not freed after keyboard-quit MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Hi, I am not sure if this is a real bug... I run this function for ~1.5 hours without stopping: (defun yyy (n k &optional tup) (if (< 0 k) (mapcar (lambda (x) (when (or (null tup) (> x (car (last tup)))) (yyy n (1- k) (append tup (list x))))) (number-sequence 1 n)) ;(message "%S" tup) <- yes, this was commented out )) ;; I started yyy this way: (progn (message "start: %s" (current-time-string)) (yyy 90 5) (message "end: %s" (current-time-string))) ((I know mapc should be used above instead of mapcar; but think this is a test program. It caused Emacs22 to give a "Warning! Memory limit exceeded" on Windows2000 with 4GB memory, after running for ~20 minutes... -- now I tried to reproduce this on Linux with Emacs23 with 1 GB memory. The warning didn't come, but the following happened: )) Emacs eat up all of the memory + a big chunk of the swap: Emacs itself used ~620MB memory after 1.5 hours (not really increasing after some time). Then I decided to stop it. Went to Emacs and typed C-g. Nothing happened for a while, but after that buffer content was redrawn and I could move the point (with the arroy keys): I thought yyy-process is stopped and I can use Emacs again. But after a while Emacs again stopped responding. Even the buffer content was not redrawn. I tried C-g again and again, but nothing happened. I hoped just memory freeing takes a long time, so left my PC for some minutes. This didn't helped either. But after a while I could again use Emacs: killed the buffer (containing yyy) and moved around the point just to see it works. But memory still was occupied: Emacs used ~600MB. Later I killed Emacs (with C-x C-c) and got back the memory. I think Emacs should free the memory if I stop the process (with C-g) what filled up the memory...at least after some minutes garbage collection should work? Or is this behaviour described above a feature of (keyboard-)quit? Thanks, P ---------- In GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2008-09-03 on ubuntu-tury Windowing system distributor `The X.Org Foundation', version 11.0.10400090 configured using `configure '--with-xft=no'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: hu_HU.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: savehist-mode: t which-function-mode: t show-paren-mode: t recentf-mode: t iswitchb-mode: t icomplete-mode: t display-time-mode: t desktop-save-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: Recent messages: Loading info...done uncompressing parted.info.gz...done uncompressing parted.info.gz...done uncompressing parted.info.gz...done Loading vc-cvs...done Loading cc-mode...done hellow.java has auto save data; consider M-x recover-this-file Wrote /home/xxx/.emacs.desktop.lock Desktop: 6 buffers restored. For information about GNU Emacs and the GNU system, type C-h C-a. ------------=_1310234222-24513-1--