On 7/25/25 12:37 PM, Chakib Mouzaoui wrote:
Hello!

We sporadically hit a segfault across different kinds of hardware on Bash version 5.1.8(1)-release (x86_64-redhat-linux-gnu).

We found that run_sigchld_trap was run despite our bash script never explicitly setting a SIGCHLD trap. Indeed, the trap_list array is empty save for a trap set for EXIT at trap_list[0]. I am able to reproduce a similar segfault when manually setting catch_flag=1 and pending_traps[17]=1 in a gdb session. However, I cannot normally reproduce the bug, and can only wait for it to show up about once a month across thousands of servers that each run this script every few minutes. We're currently suspecting that this is not a case of memory corruption not just because we saw this across different hardware, but every time the script crashes, we get this same stack trace.

I wish it were a little easier to reproduce. That way I could look at it on
a current bash version.

As it is, there's not much I can do about it. I can tell you how to edit
the source to work around it, but that would probably void your support
agreement, and if you were doing that, why not use a newer version of bash
anyway?

Please keep me updated if you find an easier way to reproduce it.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to