From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Madhu Newsgroups: gmane.emacs.help Subject: Re: memory leaks Date: Tue, 10 Nov 2020 06:54:56 +0530 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5537"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43395@debbugs.gnu.org To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 10 02:27:20 2020 Return-path: Envelope-to: geh-help-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 1kcIRL-0001Je-S6 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 10 Nov 2020 02:27:19 +0100 Original-Received: from localhost ([::1]:58930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcIRK-00072M-Qi for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 09 Nov 2020 20:27:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcIPz-0006jw-5i for help-gnu-emacs@gnu.org; Mon, 09 Nov 2020 20:25:55 -0500 Original-Received: from [117.193.2.72] (port=58896 helo=localhost.localdomain) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcIPw-0000FK-PW for help-gnu-emacs@gnu.org; Mon, 09 Nov 2020 20:25:54 -0500 Original-Received: (qmail 604 invoked by uid 500); 10 Nov 2020 01:24:56 -0000 X-Host-Lookup-Failed: Reverse DNS lookup failed for 117.193.2.72 (failed) Received-SPF: softfail client-ip=117.193.2.72; envelope-from=enometh@meer.net; helo=localhost.localdomain X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/09 20:25:46 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Spam_score_int: 29 X-Spam_score: 2.9 X-Spam_bar: ++ X-Spam_report: (2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_PBL=3.335, RCVD_IN_SORBS_DUL=0.001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125165 Archived-At: [Test case follows. Sorry Drew for trying to post to help-gnu and debbugs simultaneously, but this is my third attempt at sending this test case - I've tried sending it to debbugs.gnu.org and to gmane.emacs.help newsgroup - and my messages have been dropped] * Madhu : Wrote on Mon, 14 Sep 2020 15:36:57 +0530: > The numbers I reported by garbage-collect do not account for the memory > usage. FWIW I've posted that info again at > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43395 I found test case for this bug and I sent mail to 43395@debbugs.gnu.org, and qmail told me that the mail was accepted: delivery 1: success: 209.51.188.43_accepted_message./Remote_host_said:_250_OK_id=1kc8Bf-00061T-3u/ But the bugreport didn't show up on gnu.emacs.bug. Here is the test case: #+BEGIN_SRC $ cat > f.c #include int main() { char c = ' '; while (c != 'q' && c != 'Q') { fprintf(stdout, "Press q then enter to quit: "); c = fgetc(stdin); } return 0; } ^D $ gcc f.c $ emacs -Q #+END_SRC M-x shell-command ./a.out Then the process hangs. But Emacs' memory grows unbounded. WARNING. Be careful to interrupt it with ^G before the OOM killer kicks in. If you have swap you may lose control of your machine indefinitely. After you interrupt the sub process, Emacs is left with unreclaimed gigabytes of RSS Please let me know if you can reproduce this