LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Kill a zombie (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/kill-a-zombie-4175729195/)

lattimro 09-22-2023 10:18 AM

Kill a zombie
 
1 Attachment(s)
Hi Folks,

I have one VM which failed to respond and left behind a zombie process. Restarted the VM and stopped properly but zombie persisted. As you can see from htop (attached) the zombie child is still is using 31.6% and MEM USAGE shows 3.7G/7.64G.
What else I did:
- followed lots of literature on this topic :)
- I killed all <username> processes:
Code:

pkill -U <username>
- I logout and login

Some sources claim zombies can't be kill but I would like to listen your opinions on this before I reboot the machine.

Code:

/home/brad# ps -ef|grep -i defunct
brad      101322      1 59 Sep21 ?        07:48:10 [VirtualBoxVM] <defunct>
root      808905  128336  0 10:51 pts/2    00:00:00 grep --color=auto -i defunct

and
Code:

kill -9 101322 101352

Thanks!

hazel 09-22-2023 11:15 AM

I don't think you can kill a zombie because the process itself doesn't exist any more. All that exists is the process's task structure within the kernel. In other words, the kernel has the hallucination that the process still exists because its parent hasn't reaped it.

If you try to send a kill signal to the process, nothing happens because there is no running program to receive the signal.

lattimro 09-22-2023 12:44 PM

Quote:

Originally Posted by hazel (Post 6455137)
I don't think you can kill a zombie because the process itself doesn't exist any more. All that exists is the process's task structure within the kernel. In other words, the kernel has the hallucination that the process still exists because its parent hasn't reaped it.

If you try to send a kill signal to the process, nothing happens because there is no running program to receive the signal.

absolutely right, how then the MEM is not released if there is no process running?

sundialsvcs 10-28-2023 09:04 PM

A "zombie" process is a child process whose parent has ceased to exist. Normally, this process is re-parented to "process #1" (the old init), which then killed it.


All times are GMT -5. The time now is 11:48 AM.