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, 30 Oct 2015 13:50:05 -0700 Message-ID: <87h9l8gjya.fsf@secretsauce.net> References: <87zj082t34.fsf@gnu.org> <83io6wffm9.fsf@gnu.org> <87lhbqdhjp.fsf@secretsauce.net> <83d1x2eugp.fsf@gnu.org> <87oagl376v.fsf@secretsauce.net> <560BB690.3020804@yandex.ru> <87612q3oxj.fsf@secretsauce.net> <560D34CB.5010900@yandex.ru> <874mia2zjh.fsf@secretsauce.net> <560E106C.6010103@yandex.ru> <87r3kdguf9.fsf@secretsauce.net> <83wpu4zbe6.fsf@gnu.org> <87io5ogo8f.fsf@secretsauce.net> <83h9l8ytvy.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446238289 19110 80.91.229.3 (30 Oct 2015 20:51:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Oct 2015 20:51:29 +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 Fri Oct 30 21:51:17 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 1ZsGdl-0002Nj-B3 for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Oct 2015 21:51:13 +0100 Original-Received: from localhost ([::1]:53031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsGdk-0007nQ-Is for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Oct 2015 16:51:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsGdf-0007kY-5z for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2015 16:51:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsGda-0005e5-RT for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2015 16:51:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsGda-0005dZ-Od for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2015 16:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZsGda-0002wE-F6 for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2015 16:51: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: Fri, 30 Oct 2015 20:51: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.144623821011216 (code B ref 21556); Fri, 30 Oct 2015 20:51:02 +0000 Original-Received: (at 21556) by debbugs.gnu.org; 30 Oct 2015 20:50:10 +0000 Original-Received: from localhost ([127.0.0.1]:46570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsGcj-0002up-KC for submit@debbugs.gnu.org; Fri, 30 Oct 2015 16:50:09 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:53767) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsGch-0002uh-Tg for 21556@debbugs.gnu.org; Fri, 30 Oct 2015 16:50:08 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4A37C208E3 for <21556@debbugs.gnu.org>; Fri, 30 Oct 2015 16:50:07 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 30 Oct 2015 16:50:07 -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=YUPcU Vpy17lpyzRRoS1N1746J+s=; b=ZH3R5QPfI+Vpf2Hcum9TpJSEX7S0z3ZGJ+3/e L5BLQi4cSiDEHQnDxHM8kAOMOw840rLAaVp1hY+ARaEHmA+/gFbW8E92WBCb3tHr rB1uufE4CnKVrlCmNutvEm05eARb4j9PmRN3uJbAwi5rS20C86Yh1IewvRvXK0xl kl6HyE= 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=YUPcUVpy17lpyzRRoS1N1746J+s=; b=TTDye QtSjK/CG2b1iRGCyflEcjBACAwIhtamOIdSO2xQuLtSXKdAnvDXm1eTVhUZlY/DD MV8FzMkRDuXHQIs7r8CWPSDXY6PItHj13DAkXuCt52luKP2XlPtAOydJrGrLKCio sC8du87DJcKekKgI3QJxM7u8UNdsIoIJt+ATlM= X-Sasl-enc: B2QEFfx9EGK9vR8Bry+IYtI2tN3CFeLJ884ipv+nhaX1 1446238206 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 EBDA0C0009B; Fri, 30 Oct 2015 16:50:06 -0400 (EDT) Original-Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1ZsGcf-0006f5-N0; Fri, 30 Oct 2015 13:50:05 -0700 In-reply-to: <83h9l8ytvy.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:108213 Archived-At: Eli Zaretskii writes: >> From: Dima Kogan >> Cc: dmantipov@yandex.ru, handa@gnu.org, 21556@debbugs.gnu.org >> Date: Fri, 30 Oct 2015 12:17:36 -0700 >> >> - fonts (sometimes) live inside font-entities > > Can you show an example of that, or maybe even tell what path(s) > through the code cause this to happen? AFAICS, the backtrace you've > shown in your last mail is not such a path: the entity there is some > temporary object that is used to find and open a font, and can > thereafter be forgotten. Or did I miss something? If you look at the font cache object as you run emacs, you should see font-containing-entities in it. I don't believe the entity in that backtrace is temporary. The code is: Lisp_Object font_list_entities (struct frame *f, Lisp_Object spec) { ..... val = driver_list->driver->list (f, scratch_font_spec); if (!NILP (val)) { Lisp_Object copy = copy_font_spec (scratch_font_spec); val = Fvconcat (1, &val); ASET (copy, FONT_TYPE_INDEX, driver_list->driver->type); XSETCDR (cache, Fcons (Fcons (copy, val), XCDR (cache))); } ..... The driver_list->driver->list() call is the one in the backtrace. As you can see, the results of that call are stored in the font cache. The questions for Dmitry (or you, Eli, if you know the answer) are 1. does it make sense that Vfontset_table has no entities in it, and thus does not mark them? 2. what, if anything, should be marking the entities? I'm not seeing anything marking them If the observed behavior is correct (nothing marking the entities), then the patch in this report is correct also, and we should install it.