Subject: Re: bug#76218: [feature/igc] aa915b0c87e crash on Wayland/Linux Kde

From: Eli Zaretskii <[email-masked]>
Date: Wed, 12 Feb 2025 15:58:49 +0200

> From: Eval Exec <[email-masked]>
> Date: Wed, 12 Feb 2025 13:00:08 +0800
> 
> Hello,
> 
> I'm helping to test feature/igc branch on my local machine, but I
> can't reproduce it.
> I build emacs by:
> ```
> BRANCH_NAME=$(git branch --show-current | sed 's/\//_/g')
> COMMIT_ID=$(git rev-parse HEAD)
> BUILD_DIR=${BRANCH_NAME}-${COMMIT_ID}-O3g3gdb
> INSTALL_PREFIX=$(realpath ../emacs-build/${BUILD_DIR})
> 
> ./autogen.sh
> ./configure  CFLAGS='-O3 -g3 -ggdb -march=native' \
>   --prefix=${INSTALL_PREFIX} \
>   --with-imagemagick  \
>   --with-xwidgets \
>   --with-mps=yes \
>   --with-modules \
>   --with-cairo --with-cairo-xcb \
>   --without-compress-install \
>   --with-mailutils\
>   --with-tree-sitter --with-xinput2 \
>   --with-dbus \
>   --with-native-compilation=aot \
>   --enable-link-time-optimization \
>   --with-file-notification=inotify\
>   && make -j20 install
> ```
> 
> What should I do to help us to investigate this issue?
> 
> Thank you.
> 
> Eval Exec
> 
> The gdb full back trace is:
> 
> (gdb) source /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/.gdbinit
> warning: /home/exec/Projects/github.com/nervosnetwork/ckb/../lwlib: No
> such file or directory
> SIGINT is used by the debugger.
> Are you sure you want to change it? (y or n) [answered Y; input not
> from terminal]
> DISPLAY = :0
> TERM = tmux-256color
> Breakpoint 1 at 0x4868eb: file
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/emacs.c, line
> 425.
> Breakpoint 2 at 0x5cdb90: file
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/xterm.c, line
> 27130.
> (gdb) bt full
> #0  0x00007fcd21699a9c in __pthread_kill_implementation () from
> /nix/store/nqb2ns2d1lahnd5ncwmn6k84qfd7vx2k-glibc-2.40-36/lib/libc.so.6
> No symbol table info available.
> #1  0x00007fcd21647576 in raise () from
> /nix/store/nqb2ns2d1lahnd5ncwmn6k84qfd7vx2k-glibc-2.40-36/lib/libc.so.6
> No symbol table info available.
> #2  0x00000000004869ac in terminate_due_to_signal (sig=11,
> backtrace_limit=<optimized out>) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/emacs.c:463
> No locals.
> #3  0x0000000000487047 in handle_fatal_signal (sig=11) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/sysdep.c:1793
> No locals.
> #4  deliver_thread_signal (handler=<optimized out>, sig=11) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/sysdep.c:1785
>         old_errno = <optimized out>
>         old_errno = <optimized out>
> #5  deliver_fatal_thread_signal (sig=11) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/sysdep.c:1805
> No locals.
> #6  handle_sigsegv (sig=11, siginfo=0x9f6030 <sigsegv_stack+62640>,
> arg=<optimized out>) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/sysdep.c:1943
>         fatal = <optimized out>
> #7  <signal handler called>
> No symbol table info available.
> #8  0x00007fcd2164786b in kill () from
> /nix/store/nqb2ns2d1lahnd5ncwmn6k84qfd7vx2k-glibc-2.40-36/lib/libc.so.6
> No symbol table info available.
> #9  0x000000000088bd09 in sigHandle ()
> No symbol table info available.
> #10 <signal handler called>
> No symbol table info available.
> #11 0x0000000000702d33 in string_char_and_length (length=<optimized
> out>, p=<optimized out>) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/character.h:374
>         c = <optimized out>
>         d = <optimized out>
>         c = <optimized out>
>         d = <optimized out>
> #12 fetch_string_char_advance (byteidx=<synthetic pointer>,
> charidx=<synthetic pointer>, string=<optimized out>) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/character.h:447
>         chlen = <optimized out>
>         output = <optimized out>
>         b = 29168032
>         chp = 0x7fcd167ff000 ""
>         output = <optimized out>
>         b = <optimized out>
>         chp = <optimized out>
>         chlen = <optimized out>
> #13 print_object (obj=<optimized out>, printcharfun=<optimized out>,
> escapeflag=true) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/print.c:2618

Yet another case of Emacs dying when it tries to call the Lisp
debugger due to a Lisp error.

Is this the latest igc branch?

> #15 0x0000000000704bdc in Fprin1 (object=XIL(0x7fcd11ec4468),
> printcharfun=XIL(0x7fcccc88ba25), overrides=<optimized out>)
>     at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/print.c:778
>         count = <optimized out>
>         pc = {
>           printcharfun = XIL(0),
>           old_printcharfun = XIL(0x7fcccc88ba25),
>           old_point = -1,
>           start_point = -1,
>           old_point_byte = -1,
>           start_point_byte = -1,
>           specpdl_count = {
>             bytes = 3968
>           }
>         }

What does the below produce?

 (gdb) fr 15
 (gdb) p object
 (gdb) xtype