Trouble killing processes in SysV/AT

David F. Carlson dave at micropen
Sat Apr 30 04:42:01 AEST 1988


In article <3951 at killer.UUCP>, wnp at killer.UUCP (Wolf Paul) writes:
> Can anyone enlighten me as to what causes a process to become "immortal"
> in System VR2,  or Microport UNIX System V/AT, to be more specific?
> 
This "prblem" is not a Micrport issue at all: it is UNIX all the way.

> I have encountered this a number of times, where it would be impossible
> even for root to kill a process; if the parent process of the "immortal"
> process is killed, the child attaches itself to init, PID 1.
> What causes a process to refuse to die? I thought signal 9 (kill) could
> not be intercepted or ignored?

If you are technically minded and want a real answer read:
	"The Design of the UNIX Operating System" by Maurice Bach.

The quick answer is that any process that is in the kernel with a WCHAN
will not go back to user mode until that channel is awoken.  Who will
awaken it?  Two choices:  a device driver interrupt or a kernel timer
interrupt.  In all likelihood your ill-behaved process is waiting in
a poorly written device driver close().  No close should allow a process
to wait forever on a event that may not come.  Signals (kill -9) are
delivered when a process in kernel mode re-enters user mode.  However,
you process is waiting in kernel mode and won't get those signals til
its done: NEVER! (or until the long sought interrupt allows it's WCHAN
to go again.




-- 
David F. Carlson, Micropen, Inc.
...!{ames|harvard|rutgers|topaz|...}!rochester!ur-valhalla!micropen!dave

"The faster I go, the behinder I get." --Lewis Carroll



More information about the Comp.unix.microport mailing list