Skip to content

Grading Checklist

  • Explains what a zombie process is: a process that has exited but its exit status has not been collected by its parent.
  • Identifies the parent process (PPID) of the zombies using ps -eo pid,ppid,stat,cmd | grep Z.
  • Explains that zombies cannot be killed with kill -9 because they are already dead.
  • Notes that the only way to clear zombies is for the parent to call wait() or for the parent to exit (zombies reparented to init/PID 1 which reaps them).
  • Checks /proc/PID/status for the parent process to verify PPID.
  • Suggests sending SIGCHLD to the parent process to prompt it to reap children.
  • Recommends restarting the parent process as the immediate fix.
  • Identifies the bug: the parent process does not handle SIGCHLD or call waitpid().
  • Mentions the PID exhaustion risk and how to check the limit.
  • Notes that zombie processes consume only a PID and a process table entry, not CPU or memory.
  • Recommends fixing the application code to properly reap child processes.
  • Suggests using prctl(PR_SET_CHILD_SUBREAPER) or a subprocess reaper if the application cannot be modified.