[comp.unix.questions] "Unkillable" processes

oli@odbffm.incom.de (Oliver Boehmer) (04/20/91)

Hi!
It sometimes happens on my SCO-Unix 3.2.0, that I can't kill a certain
process, especially, if it's something like that:
   root  14363     1  0 12:16:02  01       0:34 tar cvfbk /dev/rct 20 60000 . 
A kill -9 xxx only has the effect, that the PPID changes to init, and after
this any kill -9 is ignored.
Why? How can I get rid of these processes w/o shutting down the system?
Hope, somebody can help me, oli
-- 
Oliver Boehmer, Frankfurt, Germany           oli@odbffm.incom.de
+49-69-331461 (voice) +49-60-308265 (1200/2400)
If God is perfect, why did He create discontinuous functions?

jik@athena.mit.edu (Jonathan I. Kamens) (04/22/91)

In article <1991Apr20.145633.5639@odbffm.incom.de> oli@odbffm.incom.de (Oliver Boehmer) writes:
   A kill -9 xxx only has the effect, that the PPID changes to init, and after
   this any kill -9 is ignored.

The problem is that the process is hung inside a device driver inside
the kernel, ignoring signals.  This usually indicates a somewhat badly
written device driver -- the author of the device driver decided that
some condition was urgent enough and would go by quickly enough that
the device driver could hang the process while waiting for it to
complete, and the author was wrong. :-)

   Why? How can I get rid of these processes w/o shutting down the system?

Well, check to see if the device (i.e. the hardware device -- tape
drive or whatever) the process is accessing is offline or something --
that may be what the device driver is waiting on.  If it isn't, try
taking it offline and putting it back online :-).

If that doesn't work, then you can adb the running kernel (if you have
adb) and fiddle with the process to get the device driver to
relinquish its hold on the process.  Unless you are very good at
mucking with running kernels, this is probably a bad idea.

If fiddling with the device doesn't work, and you can't/won't fiddle
with the kernel, then rebooting is usually your only alternative.

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710

ralfi@pemcom.pem-stuttgart.de (Ralf U. Holighaus) (04/22/91)

oli@odbffm.incom.de (Oliver Boehmer) writes:

>   root  14363     1  0 12:16:02  01       0:34 tar cvfbk /dev/rct 20 60000 . 
>A kill -9 xxx only has the effect, that the PPID changes to init, and after
>this any kill -9 is ignored.

Processes that hang while trying to access any device hang in the kernel and
therefore cannot be killed. In this case, not the tar command is hanging, but
the device /dev/rct makes problems.

Ansonsten gerne EMail an mich

Ralf.
-- 
  PEM Programmentwicklungsgesellschaft    |         Ralf U. Holighaus
        fuer Microcomputer mbH            |         Technical Support
PO-Box 810165 D-7000 Stuttgart 80 Germany |     holighaus@PEM-Stuttgart.de
VOICE: x49-711-713045 FAX: x49-711-713047 |       ..!unido!pemcom!ralfi 

tlas7%mmc.darmstadt-emh1.army.mil@darmstadt-emh1.army.mil ( LASSO 32D AADCOM MMC) (04/26/91)

Have you tried using fuser -ku /dev/port.  This always works for me if kill -9
doesn't work.