GNU bug report logs - #75477
31.0.50; scratch/igc: crash on the latest commit

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Fri, 10 Jan 2025 13:38:02 UTC

Severity: normal

Found in version 31.0.50

Done: Pip Cet <pipcet <at> protonmail.com>

Bug is archived. No further changes may be made.

Full log


Message #74 received at 75477 <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> protonmail.com>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 75477 <at> debbugs.gnu.org
Subject: Re: bug#75477: 31.0.50; scratch/igc: crash on the latest commit
Date: Wed, 22 Jan 2025 21:23:17 +0000
"Ihor Radchenko" <yantar92 <at> posteo.net> writes:

> Pip Cet <pipcet <at> protonmail.com> writes:
>
>>>> ./src/emacs -Q --eval '(run-with-timer 1.0 1.0 (lambda () (delete-frame (make-frame))))'
>>>> ...
>
> Maybe try with menu bar enabled.
> I just casually enabled the menu bar and noticed significant slowdown of
> frame creation.
>
> Here is what perf says:
>
>     48.62%  emacs         emacs                                    [.] rootCreateProtectable
>     14.08%  emacs         emacs                                    [.] igc_destroy_root_with_start
>      3.08%  emacs         emacs                                    [.] fix_lisp_obj
>      1.52%  emacs         emacs                                    [.] dflt_scanx
>      1.05%  emacs         emacs                                    [.] assq_no_quit
>      0.98%  emacs         libc.so.6                                [.] 0x000000000017d947
>      0.83%  emacs         emacs                                    [.] set_buffer_internal_2
>      0.75%  emacs         emacs                                    [.] plist_get
>      0.68%  emacs         emacs                                    [.] get_keymap
>      0.61%  emacs         libX11.so.6.4.0                          [.] _XrmInternalStringToQuark
>      0.52%  emacs         libc.so.6                                [.] pthread_mutex_lock

Thank you.  I was kind of delaying looking at the excessive number of
roots created by GTK, but I think it's time.  I did notice GTK seemed a
lot slower, and I guess that's the reason :-)

We fixed two GTK memory leaks in bug#75636.  The effect of these memory
leaks was that a small number of roots was kept alive.  Unfortunately,
one of them contained a pointer to the entire frame, so that was kept
alive and became unfreeable, including all descendent structures.

I'm not sure we've fixed all of these bugs; I'll try putting frames in a
weak hash table and seeing whether they accumulate.

My initial attempt was to allow read-only roots to be shared: if we
found one which already contained the pointer we want, we'd reuse this.
This reduced the number of actually necessary roots, but not
sufficiently.  So we'll have to make other changes.

Thanks again for the report, and sorry this took a while.

Pip





This bug report was last modified 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.