Subject: Re: bug#53809: 29.0.50; fatal error: assertion failed: string_immovable_p (bytestr)

From: Eli Zaretskii <[email-masked]>
Date: Sun, 06 Feb 2022 09:38:51 +0200

> From: Gregor Zattler <[email-masked]>
> Date: Sat, 05 Feb 2022 23:50:13 +0100
> 
> I just did a
> 
> ~/src/emacs/src$ rm -rf * ; git checkout -f ; git pull
> 
> and did (therefore a full bootstrap) make.

Did you install Emacs after rebuilding it, or did you invoke it from
the build directory?

Also, I think your setup is incorrect:

>  --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.0/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.0/site-lisp:/usr/share/emacs/site-lisp

This seems to mean you are installing Emacs 29, but telling it to use
Lisp files from Emacs 28?

> I'm sorry, I was not able to isolate a minimal configuration
> which exhibits this problem.  I did a gdb bt full and
> xbacktrace, though (see below).  This gdb output is all
> gibberish to me but at the very end there I saw
> "SPECPDL_BACKTRACE".  Therefore I experimented with a
> (setq max-specpdl-size 500000) in early-init.el, but this
> did not help.

Your GDB is mis-configured wrt how it uses Python:

> #1  0x00005555555ae6ef in die (msg=msg@entry=0x5555558b70a7 "string_immovable_p (bytestr)", file=file@entry=0x5555558b7080 "bytecode.c", line=line@entry=361) at alloc.c:7546
> #2  0x00005555555b8df0 in exec_byte_codePython Exception <class 'gdb.error'> value has been optimized out:
> Python Exception <class 'gdb.error'> value has been optimized out:
> Python Exception <class 'gdb.error'> value has been optimized out:
>  (bytestr=, vector=, maxdepth=, args_template=0, nargs=0, args=<optimized out>) at bytecode.c:361

Those Python exceptions mean that the backtrace lacks important
information, and the reason is some problem with your GDB installation
and your Python installation (perhaps GDB was built with a different
version of Python than the one actually installed?).  For this reason,
it is very hard (read: impossible) to use your backtrace for trying to
diagnose the problem.  And since the backtrace is the only data you
can present that tells us what happened, it is hard to make any
progress here.

So please fix your GDB installation and produce a valid backtrace,
then post it here.  Bonus points for rebuilding Emacs without
optimizations, which would make the backtrace more accurate and
descriptive.

Thanks.