A tar process that won't die!
Mitch Patenaude
mrp at sonic.net
Thu Apr 4 10:20:20 PST 2002
Assuming that the problem is something simple like you don't have
permission to kill the process, then the problem is that the process
isn't in a state where it "CAN'T" die.
Processes in Unix (and Linux) can be running in one of two modes.
User-mode is where most of your code runs, and is interuptable, and can
be killed. But a process can also run in kernel mode. This usually
happens when you're interacting with hardware, or you've called a system
call (open(2), write(2), read(2), fork(2), etc.) which needs to work on
stuff inside the kernel. While in kernel mode, a process can't be
killed, because it would compromise system integrity.
So, if tar can't be killed, it's likely that it's running in kernel
mode, and given the nature of tar, it's probably stuck in an I/O call.
As soon as it returns from that call, it will die, but that might be a
while, maybe never if there is a problem with the driver.
All this doesn't point directly to an answer, but it might give you
someplace to look. If it were merely writing a very long buffer using
write(2), then it might eventually finish. If however, the io call is
blocked because of some external factor, say a zip disk which has been
removed, and the driver is waiting for the drive to signal ready, or
something like that, then maybe you can resolve it by figuring out what
the process is hung up on.
Or... just reboot.. and that will solve the problem. :-)
-- Mitch
More information about the talk
mailing list