GNU bug report logs - #66186
"make lisp/eshell/esh-proc-tests" fails intermittently since 7e50861ca7ed3f620fe62ac6572f6e88b3600ece

Previous Next

Package: emacs;

Reported by: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>

Date: Sun, 24 Sep 2023 21:37:02 UTC

Severity: normal

Fixed in version 30.1

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 66186 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: 66186 <at> debbugs.gnu.org, jschmidt4gnu <at> vodafonemail.de
Subject: Re: bug#66186: "make lisp/eshell/esh-proc-tests" fails intermittently
 since 7e50861ca7ed3f620fe62ac6572f6e88b3600ece
Date: Mon, 25 Sep 2023 07:52:22 +0300
> Date: Sun, 24 Sep 2023 16:02:03 -0700
> From: Jim Porter <jporterbugs <at> gmail.com>
> 
> > Thread 1 "emacs" received signal SIGPIPE, Broken pipe.
> > 0x00007ffff57bffef in write () from /lib/x86_64-linux-gnu/libpthread.so.0
> > #0  0x00007ffff57bffef in write () at /lib/x86_64-linux-gnu/libpthread.so.0
> > #1  0x00005555556f2f08 in emacs_full_write (fd=19, buf=0x5555565918b8 "hi", nbyte=2, interruptible=-1) at sysdep.c:2812
> [snip]
> 
> Thanks. This looks like it's caused when Eshell runs a command something 
> like this:
> 
>    echo hi | sh -c 'if [ -t 0 ]; then echo stdin; fi; ...'
> 
> (Note that the pipe above is handled entirely by Eshell, using 
> 'process-send-string' in this case.) I'm guessing that sometimes, the 
> 'sh' process has exited by the time Eshell calls '(process-send-string 
> PROC "hi")'. Presumably, the commit you identified (which just changed 
> some debug logging) altered the timings by just enough to trigger this 
> race condition for you.
> 
> However, I don't understand why this would cause an abort though; 
> normally, 'process-send-string' should just signal an Elisp error (which 
> Eshell then catches and does the right thing with it). Maybe there's a 
> bug somewhere in process.c where it's not correctly handling the (real) 
> SIGPIPE signal and converting it to an Elisp signal?

In batch mode, SIGPIPE is not ignored by Emacs, see init_signals.
This was changed 11 years ago, see commit 4d7e6e51dd.

Perhaps Eshell should check that the process is still alive before
calling process-send-string?




This bug report was last modified 1 year and 293 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.