What are the defunct or zombie child process associated with a parent client process?
In most cases Defunct (or Zombie) processes are expected and are considered normal by the Operating System.
When a child process finishes its assigned task it usually holds a return code for the parent process and remains in a defunct state. While in this state it does not take any CPU time, only a fragment of memory to hold the return code for the parent process until it is ready to harvest the return code from the child process.
Example: Defunct Child Process
$ psgrep defunct
UID PID PPID C STIME TTY TIME CMD
auser 26280092 61276522 0 0:00 <defunct>
$ psgrep 61276522
UID PID PPID C STIME TTY TIME CMD
auser 26280092 61276522 0 0:00 <defunct>
auser 61276522 5046636 0 08:07:23 pts/453 0:79 /dlc/bin/_progres /db/dbname -ld dbname -p ...
- PID 26280092 is defunct, is not taking any CPU time and the output does not show how long the this process has been defunct
- The defunct process has a parent PID 61276522 which initiated at 08:07:23
- Based on this output alone we cannot determine how long the child process was defunct since it does not show a STIME for child process
As a defunct process is no longer running, it does not use any system resources but it holds a slot in the system's process table. This counts against the total number of processes the system can allow. A large numbers of zombies can therefore potentially become a problem with expected consequences such as:
- A large number of defunct processes continuously created and not removed by their parent process, may create a CPU bottleneck in the operating system when they are removed from the system's process table.
- Since a defunct process still takes up a slot in the system process table, too many zombies will become a problem as the number of slots available in the process table are limited. When the size of the process table reaches the maximum limit, no new processes can be created anywhere on the entire the system. Similarly, the number of processes for a particular user may exceed the maximum number of processes allowed per user, which means no new processes can be created for that user.
For further discussion, please refer to the IBM Article, attached for your convenience.
In OpenEdge environments this situation can arise when the parent process:
Does not respond to closing the forked child. For example:
MSAgents accumulate defunct processes:
ASBMAN -k or WBTMAN -k may leave orphan agents as will the Broker crashing or port-scanning:
A remote database server crashes leaving network clients connected: