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: Fri, 25 Sep 2015 09:45:44 +0300 Message-ID: <83k2rfhu93.fsf@gnu.org> References: <87d1x7e53b.fsf@secretsauce.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1443163592 9887 80.91.229.3 (25 Sep 2015 06:46:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Sep 2015 06:46:32 +0000 (UTC) Cc: 21556@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 25 08:46:21 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 1ZfMlq-00061z-7d for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 08:46:14 +0200 Original-Received: from localhost ([::1]:41937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfMlp-0006TG-Lf for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 02:46:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfMli-0006Nb-GQ for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 02:46:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfMle-000406-Cf for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 02:46:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfMle-0003zo-9h for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 02:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZfMld-0000Ax-V0 for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 02:46: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: Fri, 25 Sep 2015 06:46: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.1443163546651 (code B ref 21556); Fri, 25 Sep 2015 06:46:01 +0000 Original-Received: (at 21556) by debbugs.gnu.org; 25 Sep 2015 06:45:46 +0000 Original-Received: from localhost ([127.0.0.1]:42408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfMlN-0000AQ-GS for submit@debbugs.gnu.org; Fri, 25 Sep 2015 02:45:45 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:64039) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfMlK-0000AG-2v for 21556@debbugs.gnu.org; Fri, 25 Sep 2015 02:45:43 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NV700900ZTF5A00@a-mtaout21.012.net.il> for 21556@debbugs.gnu.org; Fri, 25 Sep 2015 09:45:40 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NV8009C60442B80@a-mtaout21.012.net.il>; Fri, 25 Sep 2015 09:45:40 +0300 (IDT) In-reply-to: <87d1x7e53b.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:106890 Archived-At: > From: Dima Kogan > Date: Thu, 24 Sep 2015 17:05:12 -0700 > > Main question of this bug report so far: > > Is there a way to put a watchpoint on a lisp object? Theoretically, yes. > How? Depends on the object. Which object do you want to put the watchpoint on? Please show its source variable name and the source file lines where it is used. Also, if the object is complex, what kinds of changes in it would you like to watch? > I'm observing that most (but not all) of the time, the menu font is > being created around the same time as the cache reset. Backtrace: > > 7fcf06d1e99f XftFontOpenName (/usr/lib/x86_64-linux-gnu/libXft.so.2.3.2) > 6b5861 openXftFont (/tmp/emacs-tst) > 6b5999 XlwMenuInitialize (/tmp/emacs-tst) > 7fcf07ac9e2c [unknown] (/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0) > 7fcf07aca7c8 [unknown] (/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0) > 7fcf07acac18 _XtCreateWidget (/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0) > 7fcf07acaefd XtCreateWidget (/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0) > 6b01f3 xlw_create_menubar (/tmp/emacs-tst) > 6af1d3 instantiate_widget_instance (/tmp/emacs-tst) > 6ae462 allocate_widget_instance (/tmp/emacs-tst) > 6af306 lw_make_widget (/tmp/emacs-tst) > 6af392 lw_create_widget (/tmp/emacs-tst) > 4974b9 set_frame_menubar (/tmp/emacs-tst) > 497673 initialize_frame_menubar (/tmp/emacs-tst) > 5358f5 Fx_create_frame (/tmp/emacs-tst) > > This font allocation doesn't read or write to the frame cache, and has > its own font-cleanup call that appears to work. I cannot find any > explicit evidence that this clears out the font cache, but turning off > the menu with M-x menu-bar-mode makes this leak mostly go away. This is in the lwlib library, whose font allocations are AFAIK not tracked by Emacs's font managing machinery. With other toolkits, we don't even know which fonts are used by the menus, and don't handle nor have access to those fonts.