A rant on Zombie processes.
I am really tired of so many people who are in top levels of support not knowing jack squat about what a zombie process is. System administrators, DBAs, Sun support staff, and so many others are completely clueless about what a zombie process is.
A zombie process is a process that has terminated, but has not been "waited" on by its parent. wait() is the call that the parent process uses to collect status information about the child. When a process dies, exits, whatever, it has status information that can be collected. The operating system keeps it in the process table as a zombie process so it retains it's records, and it just waits there until it's parent calls wait().
So, what do you do about zombies? Well, they aren't really a problem unless you have a lot of them. In that case, any linear scan over the process table is going to start taking a lot of time. Usually, the reason for them is that the parent isn't set up to handle the SIGCHLD signal correctly (this is the signal sent to the parent when a child dies, so it knows it needs to call wait() when it has a chance). You can't kill a zombie process because it's already dead. However, you can kill off all of the zombie processes parents until it finds one that will wait() for it. Eventually, it will get to the init() process, and the init process doesn't do hardly anything except call wait() continually, so then the zombie will go away.
So many support people have told me the only way to get rid of zombies is to reboot. Ack! What are these, former Windows admins?
And then the other day, I called Fujitsu Global Services because we had a process that we could not kill that was taking up 25% of CPU time. They transferred me to Sun support, who said it was a zombie process. AHHHH!!!!!!!!!!! Zombies don't use CPU time, because they are not running. Eventually, I showed them where in the process table it said it was active, and they finally believed me. Why doesn't Sun support know what a zombie process is!!!???
Anyway, I have run into so many people who should know better that know jack squat about what a zombie process is, that it is really, really irritating me.