Subject: bug#69543: 30.0.50; emacs hang

From: Eli Zaretskii <[email-masked]>
Date: Mon, 04 Mar 2024 14:38:23 +0200

> Date: Mon, 04 Mar 2024 12:50:53 +0100
> From:  Gregor Zattler via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Dear Emacs developers, this happened when I tried to
> open a file via emacsclient via a convoluted stack of
> shell scripts.  I am sadly not able to reproduce.
> Perhaps the backtrace below helps.
> 
> Regards; Gregor
> 
> 
> Starting program: /home/grfz/src/emacs-master--32b4f9d21b14190f1ed1611515751abe4b90fa68--2024-02-27T09-36+01-00/src/emacs -xrm --init-directory="${USER_EMACS_DIRECTORY}" --fg-daemon="${EMACS_SERVER_NAME}"
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> [Detaching after vfork from child process 125867]
> [Detaching after vfork from child process 125868]
> [Detaching after vfork from child process 125869]
> [Detaching after vfork from child process 125870]
> [Detaching after vfork from child process 126543]
> [Detaching after vfork from child process 127191]
> 
> Program received signal SIGPIPE, Broken pipe.
> 0x00007ffff3db8240 in write () from /lib/x86_64-linux-gnu/libc.so.6
> #0  0x00007ffff3db8240 in write () at /lib/x86_64-linux-gnu/libc.so.6
> #1  0x0000555555779f37 in emacs_full_write (interruptible=-1, nbyte=18, buf=0x555558244218 "-emacs-pid 125864\n", fd=10, fd@entry=18) at ./src/sysdep.c:2811
> #2  emacs_write_sig (fd=fd@entry=10, buf=<optimized out>, nbyte=<optimized out>) at ./src/sysdep.c:2851
> #3  0x000055555588bdd8 in send_process (proc=Python Exception <class 'gdb.error'>: value has been optimized out
> , buf=<optimized out>, len=<optimized out>, object=Python Exception <class 'gdb.error'>: value has been optimized out
> , object@entry=XIL(0x55555614fb94)) at ./src/process.c:6703
> #4  0x000055555588c3f9 in Fprocess_send_string (process=Python Exception <class 'gdb.error'>: value has been optimized out
> , string=XIL(0x55555614fb94)) at ./src/lisp.h:1630

This says Emacs received SIGPIPE while writing, seems like to the
client process?  I guess your "convoluted stack of shell scripts"
needs to be scrutinized for possibly causing this?

IOW, why do you think this is an Emacs bug?