Subject: bug#44326: 27.1.50; busy loop in lisp_free_align

From: Aaron Jensen <[email-masked]>
Date: Tue, 26 Jan 2021 22:35:54 -0600

On Tue, Jan 26, 2021 at 10:28 PM Lars Ingebrigtsen <[email-masked]> wrote:
>
> Aaron Jensen <[email-masked]> writes:
>
> > Some more information that is hopefully helpful.
> >
> > My Emacs memory usage is currently around 2.5GB.
> >
> > Lisp Stack trace from busy loop:
> >
> > (unsigned char *) $2 = 0x00000001003f48c6 “timer-event-handler”
> > (unsigned char *) $3 = 0x00000001003f074c “apply”
> > (unsigned char *) $4 = 0x00000001191ba690 “gcmh-idle-garbage-collect”
> > (unsigned char *) $5 = 0x00000001003ee2fe “garbage-collect”
> >
> > GC Stats during busy loop. These don't seem to increase, it stays busy
> > in lisp_align_free, though with different blocks over time.
>
> Is it always hanging in a `gcmh-idle-garbage-collect'?

Yes, though since reducing my high cons threshold to 16mb, it hasn't reocurred.

> Can you
> reproduce this problem without using that package?

No, I don't believe so.
>
> Also, could you include the output from `M-x report-emacs-bug',
> especially the bit that describes your Emacs version and OS version?

Sure, though it's a different build by now and I'm using native-comp
now, but wasn't before.

In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.6.0, NS
appkit-1894.60 Version 10.15.7 (Build 19H114))
 of 2021-01-24 built on aaron-sub.local
Repository revision: 0ffb3dfaa483b0c5cf1f7f367efcb5e9c041ab53
Repository branch: feature/native-comp
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.7

Configured using:
 'configure --disable-dependency-tracking --disable-silent-rules
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs-plus@28/28.0.50/share/info/emacs
 --prefix=/usr/local/Cellar/emacs-plus@28/28.0.50 --with-xml2
 --with-gnutls --with-nativecomp --without-dbus --with-imagemagick
 --with-modules --with-rsvg --with-ns --disable-ns-self-contained
 'CFLAGS=-I/usr/local/opt/gcc/include -I/usr/local/opt/libgccjit/include
 -I/usr/local/opt/gmp/include -I/usr/local/opt/jpeg/include'
 'LDFLAGS=-L/usr/local/lib/gcc/10 -I/usr/local/opt/gcc/include
 -I/usr/local/opt/libgccjit/include -I/usr/local/opt/gmp/include
 -I/usr/local/opt/jpeg/include''

Configured features:
ACL GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES
NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF
TOOLKIT_SCROLL_BARS ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Aaron