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 01:13:15 -0700 Message-ID: <871tdmex2c.fsf@secretsauce.net> References: <87d1x7e53b.fsf@secretsauce.net> <83k2rfhu93.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1443168866 25577 80.91.229.3 (25 Sep 2015 08:14:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Sep 2015 08:14:26 +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 10:14: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 1ZfO8y-0004eF-EL for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 10:14:12 +0200 Original-Received: from localhost ([::1]:47854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfO8x-0000n6-VK for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 04:14:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfO8t-0000kt-Iy for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 04:14:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfO8o-0006XX-Jg for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 04:14:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfO8o-0006XR-Gk for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 04:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZfO8n-0002Lr-U9 for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 04:14: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, 25 Sep 2015 08:14: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.14431688118990 (code B ref 21556); Fri, 25 Sep 2015 08:14:01 +0000 Original-Received: (at 21556) by debbugs.gnu.org; 25 Sep 2015 08:13:31 +0000 Original-Received: from localhost ([127.0.0.1]:42453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfO8I-0002Kv-HM for submit@debbugs.gnu.org; Fri, 25 Sep 2015 04:13:30 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:51664) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfO8G-0002Ko-NH for 21556@debbugs.gnu.org; Fri, 25 Sep 2015 04:13:29 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id F2AA6202CC for <21556@debbugs.gnu.org>; Fri, 25 Sep 2015 04:13:26 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Fri, 25 Sep 2015 04:13:26 -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=H522P gMspmd9GHaJ8O2jbDyNrus=; b=GyiHE+ELK4S0rXphde/KCJwNdmbCZtH8rFBr5 azE2kFzzbkbIgRbtooI/b+WNi4kIr9cPJnunClrytdEyqYAGodKRuJp1vTJ4UxN/ 1BnTe6yhCIqsmBtNGDIOiZ9MX3RH7nKUHwcoUfVbPJs6bGkQArd0EMsHSEgjTp5V MRDGSY= 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=H522PgMspmd9GHaJ8O2jbDyNrus=; b=rPatO hbMys5cPKt7cjCc7tOn7WkB0xhKVgdA8LXUeja2gWX2UClLJJg5xdx2FQqPQic1+ 8kSSwqlfDYA+ty5cuweu3yYExJOgmGmCsB1zmSrVDrub71qMbpRcMNRzhQd6974z Zvbkxob6gxYPY4jszBWylxRBd5h1lnsyh+L0mM= X-Sasl-enc: wN0o4208qumU2lP6pPhx7SWPcnH7RRgmpFJWuPVmY0HK 1443168806 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 AD6306800E8; Fri, 25 Sep 2015 04:13:26 -0400 (EDT) Original-Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1ZfO83-0004jb-CJ; Fri, 25 Sep 2015 01:13:15 -0700 In-reply-to: <83k2rfhu93.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:106894 Archived-At: Eli Zaretskii writes: >> 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. Hi. I just came back to this, figured out how to (semi-manually) put in a watchpoint, and this watchpoint told me what's resetting the font cache: the garbage collector. The backtrace in question: 0x00000000005d2172 in compact_font_cache_entry (entry=24121763) at alloc.c:5313 #0 0x00000000005d2172 in compact_font_cache_entry (entry=24121763) at alloc.c:5313 #1 0x00000000005d221b in compact_font_caches () at alloc.c:5339 #2 0x00000000005d2742 in garbage_collect_1 (end=0x7ffcdb166830) at alloc.c:5515 #3 0x00000000005d2e1d in Fgarbage_collect () at alloc.c:5720 #4 0x000000000054eb21 in maybe_gc () at lisp.h:4515 #5 0x00000000005f638c in Ffuncall (nargs=3, args=0x7ffcdb166988) at eval.c:2584 Lisp Backtrace: "Automatic GC" (0x0) "map-keymap" (0xdb166990) "keymap-canonicalize" (0xdb166f38) "x-create-frame" (0xdb1678a0) "x-create-frame-with-faces" (0xdb167dd8) 0x12b9d80 PVEC_COMPILED "apply" (0xdb168450) "frame-creation-function" (0xdb1689f0) "make-frame" (0xdb168f40) "make-frame-on-display" (0xdb1694a8) "server-create-window-system-frame" (0xdb169a78) "server-process-filter" (0xdb169ff8) Hardware watchpoint 24: ((struct Lisp_Cons *) 0x1701190)->u.cdr As a test I asked gdb to never drop fonts in the gc by acting as if drop==0 in compact_font_cache_entry(), and that made the leak in this bug go away. Clearly that's not a fix, but it's evidence that the understanding of the problem is correct, so progress is being made.