Subject: Re: bug#74747: 30.0.92; scratch/igc: crashes when executing M-x list-packages

From: Gerd Möllmann <[email-masked]>
Date: Mon, 09 Dec 2024 16:37:16 +0100

Gregor Zattler via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <[email-masked]> writes:

> Dear Emacs-developers, Gerd,

Hi Gregor (Added Pip and Helmut in CC).

> Emacs from scratch/igc started with -Q
> crashes when I do M-X list-packages.  I
> produced some gdb output, see below.
>
> I wondered, if such random bug reports
> are of interest for scratch/igc at all
> (if not, please drop this bug report,
> it's in no way crucial to me) and if it
> is appropriate to post them to the bug
> tracker.  I think it would be helpful if
> README-IGC would answer this two
> questions.
>
> I'm happy to answer very specifically
> specified questions.
>
> Regards, gregor
>
>
> Starting program: /home/grfz/src/emacs-igc/src/emacs --debug-init -Q -xrm --init-directory="${USER_EMACS_DIRECTORY}" --fg-daemon="${EMACS_SERVER_NAME}"
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> [Detaching after vfork from child process 823489]
> [Detaching after vfork from child process 823490]
> [Detaching after vfork from child process 823491]
>
> Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647) at ./src/emacs.c:432
> 432	{
> #0  terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647) at ./src/emacs.c:432
> #1  0x00005555557d7c44 in set_state (state=state@entry=IGC_STATE_DEAD) at ./src/igc.c:858
> #2  0x00005555557d7c78 in igc_assert_fail (file=file@entry=0x555555902930 "igc.c", line=line@entry=586, msg=msg@entry=0x5555559022d0 "header_type (h) == IGC_OBJ_PAD || nbytes >= sizeof (struct igc_fwd)") at ./src/igc.c:209
> #3  0x00005555557d8413 in obj_size (h=h@entry=0x555555f991a0 <main_thread>) at ./src/igc.c:586
> #4  0x00005555557d843d in igc_check_fwd (client=client@entry=0x555555f991a0 <main_thread>, is_vecto

I think the above igc_check_fwd could already be the problem in itself:
ISTR that it stopped being a reliable check at some point. Maybe the
others remember more details. And maybe we should remove it, don't know.

> In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, cairo version
>  1.16.0) of 2024-12-07 built on no
> Repository revision: 308b216444b29b2d2f111d32db6d55a5322282cd
> Repository branch: scratch/igc
> Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
> System Description: Debian GNU/Linux 12 (bookworm)
>
> Configured using:
>  'configure --infodir=/usr/share/info/emacs --with-json
>  --with-file-notification=yes --with-libsystemd --with-cairo
>  --with-x=yes --with-x-toolkit=no --without-toolkit-scroll-bars
>  --without-gsettings --enable-check-lisp-object-type
>  --enable-checking=yes,glyphs,igc_check_fwd,igc_debug,
> --with-mps=debug

Could you please remove the igc_check_fwd from --enable-checking and see
if it works that way?