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: Thu, 29 Oct 2015 15:51:38 -0700 Message-ID: <87r3kdguf9.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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446159144 16188 80.91.229.3 (29 Oct 2015 22:52:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Oct 2015 22:52:24 +0000 (UTC) Cc: 21556@debbugs.gnu.org To: Dmitry Antipov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 29 23:52:13 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 1Zrw3F-0004ut-Mr for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Oct 2015 23:52:09 +0100 Original-Received: from localhost ([::1]:47366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrw3F-0005ou-1i for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Oct 2015 18:52:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrw3B-0005oi-KY for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 18:52:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zrw38-00033r-Ei for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 18:52:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrw38-00033n-Bi for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 18:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zrw38-00063g-8w for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 18:52: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: Thu, 29 Oct 2015 22:52: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.144615910423264 (code B ref 21556); Thu, 29 Oct 2015 22:52:02 +0000 Original-Received: (at 21556) by debbugs.gnu.org; 29 Oct 2015 22:51:44 +0000 Original-Received: from localhost ([127.0.0.1]:44853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zrw2q-000639-9b for submit@debbugs.gnu.org; Thu, 29 Oct 2015 18:51:44 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:59821) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zrw2o-00062w-KS for 21556@debbugs.gnu.org; Thu, 29 Oct 2015 18:51:43 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7B7BD20AA7 for <21556@debbugs.gnu.org>; Thu, 29 Oct 2015 18:51:40 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 29 Oct 2015 18:51:40 -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=bIgTJ 4Lz8ObJaFA9iYSS+1Q24YM=; b=BPVXqwZi4OSBq/qjH5cY5BcRyonhuPrXR5mby csGWown48tVfTKK/XVgXN/S07P6rwuklDNpLOdel9690t2xGueDZINOooQRgeISf H11lOaS19AExiWPCJhSbt/rqk2ixlp0LwAo+DS+PJUeYiSkXqWerQKJJn/SMFGZo jzJBQ0= 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=bIgTJ4Lz8ObJaFA9iYSS+1Q24YM=; b=qagx4 xunL1EnRc4ANljT6kr6NDpAV904jhw3Qpqb0JS/bAa6LSJfrudk2GSFAo5oBgP8s ghTj80RlWygZFG/abKeZKXxpimFGad/X88ZI+tk0vgOEsRZWpXBUchbhRN2eiLx7 yDRdH7xIFTAvQILQqNvBYvTpjVO30tcxeZnaF8= X-Sasl-enc: Yyml5GWRD+R9MU9lJIC+Cm1Q4bp9PHLoq9EXF2y4d+68 1446159100 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 007C1680118; Thu, 29 Oct 2015 18:51:39 -0400 (EDT) Original-Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1Zrw2k-0000JI-PR; Thu, 29 Oct 2015 15:51:38 -0700 In-reply-to: <560E106C.6010103@yandex.ru> 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:108155 Archived-At: Dmitry Antipov writes: > On 10/01/2015 09:50 PM, Dima Kogan wrote: > >> OK, so are you suggesting changing how mark_face_cache() works? How bad >> is it to accept that fonts and font entities are not necessarily linked, >> and to install the latest patch in this bug? > > I'm suggesting to check whether there are unmarked font objects after marking > from Vfontset_table, and, if so, understand whether it's correct. Otherwise > your patch, even being correct by itself, may just hide subtle GC bug. Hi. I looked at this again. Running the same test as before (emacs -Q, repeatedly creating/destroying client frame) I see: - entities are created with each new client frame but are /never/ marked. - entity-creation backtrace is always #0 0x000000000060e74e in font_make_entity () at font.c:173 #1 0x00000000006793ae in ftfont_pattern_entity (p=0xf8c180, extra=20784563) at ftfont.c:215 #2 0x000000000067b952 in ftfont_list (f=0x13fb8c0, spec=13463989) at ftfont.c:1057 #3 0x0000000000680de6 in xftfont_list (f=0x13fb8c0, spec=13463989) at xftfont.c:138 #4 0x0000000000615ebc in font_list_entities (f=0x13fb8c0, spec=20978277) at font.c:2780 #5 0x0000000000617c27 in font_find_for_lface (f=0x13fb8c0, attrs=0x7fff3ee81f50, spec=20082933, c=-1) at font.c:3262 #6 0x0000000000617fb0 in font_load_for_lface (f=0x13fb8c0, attrs=0x7fff3ee81f50, spec=20082933) at font.c:3335 #7 0x00000000006183a2 in font_open_by_spec (f=0x13fb8c0, spec=20082933) at font.c:3429 #8 0x0000000000618415 in font_open_by_name (f=0x13fb8c0, name=13702436) at font.c:3440 #9 0x000000000052fec4 in x_default_font_parameter (f=0x13fb8c0, parms=20784979) at xfns.c:2904 #10 0x0000000000530bc2 in Fx_create_frame (parms=20784979) at xfns.c:3139 - Vfontset_table has fontsets and font-specs in it, but NO font-entities. Marking from the Vfontset_table thus cannot mark any font entities. Where are the entities supposed to be referenced? Does it make sense they're never marked?