X-Debbugs-CC: Jim Porter First reported here: https://yhetil.org/emacs-devel/ea8d365a-f014-d4d7-14d0-60ccdfe7974e@vodafonemail.de/ Rest of mail structured by outline mode conventions. I managed to get a GDB backtrace of a SIGPIPE, please see last section. * Original Text of Above Mail Not sure whether anybody has seen or reported already: Approx. 1 of 5 executions of "make lisp/eshell/esh-proc-tests" fail for me like this: ------------------------- snip ------------------------- make[1]: Entering directory '/home/jschmidt/work/emacs-master/test' GEN lisp/eshell/esh-proc-tests.log Running 23 tests (2023-09-24 20:32:11+0200, selector `(not (tag :unstable))') Loading em-alias... Loading em-banner... Loading em-basic... Loading em-cmpl... Loading em-extpipe... Loading em-glob... Loading em-hist... Loading em-ls... Loading em-pred... Loading em-prompt... Loading em-script... Loading em-term... Loading em-unix... passed 1/23 esh-proc-test/exit-status/failure (0.117111 sec) passed 2/23 esh-proc-test/exit-status/success (0.105469 sec) passed 3/23 esh-proc-test/exit-status/with-stderr-pipe (0.105925 sec) passed 4/23 esh-proc-test/kill-pipeline (0.108324 sec) passed 5/23 esh-proc-test/kill-pipeline-head (0.108148 sec) passed 6/23 esh-proc-test/kill-process/background-prompt (0.005315 sec) [sleep]+ Done (/usr/bin/sleep 100) passed 7/23 esh-proc-test/kill-process/foreground-only (0.207743 sec) passed 8/23 esh-proc-test/kill-process/redirect-message (0.004864 sec) Tramp: Sending command `exec sh -i' Tramp: Found remote shell prompt on `sappc2' Tramp: Sending command `exec sh -i' Tramp: Found remote shell prompt on `sappc2' passed 9/23 esh-proc-test/output/remote-redirect (0.157058 sec) passed 10/23 esh-proc-test/output/stderr-to-buffer (0.106075 sec) passed 11/23 esh-proc-test/output/stdout-and-stderr-to-buffer (0.105911 sec) passed 12/23 esh-proc-test/output/stdout-to-buffer (0.105907 sec) passed 13/23 esh-proc-test/output/to-screen (0.105792 sec) passed 14/23 esh-proc-test/pipeline-connection-type/first (0.055700 sec) passed 15/23 esh-proc-test/pipeline-connection-type/last (0.056159 sec) make[1]: *** [Makefile:181: lisp/eshell/esh-proc-tests.log] Broken pipe make[1]: Leaving directory '/home/jschmidt/work/emacs-master/test' make: *** [Makefile:247: lisp/eshell/esh-proc-tests] Error 2 ------------------------- snip ------------------------- I bisected with ------------------------- snip ------------------------- #!/bin/bash make FAST=true -j8 bootstrap || exit 1 for (( i = 0; i < 30; i++ )); do ( cd test && make lisp/eshell/esh-proc-tests ) || exit 1 done exit 0 ------------------------- snip ------------------------- to ------------------------- snip ------------------------- 7e50861ca7ed3f620fe62ac6572f6e88b3600ece is the first bad commit commit 7e50861ca7ed3f620fe62ac6572f6e88b3600ece Author: Jim Porter Date: Thu Sep 14 17:51:16 2023 -0700 ; Simplify how to use 'eshell-debug-command' Now, 'eshell-debug-command' works more like 'format-message', which is how we usually use it. * lisp/eshell/esh-util.el (eshell-always-debug-command): New function. (eshell-debug-command): Simplify. Update callers. lisp/eshell/esh-arg.el | 6 +++--- lisp/eshell/esh-cmd.el | 10 ++++++---- lisp/eshell/esh-proc.el | 41 +++++++++++++++++------------------------ lisp/eshell/esh-util.el | 26 +++++++++++++++++--------- 4 files changed, 43 insertions(+), 40 deletions(-) bisect run success ------------------------- snip ------------------------- Pls let me know whether I should open a separate bug for this. * Modified Test Case On master, commit 947409d408ed763a9fc35f9f7df97fec28a16837, I took lisp/eshell/esh-proc-tests.el and stripped off everything but tests passed 1/12 esh-proc-test/pipeline-connection-type/first (0.067548 sec) passed 2/12 esh-proc-test/pipeline-connection-type/first0 (0.057414 sec) passed 3/12 esh-proc-test/pipeline-connection-type/first1 (0.057129 sec) passed 4/12 esh-proc-test/pipeline-connection-type/first2 (0.057843 sec) passed 5/12 esh-proc-test/pipeline-connection-type/last (0.055670 sec) passed 6/12 esh-proc-test/pipeline-connection-type/last0 (0.055894 sec) passed 7/12 esh-proc-test/pipeline-connection-type/last1 (0.056194 sec) passed 8/12 esh-proc-test/pipeline-connection-type/last2 (0.056234 sec) passed 9/12 esh-proc-test/pipeline-connection-type/middle (0.058843 sec) passed 10/12 esh-proc-test/pipeline-connection-type/middle0 (0.077003 sec) passed 11/12 esh-proc-test/pipeline-connection-type/middle1 (0.057962 sec) passed 12/12 esh-proc-test/pipeline-connection-type/middle2 (0.058520 sec) where the N are just a copy of . Attached for reference. A good test log is also attached for reference. * Broken Pipe (Rare) [test]$ make lisp/eshell/esh-proc-tests make[1]: Entering directory '/home/jschmidt/work/emacs-master/test' GEN lisp/eshell/esh-proc-tests.log Running 12 tests (2023-09-24 23:27:38+0200, selector `(not (tag :unstable))') Loading em-alias... Loading em-banner... Loading em-basic... Loading em-cmpl... Loading em-extpipe... Loading em-glob... Loading em-hist... Loading em-ls... Loading em-pred... Loading em-prompt... Loading em-script... Loading em-term... Loading em-unix... passed 1/12 esh-proc-test/pipeline-connection-type/first (0.067822 sec) passed 2/12 esh-proc-test/pipeline-connection-type/first0 (0.057025 sec) passed 3/12 esh-proc-test/pipeline-connection-type/first1 (0.057386 sec) passed 4/12 esh-proc-test/pipeline-connection-type/first2 (0.057817 sec) passed 5/12 esh-proc-test/pipeline-connection-type/last (0.055977 sec) passed 6/12 esh-proc-test/pipeline-connection-type/last0 (0.055745 sec) make[1]: *** [Makefile:181: lisp/eshell/esh-proc-tests.log] Broken pipe make[1]: Leaving directory '/home/jschmidt/work/emacs-master/test' make: *** [Makefile:247: lisp/eshell/esh-proc-tests] Error 2 * Test Aborted with Elisp Stacktrace (Even Rarer) Executed under the control of GDB, but also happens without GDB. [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))))' [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffee036700 (LWP 7917)] [Detaching after vfork from child process 7918] [Detaching after vfork from child process 7919] [Detaching after vfork from child process 7920] [Detaching after vfork from child process 7921] Running 12 tests (2023-09-24 23:15:37+0200, selector `(not (tag :unstable))') Loading em-alias... Loading em-banner... Loading em-basic... Loading em-cmpl... Loading em-extpipe... Loading em-glob... Loading em-hist... Loading em-ls... Loading em-pred... Loading em-prompt... Loading em-script... Loading em-term... Loading em-unix... [Detaching after vfork from child process 7922] [Detaching after vfork from child process 7923] passed 1/12 esh-proc-test/pipeline-connection-type/first (0.076640 sec) [Detaching after vfork from child process 7924] [Detaching after vfork from child process 7925] passed 2/12 esh-proc-test/pipeline-connection-type/first0 (0.058361 sec) [Detaching after vfork from child process 7926] [Detaching after vfork from child process 7927] passed 3/12 esh-proc-test/pipeline-connection-type/first1 (0.058868 sec) [Detaching after vfork from child process 7928] [Detaching after vfork from child process 7929] passed 4/12 esh-proc-test/pipeline-connection-type/first2 (0.059533 sec) [Detaching after vfork from child process 7930] passed 5/12 esh-proc-test/pipeline-connection-type/last (0.056367 sec) [Detaching after vfork from child process 7931] passed 6/12 esh-proc-test/pipeline-connection-type/last0 (0.056656 sec) [Detaching after vfork from child process 7932] passed 7/12 esh-proc-test/pipeline-connection-type/last1 (0.056970 sec) [Detaching after vfork from child process 7933] passed 8/12 esh-proc-test/pipeline-connection-type/last2 (0.056878 sec) [Detaching after vfork from child process 7934] [Detaching after vfork from child process 7935] passed 9/12 esh-proc-test/pipeline-connection-type/middle (0.060267 sec) [Detaching after vfork from child process 7936] [Detaching after vfork from child process 7937] passed 10/12 esh-proc-test/pipeline-connection-type/middle0 (0.081130 sec) [Detaching after vfork from child process 7938] [Detaching after vfork from child process 7939] Test esh-proc-test/pipeline-connection-type/middle1 aborted with non-local exit [Detaching after vfork from child process 7940] [Detaching after vfork from child process 7941] [Detaching after vfork from child process 7942] [Detaching after vfork from child process 7953] [Detaching after vfork from child process 7954] ABORTED 11/12 esh-proc-test/pipeline-connection-type/middle1 (0.008848 sec) at lisp/eshell/esh-proc-tests.el:116 Aborted: Ran 12 tests, 10 results as expected, 0 unexpected (2023-09-24 23:15:38+0200, 0.653765 sec) Error running tests backtrace() #f(compiled-function () #)() ert-run-tests-batch-and-exit((not (tag :unstable))) command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/eshell/esh-proc-tests.el" "--eval" "(ert-run-tests-batch-and-exit (quote (not (tag :unstable))))")) command-line() normal-top-level() [Thread 0x7ffff0543400 (LWP 7913) exited] [Inferior 1 (process 7913) exited with code 02] * 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))))' [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffee036700 (LWP 7969)] [Detaching after vfork from child process 7970] [Detaching after vfork from child process 7971] [Detaching after vfork from child process 7972] [Detaching after vfork from child process 7973] Running 12 tests (2023-09-24 23:15:39+0200, selector `(not (tag :unstable))') Loading em-alias... Loading em-banner... Loading em-basic... Loading em-cmpl... Loading em-extpipe... Loading em-glob... Loading em-hist... Loading em-ls... Loading em-pred... Loading em-prompt... Loading em-script... Loading em-term... Loading em-unix... [Detaching after vfork from child process 7974] [Detaching after vfork from child process 7975] passed 1/12 esh-proc-test/pipeline-connection-type/first (0.076930 sec) [Detaching after vfork from child process 7976] [Detaching after vfork from child process 7977] passed 2/12 esh-proc-test/pipeline-connection-type/first0 (0.057770 sec) [Detaching after vfork from child process 7978] [Detaching after vfork from child process 7979] passed 3/12 esh-proc-test/pipeline-connection-type/first1 (0.058679 sec) [Detaching after vfork from child process 7980] [Detaching after vfork from child process 7981] passed 4/12 esh-proc-test/pipeline-connection-type/first2 (0.058402 sec) [Detaching after vfork from child process 7982] passed 5/12 esh-proc-test/pipeline-connection-type/last (0.056096 sec) [Detaching after vfork from child process 7983] passed 6/12 esh-proc-test/pipeline-connection-type/last0 (0.056120 sec) [Detaching after vfork from child process 7984] passed 7/12 esh-proc-test/pipeline-connection-type/last1 (0.056147 sec) [Detaching after vfork from child process 7985] 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 #2 0x00005555557c1ef8 in send_process (proc=, buf=, len=, object=) at process.c:6670 #3 0x00005555557c2318 in Fprocess_send_string (process=, string=0x5555565862d4) at lisp.h:779 #4 0x00005555557a7fb6 in exec_byte_code (fun=, args_template=, nargs=, args=) at lisp.h:779 #5 0x0000555555760883 in Ffuncall (nargs=3, args=0x7fffee067160) at eval.c:3008 #6 0x0000555555760d69 in Fapply (nargs=4, args=0x7fffee067160) at eval.c:2632 #7 0x00005555557a7fb6 in exec_byte_code (fun=, args_template=, nargs=, args=) at lisp.h:779 #8 0x0000555555765ec7 in apply_lambda (fun=0x55555631d4dd, args=, count=...) at eval.c:3116 #9 0x0000555555764008 in eval_sub (form=) at eval.c:2601 #10 0x0000555555766e80 in Feval (form=0x7fffed39a1b3, lexical=) at eval.c:2375 #11 0x00005555557a7fb6 in exec_byte_code (fun=, args_template=, nargs=, args=) at lisp.h:779 #12 0x0000555555760883 in Ffuncall (nargs=1, args=0x7fffffffb5d0) at eval.c:3008 #13 0x0000555555764503 in eval_sub (form=) at lisp.h:779 #14 0x00005555557662e1 in Fprogn (body=) at eval.c:436 #15 Flet (args=0x7fffed389d23) at eval.c:1038 #16 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #17 0x0000555555766e80 in Feval (form=0x7fffed389d33, lexical=) at eval.c:2375 #18 0x00005555557a7fb6 in exec_byte_code (fun=, args_template=, nargs=, args=) at lisp.h:779 #19 0x0000555555760883 in Ffuncall (nargs=1, args=0x7fffffffb8b0) at eval.c:3008 #20 0x0000555555764503 in eval_sub (form=) at lisp.h:779 #21 0x00005555557662e1 in Fprogn (body=) at eval.c:436 #22 Flet (args=0x7fffed39a463) at eval.c:1038 #23 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #24 0x0000555555766e80 in Feval (form=0x7fffed39a473, lexical=) at eval.c:2375 #25 0x00005555557a7fb6 in exec_byte_code (fun=, args_template=, nargs=, args=) at lisp.h:779 #26 0x0000555555765ec7 in apply_lambda (fun=0x55555631aead, args=, count=...) at eval.c:3116 #27 0x0000555555764008 in eval_sub (form=) at eval.c:2601 #28 0x0000555555766c81 in internal_lisp_condition_case (var=0x1db700, bodyform=0x7fffed3999e3, handlers=) at eval.c:1440 #29 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #30 0x0000555555766e80 in Feval (form=0x7fffed398ba3, lexical=) at eval.c:2375 #31 0x00005555557a7fb6 in exec_byte_code (fun=, args_template=, nargs=, args=) at lisp.h:779 #32 0x0000555555760883 in Ffuncall (nargs=1, args=0x7fffffffbeb0) at eval.c:3008 #33 0x0000555555764503 in eval_sub (form=) at lisp.h:779 #34 0x00005555557662e1 in Fprogn (body=) at eval.c:436 #35 Flet (args=0x7fffed398fb3) at eval.c:1038 #36 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #37 0x0000555555766e80 in Feval (form=0x7fffed398fc3, lexical=) at eval.c:2375 #38 0x00005555557a7fb6 in exec_byte_code (fun=, args_template=, nargs=, args=) at lisp.h:779 #39 0x0000555555760883 in Ffuncall (nargs=1, args=0x7fffffffc180) at eval.c:3008 #40 0x0000555555764503 in eval_sub (form=) at lisp.h:779 #41 0x00005555557662e1 in Fprogn (body=) at eval.c:436 #42 Flet (args=0x7fffed398a73) at eval.c:1038 #43 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #44 0x0000555555766e80 in Feval (form=0x7fffed398a83, lexical=) at eval.c:2375 #45 0x00005555557a7fb6 in exec_byte_code (fun=, args_template=, nargs=, args=) at lisp.h:779 #46 0x0000555555760883 in Ffuncall (nargs=1, args=0x7fffffffc450) at eval.c:3008 #47 0x0000555555764503 in eval_sub (form=) at lisp.h:779 #48 0x00005555557662e1 in Fprogn (body=) at eval.c:436 #49 Flet (args=0x7fffed3985b3) at eval.c:1038 #50 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #51 0x0000555555766e80 in Feval (form=0x7fffed3985c3, lexical=) at eval.c:2375 #52 0x00005555557a7fb6 in exec_byte_code (fun=, args_template=, nargs=, args=) at lisp.h:779 #53 0x0000555555760883 in Ffuncall (nargs=1, args=0x7fffffffc730) at eval.c:3008 #54 0x0000555555764503 in eval_sub (form=) at lisp.h:779 #55 0x00005555557662e1 in Fprogn (body=) at eval.c:436 #56 Flet (args=0x7fffed3a7e73) at eval.c:1038 #57 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #58 0x0000555555766e80 in Feval (form=0x7fffed3a7e83, lexical=) at eval.c:2375 #59 0x00005555557a7fb6 in exec_byte_code (fun=, args_template=, nargs=, args=) at lisp.h:779 #60 0x0000555555765ec7 in apply_lambda (fun=0x555556361115, args=, count=...) at eval.c:3116 #61 0x0000555555764008 in eval_sub (form=) at eval.c:2601 #62 0x00005555557662e1 in Fprogn (body=) at eval.c:436 #63 Flet (args=0x7fffed55f013) at eval.c:1038 #64 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #65 0x0000555555764a21 in Fprogn (body=) at eval.c:436 #66 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #67 0x00005555557668b7 in Funwind_protect (args=0x7fffed55f813) at lisp.h:779 #68 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #69 0x0000555555766709 in Fprogn (body=) at eval.c:436 #70 FletX (args=0x7fffed55f963) at eval.c:970 #71 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #72 0x0000555555765901 in Fprogn (body=) at eval.c:436 #73 funcall_lambda (fun=0x7fffed55fa33, nargs=1, arg_vector=0x7fffffffcfa0) at eval.c:3246 #74 0x0000555555765ec7 in apply_lambda (fun=0x7fffed55fa43, args=, count=...) at eval.c:3116 #75 0x0000555555764008 in eval_sub (form=) at eval.c:2601 #76 0x00005555557644c4 in eval_sub (form=) at eval.c:2478 #77 0x00005555557662e1 in Fprogn (body=) at eval.c:436 #78 Flet (args=0x7fffed550f73) at eval.c:1038 #79 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #80 0x0000555555766c81 in internal_lisp_condition_case (var=0x1db700, bodyform=0x7fffed550f83, handlers=) at eval.c:1440 #81 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #82 0x000055555576653c in FletX (args=0x7fffed5522f3) at lisp.h:779 #83 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #84 0x00005555557662e1 in Fprogn (body=) at eval.c:436 #85 Flet (args=0x7fffed552323) at eval.c:1038 #86 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #87 0x0000555555765901 in Fprogn (body=) at eval.c:436 #88 funcall_lambda (fun=0x7fffed5523f3, nargs=2, arg_vector=0x7fffffffd700) at eval.c:3246 #89 0x0000555555765ec7 in apply_lambda (fun=0x7fffed552403, args=, count=...) at eval.c:3116 #90 0x0000555555764008 in eval_sub (form=) at eval.c:2601 #91 0x00005555557662e1 in Fprogn (body=) at eval.c:436 #92 Flet (args=0x7fffed54f113) at eval.c:1038 #93 0x00005555557646b0 in eval_sub (form=) at lisp.h:779 #94 0x0000555555765901 in Fprogn (body=) at eval.c:436 #95 funcall_lambda (fun=0x7fffed541f43, nargs=0, arg_vector=0x7fffee066270) at eval.c:3246 #96 0x00005555557a7d4e in exec_byte_code (fun=, args_template=, nargs=, args=) at bytecode.c:817 #97 0x0000555555765ec7 in apply_lambda (fun=0x5555560f81fd, args=, count=...) at eval.c:3116 #98 0x0000555555764008 in eval_sub (form=) at eval.c:2601 #99 0x0000555555766e80 in Feval (form=0x7fffed52ef63, lexical=) at eval.c:2375 #100 0x00007fffef012849 in F636f6d6d616e642d6c696e652d31_command_line_1_0 () at /home/jschmidt/work/emacs-master/src/../native-lisp/30.0.50-88254aaa/preloaded/startup-bbc6ea72-b64c9391.eln #101 0x0000555555760883 in Ffuncall (nargs=2, args=0x7fffffffdff0) at eval.c:3008 #102 0x00007fffef00a268 in F636f6d6d616e642d6c696e65_command_line_0 () at /home/jschmidt/work/emacs-master/src/../native-lisp/30.0.50-88254aaa/preloaded/startup-bbc6ea72-b64c9391.eln #103 0x0000555555760883 in Ffuncall (nargs=1, args=0x7fffffffe0c8) at eval.c:3008 #104 0x00007fffef005bdf in F6e6f726d616c2d746f702d6c6576656c_normal_top_level_0 () at /home/jschmidt/work/emacs-master/src/../native-lisp/30.0.50-88254aaa/preloaded/startup-bbc6ea72-b64c9391.eln #105 0x0000555555764969 in eval_sub (form=) at lisp.h:779 #106 0x0000555555766e80 in Feval (form=0x7fffefc999bb, lexical=) at eval.c:2375 #107 0x000055555575ef67 in internal_condition_case (bfun=bfun@entry=0x5555556d1c30 , handlers=handlers@entry=0x90, hfun=hfun@entry=0x5555556d9a50 ) at eval.c:1486 #108 0x00005555556d25c6 in top_level_1 (ignore=ignore@entry=0x0) at keyboard.c:1174 #109 0x000055555575eec1 in internal_catch (tag=tag@entry=0x107d0, func=func@entry=0x5555556d25a0 , arg=arg@entry=0x0) at eval.c:1209 #110 0x00005555556d1ba8 in command_loop () at lisp.h:1173 #111 0x00005555556d95e3 in recursive_edit_1 () at keyboard.c:744 #112 0x00005555556d9980 in Frecursive_edit () at keyboard.c:827 #113 0x00005555555a9de6 in main (argc=, argv=) at emacs.c:2625