all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dima Kogan <dima@secretsauce.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 21556@debbugs.gnu.org
Subject: bug#21556: 25.0.50; Memory leak in emacs -Q with lucid (font)
Date: Fri, 25 Sep 2015 01:13:15 -0700	[thread overview]
Message-ID: <871tdmex2c.fsf@secretsauce.net> (raw)
In-Reply-To: <83k2rfhu93.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Dima Kogan <dima@secretsauce.net>
>> 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.





  parent reply	other threads:[~2015-09-25  8:13 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25  0:05 bug#21556: 25.0.50; Memory leak in emacs -Q with lucid (font) Dima Kogan
2015-09-25  6:45 ` Eli Zaretskii
2015-09-25  6:57   ` Dima Kogan
2015-09-25  8:44     ` Eli Zaretskii
2015-09-25  8:13   ` Dima Kogan [this message]
2015-09-25  8:49     ` Eli Zaretskii
2015-09-25  9:10       ` Eli Zaretskii
2015-09-25  9:30         ` Dima Kogan
2015-09-25  9:45           ` Eli Zaretskii
2015-09-25 10:03           ` Eli Zaretskii
     [not found] ` <83y4ftfbjw.fsf@gnu.org>
2015-09-27  7:56   ` K. Handa
2015-09-27  8:09     ` Eli Zaretskii
2015-09-28  9:22       ` Dima Kogan
2015-09-28  9:58         ` Eli Zaretskii
2015-09-29  9:28           ` Dima Kogan
2015-09-30  7:00             ` Eli Zaretskii
2015-09-30 10:16             ` Dmitry Antipov
2015-10-01  9:42               ` Dima Kogan
2015-10-01 13:27                 ` Dmitry Antipov
2015-10-01 18:50                   ` Dima Kogan
2015-10-02  5:04                     ` Dmitry Antipov
2015-10-02 18:56                       ` Dima Kogan
2015-10-29 22:51                       ` Dima Kogan
2015-10-30 14:20                         ` Eli Zaretskii
2015-10-30 19:17                           ` Dima Kogan
2015-10-30 20:38                             ` Eli Zaretskii
2015-10-30 20:50                               ` Dima Kogan
2015-11-09  2:55                             ` Dima Kogan
2015-11-09 16:38                               ` Eli Zaretskii
2019-11-17  6:34                               ` Lars Ingebrigtsen
2019-11-17 15:38                                 ` Eli Zaretskii
2019-11-17 21:27                                   ` Dima Kogan
2019-11-18  8:13                                     ` Lars Ingebrigtsen
2015-09-29 10:05       ` K. Handa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871tdmex2c.fsf@secretsauce.net \
    --to=dima@secretsauce.net \
    --cc=21556@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.