From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: how do you track down emacs memory leaks? Date: Tue, 04 Nov 2008 11:59:12 -0500 Message-ID: <87k5bjfmvz.fsf@cyd.mit.edu> References: <9aa0cfde0811012105o20c51089j1cd80d81d2895a6d@mail.gmail.com> <87d4hclu5q.fsf@cyd.mit.edu> <9aa0cfde0811030724s2ee667e2l59cc94a97e4fc1f@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1225817962 21265 80.91.229.12 (4 Nov 2008 16:59:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Nov 2008 16:59:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Ami Fischman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 04 18:00:24 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KxPGN-00047N-81 for ged-emacs-devel@m.gmane.org; Tue, 04 Nov 2008 18:00:19 +0100 Original-Received: from localhost ([127.0.0.1]:35546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxPFG-00008V-98 for ged-emacs-devel@m.gmane.org; Tue, 04 Nov 2008 11:59:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxPFB-00008Q-CU for emacs-devel@gnu.org; Tue, 04 Nov 2008 11:59:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxPF9-00008D-TT for emacs-devel@gnu.org; Tue, 04 Nov 2008 11:59:05 -0500 Original-Received: from [199.232.76.173] (port=45595 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxPF9-00008A-NT for emacs-devel@gnu.org; Tue, 04 Nov 2008 11:59:03 -0500 Original-Received: from cyd.mit.edu ([18.115.2.24]:57672) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KxPF9-0007cL-NC for emacs-devel@gnu.org; Tue, 04 Nov 2008 11:59:03 -0500 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 7EC6957E1D3; Tue, 4 Nov 2008 11:59:12 -0500 (EST) In-Reply-To: <9aa0cfde0811030724s2ee667e2l59cc94a97e4fc1f@mail.gmail.com> (Ami Fischman's message of "Mon, 3 Nov 2008 07:24:19 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105342 Archived-At: "Ami Fischman" writes: >> Does this problem only show up when you use gnus? > > Yes. > >> Could you try keeping >> another Emacs session around for other non-gnus usage, and see if it >> leaks memory? > > I have and it doesn't. At least not nearly at the rate that the > gnus-using session does. > > I updated my version of gnus from ngnus-0.10 to CVS head yesterday and > the leak seems to have slowed down significantly - only about 8MB > overnight. So I suspect some trigger has been coincidentally > suppressed, but it seems that no elisp code should be able to cause > emacs to grow in memory usage disproportional to the numbers reported > by memory-usage, so there is still probably a lurking leak in emacs. > > Do you have any tools/techniques you use to track down C-level leaks? I'm afraid not. Maybe someone else on this list can suggest something. One possibility is to try and write a simple test case that demonstrates the leak. For instance, a short Elisp program that keeps creating and killing network processes. If such a program causes memory to increase, that would demonstrate that the memory leak is occurring in the Emacs network process code.