when does kill -9 pid not work?

R.HUTCHISON hutch at lzaz.ATT.COM
Tue Aug 8 23:04:11 AEST 1989


>From article <9748 at alice.UUCP>, by debra at alice.UUCP (Paul De Bra):
> In article <20495 at adm.BRL.MIL> Leisner.Henr at xerox.com (Marty) writes:
[stuff omitted]
> when the process exits (due to the kill -9) it may get stuck in a device
> driver or something, so it enters a "zombie" state. This means that the
> process is busy exiting, but hasn't quite gone far enough to tell init that
> it's really gone.
[stuff omitted]
> Paul.
>>I give up...Was Jason in my machine?

Small correction.  If the process was hung in an exit...

Context:
	- System V, Release 0,2,3
Scenario:
	- process gets signal (any) or calls exit without closing all
	  files explicitly
	- exit called
	- exit ignores all (including #9) signals
	- exit closes all open files
	- exit changes process to ZOMBIE
	- exit deallocated all memory
	- ... and so on

If the close() routine for a logical device wants to contact 
the physical device and wait for a response, it should have a 
timer set, in case the device doesn't respond.  Sometimes the 
driver writer doesn't put in a timer (mistake).  The device 
never responds.  The close() never finishes.  The signal is 
already being ignored.  The process hasn't been changed
into a zombie yet.  Its memory hasn't been deallocated yet.  It's just
sitting there, wasting memory and slots in kernel tables.

Question to the original poster:  If you do a ps -l on the process,
what is its value under the PRI heading?  My guess is that there is a
bug in the device driver for that device and it might be hanging the
process with the priority high (low number) or with the "don't wake me
up when a signal comes in" flag (value 10 in ps listing under F
heading?).  The ps output would vary depending on your version of the OS.


Bob Hutchison
att!lzaz!hutch



More information about the Comp.unix.wizards mailing list