From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: memory leaks Date: Fri, 04 Mar 2022 13:32:36 +0200 Message-ID: <83ee3ihs17.fsf@gnu.org> References: <835zlntmjk.fsf@gnu.org> <8336grtjak.fsf@gnu.org> <83zh5vcdx5.fsf@gnu.org> <878sde6c5i.fsf@gmail.com> <83imcidcfp.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6222"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 04 12:43:09 2022 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 1nQ6Kz-0001N8-5V for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 04 Mar 2022 12:43:09 +0100 Original-Received: from localhost ([::1]:56988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQ6Kx-0008Qu-VS for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 04 Mar 2022 06:43:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQ6An-0008WC-Ar for help-gnu-emacs@gnu.org; Fri, 04 Mar 2022 06:32:38 -0500 Original-Received: from [2001:470:142:3::e] (port=55634 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQ6An-0000dD-2J for help-gnu-emacs@gnu.org; Fri, 04 Mar 2022 06:32:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=j4Vb1viGAIisinqFWKxC4PysH8zlTnFFEHxL0hICFTI=; b=GjW8vkJ8YakL HgcOL0AGLNQ+ZlX5xuGFZNL4HDocHUbU6GksHC6KP2pDbyT0lAX1I+oO2gHKw6HGSJXSsfyYaJBGV a15U1v0kO+3APTUQUCXqUvvNGumHkJqB3p9bm48vzbo/wqZqmLlUmWt6Z9NcleWBwR7ouLLdiJMy3 VfxS/zZdkNXNy1N+MJJHusH2Nhw4C8xUHnGuFOztVmvgKsKCEnIHimnfDMCcXetpsHWC54WXO+lav wz0IiG3eLHaxNVfBiQ9G3j4f3ksc+uXOX+Pm9kkxEdvCGA1h6fv4Ksgg3mgZY4glO6od3UjhHttpY sdLsyzYXmZC4FXS1ZomWNA==; Original-Received: from [87.69.77.57] (port=1809 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQ6Al-0008D1-Iq for help-gnu-emacs@gnu.org; Fri, 04 Mar 2022 06:32:36 -0500 In-Reply-To: (message from Madhu on Mon, 09 Nov 2020 23:20:55 +0530) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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:136358 Archived-At: > From: Madhu > Date: Mon, 09 Nov 2020 23:20:55 +0530 > > 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. That bug is archived, so any messages to it are discarded. You need to unarchive it first (see admin/notes/bugtracker for the details). > 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 This was already discussed in that bug, and you said back then that when the shell buffer is killed, the memory is freed up. So how come you now say this is still a bug, and what is the difference between the case discussed in that bug and what you describe now?