Subject: bug#79055: esh-proc-test/kill-pipeline SIGPIPE failure (timing-related)

From: Paul Eggert <[email-masked]>
Date: Sat, 19 Jul 2025 15:25:14 -0700

I found this bug when testing GNU Emacs master (commit 
291cd2d3419c7be20200db3f0ee5936661ab79f2) on Ubuntu 25.04 x86-64. The 
bug smells like Bug#66186, which has been marked as fixed. Perhaps this 
is a new bug, or perhaps Bug#66186 is still active.

The bug is hard to reproduce. On an Intel Xeon with 6 hyperthreaded 
cores (so /proc/cpuinfo reports 12 processors), I found it when running 
this shell command:

for i in $(seq 100); do make -j12 check || break; done

The failure occurred in the shell loop's 33rd iteration. The top level 
output looked like this:

Running 26 tests (2025-07-19 14:53:29-0700, selector ‘(not (or (tag 
:expensive-test) (tag :unstable) (tag :nativecomp)))’)
    passed   1/26  esh-proc-test/exit-status/failure (0.102406 sec)
    passed   2/26  esh-proc-test/exit-status/success (0.103062 sec)
    passed   3/26  esh-proc-test/exit-status/with-stderr-pipe (0.103069 sec)
make[3]: *** [Makefile:185: lisp/eshell/esh-proc-tests.log] Error 141

Error 141 is Emacs dying due to SIGPIPE.

Evidently it's a timing-related bug. I could not reproduce the problem 
with the simpler command:

make check LOGFILES=lisp/eshell/esh-proc-tests.log

despite trying this 100 times.