Description of problem: We need to kill a processes named 'spmprotect.sh' and all the processes in its process group. `killall -g spmprotect.sh` this ends up with "spmprotect.sh: no process killed". Version-Release number of selected component (if applicable): psmisc-22.2-7 How reproducible: seldom, when the target process has a low pid. Additional info: The issue stems from unclean pgids table, and seems to be fixed by --- killall.c.orig 2010-12-29 18:10:16.000000000 +0200 +++ killall.c 2010-12-29 18:10:43.000000000 +0200 @@ -238,7 +238,7 @@ pgids = NULL; /* silence gcc */ else { - pgids = malloc (pids * sizeof (pid_t)); + pgids = calloc (pids, sizeof (pid_t)); if (!pgids) { perror ("malloc");
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
Created attachment 472237 [details] reproducer Patch looks fine and resolves bug correctly. Reproducer attached.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Due to an error in memory allocation, an attempt to kill a process group by using the "killall -g" command could fail. With this update, the memory allocation has been corrected, and the killall utility now works as expected.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0118.html