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: Mon, 28 Sep 2015 12:58:30 +0300 Message-ID: <83d1x2eugp.fsf@gnu.org> References: <87zj082t34.fsf@gnu.org> <83io6wffm9.fsf@gnu.org> <87lhbqdhjp.fsf@secretsauce.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1443452367 592 80.91.229.3 (28 Sep 2015 14:59:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Sep 2015 14:59:27 +0000 (UTC) Cc: dmantipov@yandex.ru, 21556@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 28 16:59: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 1ZgZtb-00030v-Ar for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Sep 2015 16:59:15 +0200 Original-Received: from localhost ([::1]:37558 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgZta-0001AJ-LR for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Sep 2015 10:59:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgVD9-0008Rx-I1 for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 05:59:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgVD4-0002JF-IN for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 05:59:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgVD4-0002J6-Fs for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 05:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZgVD4-0005Rf-B0 for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 05:59: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: Mon, 28 Sep 2015 09:59: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.144343430420854 (code B ref 21556); Mon, 28 Sep 2015 09:59:02 +0000 Original-Received: (at 21556) by debbugs.gnu.org; 28 Sep 2015 09:58:24 +0000 Original-Received: from localhost ([127.0.0.1]:46229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgVCR-0005QG-IJ for submit@debbugs.gnu.org; Mon, 28 Sep 2015 05:58:23 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:58014) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgVCP-0005Q4-1r for 21556@debbugs.gnu.org; Mon, 28 Sep 2015 05:58:22 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NVD00P00SUU6100@mtaout29.012.net.il> for 21556@debbugs.gnu.org; Mon, 28 Sep 2015 12:59:07 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVD0054HT2J6HD0@mtaout29.012.net.il>; Mon, 28 Sep 2015 12:59:07 +0300 (IDT) In-reply-to: <87lhbqdhjp.fsf@secretsauce.net> 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:106994 Archived-At: > From: Dima Kogan > Cc: "K. Handa" , 21556@debbugs.gnu.org, dmantipov@yandex.ru > Date: Mon, 28 Sep 2015 02:22:50 -0700 > > Eli Zaretskii writes: > > > So maybe we should simply remove (or ifdef away) the code that > > compacts the font caches. If your assumption about reusing the font > > is anywhere near the truth, compacting the font cache gives us more > > trouble than it gains: we get slow redisplay in some cases and random > > hard-to-debug bugs, while the gains are only visible in very rare use > > cases such as the one described in the Oct 2013 discussion. > > Hi. I put in some more probes, and it looks like the fonts aren't being > marked as used properly. I also wrote a bit of code to make the gc > actually free fonts it drops. Unsurprisingly, this causes things to > crash, since it then frees fonts that are actually in use. Does it make > sense to track down why the fonts aren't marked as used? If the > compaction code goes away, then it doesn't really matter. It depends on how much time and energy do you have. I think it would be nice to understand where and how do we mark used fonts, if only to document that and make sure we don't miss anything. However, my personal preference is to remove the cache compaction, unless we hear some good reasons from Dmitry, and some ideas for how to fix the leaks. So, if you prefer not to invest any time in investigating the font marking code, let's wait for Dmitry to respond, and make the decision when he does (or when we give up waiting). Thanks.