From: Jim Porter <jporterbugs@gmail.com>
To: Jens Schmidt <jschmidt4gnu@vodafonemail.de>, 66186@debbugs.gnu.org
Subject: bug#66186: "make lisp/eshell/esh-proc-tests" fails intermittently since 7e50861ca7ed3f620fe62ac6572f6e88b3600ece
Date: Sun, 24 Sep 2023 16:02:03 -0700 [thread overview]
Message-ID: <e457f8be-4d43-f649-5a13-38ea25c9dff9@gmail.com> (raw)
In-Reply-To: <e8ed3741-016b-5654-cb3e-d8755c260475@vodafonemail.de>
On 9/24/2023 2:35 PM, Jens Schmidt via Bug reports for GNU Emacs, the
Swiss army knife of text editors wrote:
> * Broken Pipe with gdb Stack Trace
>
> [test]$ HOME=/nonexistent LANG=C EMACS_TEST_DIRECTORY=/home/jschmidt/work/emacs-master/test gdb -q -batch -ex run -ex backtrace --args "../src/emacs" --module-assertions --no-init-file --no-site-file --no-site-lisp -L ":." -l ert -l lisp/eshell/esh-proc-tests.el --batch --eval '(ert-run-tests-batch-and-exit (quote (not (tag :unstable))))'
[snip]
> passed 8/12 esh-proc-test/pipeline-connection-type/last2 (0.056252 sec)
> [Detaching after vfork from child process 7986]
> [Detaching after vfork from child process 7987]
>
> 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?
I'm somewhat familiar with process.c, so I can take a look at this, but
it'll probably be a week or two until I have time to really dig in. In
the meantime, if anyone else wants to work on a fix, feel free.
next prev parent reply other threads:[~2023-09-24 23:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-24 21:35 bug#66186: "make lisp/eshell/esh-proc-tests" fails intermittently since 7e50861ca7ed3f620fe62ac6572f6e88b3600ece Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-24 23:02 ` Jim Porter [this message]
2023-09-25 4:52 ` Eli Zaretskii
2023-09-25 5:34 ` Jim Porter
2023-09-25 5:47 ` Jim Porter
2023-09-25 6:47 ` Eli Zaretskii
2023-09-25 7:18 ` Paul Eggert
2023-09-25 7:43 ` Eli Zaretskii
2023-09-25 19:12 ` Jim Porter
2023-09-28 20:33 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-01 20:13 ` Jim Porter
2023-09-25 9:01 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e457f8be-4d43-f649-5a13-38ea25c9dff9@gmail.com \
--to=jporterbugs@gmail.com \
--cc=66186@debbugs.gnu.org \
--cc=jschmidt4gnu@vodafonemail.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).