Contributed by Dengue on from the what-about-kill--9 dept.
"A week ago I had some sharity-light mounts die on my OpenBSD box, which then messed up my apache daemon (which I was trying to read the mounted drives from). I couldn't kill any of the processes and had to reboot the box after 65 days uptime (boo hoo i know). What I want to know is why could I not kill those processes, and how can I go about preventing something like that from happening again?"
(Comments are closed)
By panda () panda@NeOpSiPtAaM.fr on mailto:panda@NeOpSiPtAaM.fr
zombie processes.
A Unix C program can instantiate a copy of itself
with the fork(2) syscall, the spawned copy is called a child process. The child process can
pretty much have a life of it's own, but is bound
, eventually, to die. Once it's dead, the parent
has to issue a wait(2) syscall. If the wait(2) call is not issued, the child process is put in zombie state, waiting for it's parent to wait(2).
In your particular case, Apache and Sharity light acted in such a way that they will never
wait(2), leaving those unkillable processes.
As for the solution, well i don't think there's any way to kill zombie processes, since their existence is merely due to programming errors, you simply faced a bug.
By sangdrax () lucifer@vengeance.et.tudelft.nl on http://i.die.ms
I get this stuff with for instance 'cdparanoia' when trying to read a damaged CD and the cdrom-drive keeps failing. Cdparanoia then just 'eats' all kill -9's i send to it.
Any BSD guru like to comment on this? :-)
By ruben () ruben@su.cx on http://www.su.cx/~ruben/
By Anonymous Coward () on
i noticed a similar thing when a remote nfs mount crashes
By Chris () on http://www.dejection.org.uk/
/me awaits flames...
By Vincent Keßler () kessler at nscit dot com on mailto:kessler at nscit dot com
By Matt Van Mater () vanmatmm@jmu.edu on mailto:vanmatmm@jmu.edu
Someone mentioned that when you kill a process and some children are left behind they are adopted by init. If this is the case, then there is no way to kill the processes (because killing init is death to the system... right?) could i have sent init a HUP instead in this situation?
Someone else mentioned having the same problem with nfs shares. sharity-light actually puts the samba shares in a 'nfs wrapper' so the kernel thinks it's mounting a nfs share. This makes me suspicious that the problem might lie in NFS not working properly rather than in sharity-light as I originally suspected. I suppose if a process is blocking for I/O then there really isn't too much we can do to kill it since it won't accept an interrupt. It's the same idea as a cdrom mount dieing on you.