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: Fri, 25 Sep 2015 02:30:45 -0700 Message-ID: <87zj0adewq.fsf@secretsauce.net> References: <87d1x7e53b.fsf@secretsauce.net> <83k2rfhu93.fsf@gnu.org> <871tdmex2c.fsf@secretsauce.net> <83d1x6j339.fsf@gnu.org> <83bncqj24y.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1443173483 3057 80.91.229.3 (25 Sep 2015 09:31:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Sep 2015 09:31:23 +0000 (UTC) Cc: 21556@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 25 11:31:11 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 1ZfPLR-00085d-KJ for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 11:31:09 +0200 Original-Received: from localhost ([::1]:52745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfPLQ-0004Sq-Tu for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 05:31:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfPLN-0004Rm-5t for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 05:31:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfPLJ-0006zr-W0 for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 05:31:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfPLJ-0006yh-Tu for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 05:31:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZfPLJ-0004Az-L6 for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 05:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Sep 2015 09:31:01 +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.144317345116037 (code B ref 21556); Fri, 25 Sep 2015 09:31:01 +0000 Original-Received: (at 21556) by debbugs.gnu.org; 25 Sep 2015 09:30:51 +0000 Original-Received: from localhost ([127.0.0.1]:42513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfPL9-0004Ab-1r for submit@debbugs.gnu.org; Fri, 25 Sep 2015 05:30:51 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48629) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfPL6-0004AS-RH for 21556@debbugs.gnu.org; Fri, 25 Sep 2015 05:30:49 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E4F0520448 for <21556@debbugs.gnu.org>; Fri, 25 Sep 2015 05:30:46 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Fri, 25 Sep 2015 05:30:46 -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=th6bT XHl4o/x/7B15HtAxCSF/RI=; b=QuA+1y9T54VVaL2yLaYjigAdi/qwRnHvjHD8w GCZfIiTeDW+Usi6VveQtldSEaPnGvHuRCJOnamv8qPkEyKgHvxkZJFDF2Jc9pldX 5pkZpl7o24HdHSinkbm6Aa9I+ND1Fnex2SJd5t89BsyipnU1CKh3AJp9VYjkAoH9 CNZ304= 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=th6bTXHl4o/x/7B15HtAxCSF/RI=; b=gSET0 lj+H0/CU8Ml88U0r5D8r5QAElmzhUoPwlXKwcrl+GS6+XRFCObwO1CHzFxvkYxV7 MuzhJq10IxtgUKYOyj1ey7XTLhyK515Tm0J/l9KiRuQARhJCxDAAXzcoNzfq8JVo xpmFwOsn6ujb/HSbOnsLg+CondbYeqjVutzWZM= X-Sasl-enc: vh5bpE3pNRgAnSz7yH9WcRkJnV/h3pGpVuuH7Bg0Yo+Y 1443173446 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 9C2D0680170; Fri, 25 Sep 2015 05:30:46 -0400 (EDT) Original-Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1ZfPL3-00069l-GM; Fri, 25 Sep 2015 02:30:45 -0700 In-reply-to: <83bncqj24y.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:106899 Archived-At: Eli Zaretskii writes: >> cache: the garbage collector. The backtrace in question: >> >> 0x00000000005d2172 in compact_font_cache_entry (entry=24121763) at alloc.c:5313 > > 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. You called it exactly. > Some additional background for these issues: Thanks. Very useful. I guess I still don't know if the fonts are supposed to be marked or not. They appear to never be marked. Do you know where that is supposed to happen? Furthermore, the compaction code is incomplete, at least for xft. Xft refence-counts the fonts, so you must close all fonts you have opened. Emacs stores the fonts that have been opened in the cache, so if it ever drops any fonts from the cache, it must tell xft to close, or else things leak, as we're seeing. I haven't tried to do this yet, but I suspect that the fonts should be marked, otherwise we'd be closing the font that we have just opened.