ksh segfaults in job_chksave after receiving SIGCHLD

Solution In Progress - Updated -

Environment

  • Red Hat Enterprise Linux (RHEL) 6.5
  • ksh-20120801-10.el6_5.5

Issue

ksh crashes in following part of code:

(gdb) bt
#0  job_chksave (pid=5066) at /usr/src/debug/ksh-20120801/src/cmd/ksh93/sh/jobs.c:1949
#1  0x0000000000429240 in job_reap (sig=17) at /usr/src/debug/ksh-20120801/src/cmd/ksh93/sh/jobs.c:428
#2  <signal handler called>
#3  job_subsave () at /usr/src/debug/ksh-20120801/src/cmd/ksh93/sh/jobs.c:1990
#4  0x00000000004533f6 in sh_subshell (shp=0x76cba0, t=0x7fd6050c9fe0, flags=4, comsub=3) at /usr/src/debug/ksh-20120801/src/cmd/ksh93/sh/subshell.c:520
...

Resolution

Update ksh to ksh-20120801-10.el6_5.8 released in Advisory RHBA-2014:1015-1 or newer.

Root Cause

Prior to this update, the compiler optimization dropped parts from the ksh job
locking mechanism from the binary code. As a consequence, ksh could terminate
unexpectedly with a segmentation fault after it received the SIGCHLD signal.
This update implements a fix to ensure the compiler does not drop parts of the
ksh mechanism and the crash no longer occurs.

  • Component
  • ksh

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments