Platform9 Generic
Latest
Frequently Asked Questions
How To
Solution
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
How To Clean Zombie Processes
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
When a program or process starts another process, the original is referred to as the parent process and the new process is called the child process. When a child process has finished its task, it dies. The parent process is notified of its child's death and the child's information is removed from the system.
But on some occasions, a child process dies and the parent process doesn't stop to collect the information. When that happens, the child process itself is removed from the system, but a marker or death certificate is left behind, waiting to be collected. These uncollected death certificates are referred to as zombie processes.
Environment
- Platform9 Managed OpenStack - All Versions
- Platform9 Managed Kubernetes - All Versions
Procedure
- If a zombie process exists on the system, we need to identify which is its parent process. The output will show you zombie processes on the system with the ID number of their parent in the second column.
xxxxxxxxxxpf9@host $ ps axo stat,ppid,pid,cmd | grep ^ZZl 78 131611 [kubelet] <defunct>Z 189686 436454 [sudo] <defunct>Zl 78 436456 [kubelet] <defunct>- It is then possible to remind the parent that they have zombie children still running by sending them a signal. The parent process ID is 78, in this case. To remind the parent about the process and to collect its child's death certificate:
xxxxxxxxxx# kill -s SIGCHLD 78- However, if the parent refuses to handle the signal and collect the child's data, then there are two possibilities left, one is leaving the zombie in the system or killing the parent process. When a parent process dies, any children it has been turned over back to the init service. The init service regularly checks the status of its children and collects any death certificates, removing the zombies from the system. To kill the parent process:
xxxxxxxxxx# kill PPIDNote: Never kill the init process or process having PID 1 .
- If the parent is stubborn and refuses to go quietly, it is possible to force the issue. To force kill of the parent process:
xxxxxxxxxx# kill -9 PPID- At that point, the parent process will be removed from the system, its children (including any zombies) are given to init and the zombies will be removed.
Additional Information
VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message