Subject: bug#71177: 30.0.50; crash when opening and closing many TTY frames in succession

From: Daniel Clemente <[email-masked]>
Date: Sat, 25 May 2024 11:04:39 +0000

> That's a red herring.  It's because Daniel is running Emacs under GDB
> that his backtrace ends with a SIGPIPE, while the backtrace for the
> crash lies elsewhere.

True, this was a SIGPIPE (still not a crash), and gdb was stopping here. By
running "cont" I could make it continue.
After running "handle SIGPIPE noprint pass", and continuing the same
behaviour for ~30 seconds, I saw the real crash (SIGSEGV).

The cause of the crash is the other bug I reported, bug#71176
(tty-set-up-initial-frame-faces, face_at_buffer_position, default_face =
0x0), so I posted the new backtrace there.

So in here we just discovered that opening+closing frames is a way to
reproduce bug#71176, but I think the bug is 71176 and this one can be
closed.

> It might help if you post the details of how you "launch a new
> emacsclient with a keypress and kill it with another keypress".  IOW,
> please describe the recipe to reproduce the problem starting from
> "emacs -Q -nw --daemon".

I found a simpler formula, by launching and killing emasclient in a bash
loop. Details at bug#71176.

On Sat, 25 May 2024 at 00:37, Po Lu <[email-masked]> wrote:

> Eli Zaretskii <[email-masked]> writes:
>
> > I think it crashes because of this SIGPIPE.  I hope some Unix expert
> > will be able to explain why Emacs gets get SIGPIPE in this scenario.
> > Perhaps because you kill emacsclient too quickly?
>
> That's a red herring.  It's because Daniel is running Emacs under GDB
> that his backtrace ends with a SIGPIPE, while the backtrace for the
> crash lies elsewhere.
>
>   (gdb) handle SIGPIPE noprint pass
>
> is probably in order, I suspect.
>