The process that can't be killed.

Sometimes in Linux there are processes that can't be killed. No matter what you try, no matter what interrupt you use the stubborn thing just won't die! Eventually the only way to kill that process is to reboot the computer. It doesn't always have to be that way.

How do they get into a state where they can't be terminated? If you run the "top" program you will see that those processes are in a "D" state. This means that they are sleeping and waiting for a signal from some hardware to wake up. This could be any sort of hardware. The most common ones are Floppy disks, CD/DVD ROM's and hard disks. They could also be tape drives, scanners, camera's, mice and keyboards. In fact any hardware can cause an "un-interruptable sleep" situation for a process.

This condition happens when the process sends a command to the hardware and waits for a resulting message to be sent back. If there is a fault in the hardware and it doesn't send that message back. This results in the process being left hanging and unable to be terminated.

All may not be lost and in some cases you can recover control without having to reboot the computer. Provided you know which hardware item is causing that problem you may be able to reset it and have it send a signal thus waking up the process enabling it to finish or be terminated.

The most common example is bad sectors on Floppy disks or CD/DVD ROM's. This can cause the hardware to go for a loopy loop while it tries to read the bad sector and fails all the while the process is patiently waiting for a result or error message. Now as a result will not be forthcoming the next best thing is to get the unit to send an error message.

With a Floppy disks just ejecting the disk and re-inserting it may be enough. The disk may be trashed though but then again it probably is already :) CDROM drives may be a little more difficult as linux tends to lock the drive. In those cases you might have to get a paperclip and use the mechanical opening device to eject the disk. That may be enough to knock some sense back into the computer.

Other hardware items may be easier as being external they can have their power cycled or be unplugged and plugged in again. If all else fails then there is no recourse but to reboot the computer. But hey! At least you tried :)

Payton-About once a month or so my XP Pro workstation locks up the CD-ROM when playing music through Media Player. I only have 2 options in this situtation - paperclip the drive or reboot the machine. Usually I reboot since the CD-ROM drive is disabled by Win XP, and by disabled I mean missing from the device list with no way to get it back. And no I cannot rip music onto the hard drive to stop this problem. It is against corporate policy.

We now return your CD-ROM to its previously scheduled program already in progress.

I can honestly say I've never experienced the situation you guys are describing from within Windows NT based systems (Win 9x, yes, lots of times). I have experienced it with a CD-ROM running from Ubuntu in VMWare.

Disclaimer: Blog contents express the viewpoints of their independent authors and
are not reviewed for correctness or accuracy by
Toolbox for IT. Any opinions, comments, solutions or other commentary
expressed by blog authors are not endorsed or recommended by
Toolbox for IT
or any vendor. If you feel a blog entry is inappropriate,
click here to notify
Toolbox for IT.