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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 24 May 2024 22:31:49 +0300

> From: Daniel Clemente <[email-masked]>
> Date: Fri, 24 May 2024 17:47:27 +0000
> 
> Emacs compiled without X.
> I can launch a new emacsclient with a keypress and I can kill it with another keypress.
> I held down the key to launch many emacsclient (around 20), then killed them, then launched a few more,
> killed them, … Less than 10 seconds of this behaviour are enough to crash the server.
> This doesn't happen during normal usage. I was intentionally trying to find the bug. I don't expect  the daemon
> to crash only by opening/closing frames.
> The command I run to launch the emacsclient is:  emacsclient -c -e "(progn (dired "~"))"
> I use rxvt-unicode.
> 
> Program received signal SIGPIPE, Broken pipe.

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?

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".

Thanks.