From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dima Kogan Newsgroups: gmane.emacs.bugs Subject: bug#21556: 25.0.50; Memory leak in emacs -Q with lucid (font) Date: Mon, 28 Sep 2015 02:22:50 -0700 Message-ID: <87lhbqdhjp.fsf@secretsauce.net> References: <87zj082t34.fsf@gnu.org> <83io6wffm9.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1443448392 29515 80.91.229.3 (28 Sep 2015 13:53:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Sep 2015 13:53:12 +0000 (UTC) Cc: dmantipov@yandex.ru, 21556@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 28 15:52:59 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 1ZgYrT-0002nA-5m for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Sep 2015 15:52:59 +0200 Original-Received: from localhost ([::1]:37243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgYrS-0001cp-E0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Sep 2015 09:52:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgUeF-0007lg-Op for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 05:23:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgUeE-0007ux-OE for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 05:23:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgUeE-0007up-KJ for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 05:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZgUeE-00048W-9c for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 05:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Sep 2015 09:23: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.144343217615879 (code B ref 21556); Mon, 28 Sep 2015 09:23:02 +0000 Original-Received: (at 21556) by debbugs.gnu.org; 28 Sep 2015 09:22:56 +0000 Original-Received: from localhost ([127.0.0.1]:46221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgUe8-000482-5M for submit@debbugs.gnu.org; Mon, 28 Sep 2015 05:22:56 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:52392) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgUe5-00047q-OG for 21556@debbugs.gnu.org; Mon, 28 Sep 2015 05:22:54 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id BAC46204A5 for <21556@debbugs.gnu.org>; Mon, 28 Sep 2015 05:22:52 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Mon, 28 Sep 2015 05:22:52 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Y9wqF YoktadMdWS2Nu/SD7AsViM=; b=VuIJCilp14hR8UuDE0Aldr06J2IC+EyIJPGmf Z2hjB2+ync9V8yqqBAzOVG+AvJx9/kh/6OcQ/ob1J6LnE3tPnw2gZZ6VJNmgYcra A4THie4nXPeWb+V8aW7sqc5SGP6+/lq6vi237ARUs+EiRRE1744Rep81/6yEFLwH Ald3sw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=Y9wqFYoktadMdWS2Nu/SD7AsViM=; b=IRoB7 G0DTudJLi10jjPgkZMNmJqXZa3cowdm7Uks2onDRgaSMclAF/R3fWMfSX95aVXBy TqM+5/dBBsKqdDBCznRTRDzW49ra6gPwOOuoiKGmQivQa+28Dc9G4t6DoG+vtWGl HBNUuCJVMiAS4fHcVz3aZ3hrY42O9I0+rMxdgs= X-Sasl-enc: 8byYE8jprlj/GtDxTjSkP4OysfS+in5HrIrPbeqjADaM 1443432172 Original-Received: from shorty.local (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 5BA0A68012C; Mon, 28 Sep 2015 05:22:52 -0400 (EDT) Original-Received: from localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1ZgUe2-0003pP-Tr; Mon, 28 Sep 2015 02:22:50 -0700 In-reply-to: <83io6wffm9.fsf@gnu.org> 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:106992 Archived-At: 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.