Re: Can't shutdown processes



On Friday 14 December 2001 05:27, Jeffrey Cobb wrote:
> I noticed when I shutdown Linux there are a lot of processes that FAIL to
> stop.  I'm thinking this may be due to a crash I had a while ago.   I'm
> assuming there are files linked with these "ghost" processes.  How do I go
> about finding these and removing them.  I've cured just enough of them to
> get gnome and KDE running again but I don't know where to find the rest of
> these.

Files cannot be 'linked to' processes which wasn't shutdown properly but dead 
anyway (I presume you forcibly rebooted your box (big red button)).

'Bad' processes fall into three categories:

1. Processes not dying on killall5 -15 (TERM)
   Some of them are ok (kernel threads), but well-behaving user programs
   should die. But they can block it.
2. Processes not dying on killall5 -9 (KILL)
   Only init and some kernel threads (rpciod comes to mind) may ignore it.
   If some proggy ignores it, it is stuck in kernel call (usually 'D' state
   in top) with no return. Kernel bug or misdesign.
3. Zombies (Z state in top). They don't really exist, just wasn't 'waited for'
   (return status isn't collected from them). May be slight kernel bug
   (it should reparent processes to init but didn't) or init bug.

Do this if system is refusing to shutdown cleanly

# cd /

# killall5 -15 <-- relatively safe
(wait 3 sec)
# killall5 -9 <-- apps may lose data here 
(wait 3 sec)
(repeat these killall5s several times)

# sync
# umount -a -r -f
# sync
(wait 3 sec for disk cache writeout)
(Now hit red button)

--
vda




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]