Subject: bug#76004: 31.0.50; feature/igc crashed on Linux, wayland (with full gdb debug info)

From: Eval Exec <[email-masked]>
Date: Sun, 2 Feb 2025 15:00:44 +0800

The git commit hash is 6f7e916a6c80df11bf169587913fb0443f6b5490
(I'm replying this email by the phone, not convenient to view the git log
date for this hash.

On Sun, Feb 2, 2025, 14:52 Eli Zaretskii <[email-masked]> wrote:

> > From: Eval EXEC <[email-masked]>
> > Date: Sun, 02 Feb 2025 12:57:20 +0800
> >
> > (gdb) source /home/exec/Projects/
> git.savannah.gnu.org/git/emacs/src/.gdbinit
> > warning: /home/exec/Projects/
> git.savannah.gnu.org/git/emacs-build/../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 0x5b5f92: file /home/exec/Projects/
> git.savannah.gnu.org/git/emacs/src/emacs.c, line 432.
> > Breakpoint 2 at 0x583d75: file /home/exec/Projects/
> git.savannah.gnu.org/git/emacs/src/xterm.c, line 27122.
> > (gdb) bt full
> > #0  XCAR (c=XIL(0x7f6c4a7bc7f3)) at /home/exec/Projects/
> git.savannah.gnu.org/git/emacs/src/lisp.h:1562
> > No locals.
> > #1  Fdelq (elt=XIL(0x7f6c358427fb), list=XIL(0x7f6c35842813)) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/fns.c:2103
> >         tem = <optimized out>
> >         li = {
> >           tortoise = XIL(0x7f6c4a7bc7f3),
> >           max = 8,
> >           n = 0,
> >           q = 8
> >         }
> >         prev = XIL(0x7f6c35871db3)
> >         tail = XIL(0x7f6c4a7bc7f3)
> > #2  0x0000000000695af7 in remove_process (proc=XIL(0x7f6c2a3ef8ed)) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/process.c:962
> >         pair = <optimized out>
> > #3  0x00000000006a19ca in status_notify
> (deleting_process=0x7f6c2a3ef8e8, wait_proc=0x0) at /home/exec/Projects/
> git.savannah.gnu.org/git/emacs/src/process.c:7881
> >         symbol = <optimized out>
> >         p = 0x7f6c2a3ef8e8
> >         proc = XIL(0x7f6c2a3ef8ed)
> >         tail = XIL(0x7f6c2a2de583)
> >         msg = XIL(0x7f6c34d11854)
> >         got_some_output = -1
> > #4  0x0000000000698fb7 in Fdelete_process (process=XIL(0x7f6c2a3ef8ed))
> at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/process.c:1128
> >         p = 0x7f6c2a3ef8e8
> >         mess = false
> > #5  0x00000000006a690c in kill_buffer_processes (buffer=XIL(0)) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/process.c:8418
> >         tail = XIL(0x7f6c2a2de583)
> >         proc = <optimized out>
> > #6  0x00000000005b48ec in shut_down_emacs (sig=sig@entry=11,
> stuff=stuff@entry=XIL(0)) at /home/exec/Projects/
> git.savannah.gnu.org/git/emacs/src/emacs.c:3148
> >         tpgrp = <optimized out>
> >         fmt = "Fatal error %d: "
> > #7  0x00000000005b6027 in terminate_due_to_signal (sig=11,
> backtrace_limit=40) at /home/exec/Projects/
> git.savannah.gnu.org/git/emacs/src/emacs.c:453
> > No locals.
> > #8  0x00000000005da311 in handle_fatal_signal (sig=sig@entry=11) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/sysdep.c:1799
> > No locals.
> > #9  0x00000000005d6194 in deliver_thread_signal (handler=0x5da303
> <handle_fatal_signal>, sig=11) at /home/exec/Projects/
> git.savannah.gnu.org/git/emacs/src/sysdep.c:1791
> >         old_errno = <optimized out>
> > #10 deliver_fatal_thread_signal (sig=sig@entry=11) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/sysdep.c:1811
> > No locals.
> > #11 0x00000000005d61c3 in handle_sigsegv (sig=11, siginfo=<optimized
> out>, arg=<optimized out>) at /home/exec/Projects/
> git.savannah.gnu.org/git/emacs/src/sysdep.c:1949
> >         fatal = <optimized out>
> > #12 <signal handler called>
> > No symbol table info available.
> > #13 0x00007f6cc3cde86b in kill () from
> /nix/store/nqb2ns2d1lahnd5ncwmn6k84qfd7vx2k-glibc-2.40-36/lib/libc.so.6
> > No symbol table info available.
> > #14 0x00000000007928f9 in sigHandle ()
> > No symbol table info available.
> > #15 <signal handler called>
> > No symbol table info available.
> > #16 0x0000000000628fa0 in indirect_function (object=XIL(0)) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/data.c:2563
> > No locals.
>
> Very strange, this SIGSEGV:
>
>   indirect_function (Lisp_Object object)
>   {
>     while (SYMBOLP (object) && !NILP (object))
>       object = XSYMBOL (object)->u.s.function;
>     return object;
>   }
>
> If indirect_function is called with nil, it should just return nil.
> Why does it segfault?
>
> What happens next is that we shut down Emacs, and something happens
> when we are deleting a process object:
>
> > #0  XCAR (c=XIL(0x7f6c4a7bc7f3)) at /home/exec/Projects/
> git.savannah.gnu.org/git/emacs/src/lisp.h:1562
> > No locals.
> > #1  Fdelq (elt=XIL(0x7f6c358427fb), list=XIL(0x7f6c35842813)) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/fns.c:2103
> >         tem = <optimized out>
> >         li = {
> >           tortoise = XIL(0x7f6c4a7bc7f3),
> >           max = 8,
> >           n = 0,
> >           q = 8
> >         }
> >         prev = XIL(0x7f6c35871db3)
> >         tail = XIL(0x7f6c4a7bc7f3)
> > #2  0x0000000000695af7 in remove_process (proc=XIL(0x7f6c2a3ef8ed)) at
> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/process.c:962
> >         pair = <optimized out>
> > #3  0x00000000006a19ca in status_notify
> (deleting_process=0x7f6c2a3ef8e8, wait_proc=0x0) at /home/exec/Projects/
> git.savannah.gnu.org/git/emacs/src/process.c:7881
>
> Why did it stop inside XCAR?  And I don't see MPS involved anywhere,
> so this could be some problem unrelated to the igc branch.
>
> Maybe someone else has an idea how to debug this further.
>
> Btw, your sources seem to be outdated.  When did you sync with the Git
> repository?
>