From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21556: 25.0.50; Memory leak in emacs -Q with lucid (font) Date: Fri, 25 Sep 2015 12:10:05 +0300 Message-ID: <83bncqj24y.fsf@gnu.org> References: <87d1x7e53b.fsf@secretsauce.net> <83k2rfhu93.fsf@gnu.org> <871tdmex2c.fsf@secretsauce.net> <83d1x6j339.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1443172288 15585 80.91.229.3 (25 Sep 2015 09:11:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Sep 2015 09:11:28 +0000 (UTC) Cc: 21556@debbugs.gnu.org To: dima@secretsauce.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 25 11:11:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZfP29-0006fU-Cp for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 11:11:13 +0200 Original-Received: from localhost ([::1]:51472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfP28-0001Rv-TG for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 05:11:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfP22-0001Mx-Uj for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 05:11:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfP1y-0004aG-RL for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 05:11:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfP1y-0004aA-OQ for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 05:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZfP1y-0003hh-Bk for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 05:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Sep 2015 09:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21556 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21556-submit@debbugs.gnu.org id=B21556.144317220614174 (code B ref 21556); Fri, 25 Sep 2015 09:11:02 +0000 Original-Received: (at 21556) by debbugs.gnu.org; 25 Sep 2015 09:10:06 +0000 Original-Received: from localhost ([127.0.0.1]:42496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfP13-0003gX-Um for submit@debbugs.gnu.org; Fri, 25 Sep 2015 05:10:06 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:53556) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfP10-0003g9-PF for 21556@debbugs.gnu.org; Fri, 25 Sep 2015 05:10:04 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NV800A006PSRF00@mtaout29.012.net.il> for 21556@debbugs.gnu.org; Fri, 25 Sep 2015 12:10:45 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NV8008LN6TW3T20@mtaout29.012.net.il>; Fri, 25 Sep 2015 12:10:45 +0300 (IDT) In-reply-to: <83d1x6j339.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106898 Archived-At: > Date: Fri, 25 Sep 2015 11:49:30 +0300 > From: Eli Zaretskii > Cc: 21556@debbugs.gnu.org > > > From: Dima Kogan > > Cc: 21556@debbugs.gnu.org > > Date: Fri, 25 Sep 2015 01:13:15 -0700 > > > > Hi. I just came back to this, figured out how to (semi-manually) put in > > a watchpoint, and this watchpoint told me what's resetting the font > > cache: the garbage collector. The backtrace in question: > > > > 0x00000000005d2172 in compact_font_cache_entry (entry=24121763) at alloc.c:5313 > > #0 0x00000000005d2172 in compact_font_cache_entry (entry=24121763) at alloc.c:5313 > > #1 0x00000000005d221b in compact_font_caches () at alloc.c:5339 > > #2 0x00000000005d2742 in garbage_collect_1 (end=0x7ffcdb166830) at alloc.c:5515 > > #3 0x00000000005d2e1d in Fgarbage_collect () at alloc.c:5720 > > #4 0x000000000054eb21 in maybe_gc () at lisp.h:4515 > > #5 0x00000000005f638c in Ffuncall (nargs=3, args=0x7ffcdb166988) at eval.c:2584 > > Yes, that's what I wrote to you you meanwhile. > > This seems to mean that fonts whose entries in the cache are not > marked are still being used, or are unused but not freed. Some additional background for these issues: This is why the font cache compaction was introduced: http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html Here's one problem caused by the compaction code, and some followup discussions with perhaps useful debug code: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15876#77 This is another related bug, which eventually caused the font cache compaction be ifdef'ed away for MS-Windows: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16140