Re: How to kill a respawning process

From: Laurenz Albe (invite_at_spam.to.invalid)
Date: 08/08/05


Date: 08 Aug 2005 07:05:53 GMT

Ashutosh <hiashutosh@gmail.com> wrote:
> In one of our p-series server, we had one "find" command scheduled in
> crontab.
> when the command got executed, it was killed with the help of kill -9.
> Now since then,(from 20th july) its in a hangning state & its consuming
> a lot of CPU time.
>
> ps -ef |grep find|grep -v grep
>
> root 229574 1 120 Jul 20 - 23938:32 find / -name
> f60*dump* -print
>
> Everytime we try to kill it comes back again...
> We will not be able to reboot our server....

If it is really consuming CPU time, the process is NOT hanging in kernel
space (unless there is a kernel bug). That would be good news.

The ps output you are showing is of a process started on July 20.
Was this taken before you started your kill attempts?

When you kill the process with 'kill -9' and you repeat the ps command,
does the 'resurrected' process have a different PID?

If yes, then search for the program that keeps restarting the 'find'.
Maybe it is cron or init.

If not, then the process is stuck in kernel space, and it is NOT consuming
lots of CPU time. In that case it will not be easy to get rid of the process.
You might have to resort to a reboot if you cannot fix the condition
that keeps the process hanging (broken NFS mount?).
The good news is that the process will not consume many resources, so
you can live with it.

Yours,
Laurenz Albe



Relevant Pages

  • Re: explorer uses 95-99% CPU time.
    ... the package wrote: ... >down explorer.exe, then go to 'file' in Task Manager, click on browse, ... >find the file and kill it. ... CPU time. ...
    (microsoft.public.windowsxp.general)
  • Re: limit run time
    ... contestants can submit solutions to our system. ... my system executes the exe files and gives them 2 seconds of cpu time to run. ... if a the TotalUserTime + TotalKernelTime of the job object exceeds 2s i kill the task. ...
    (microsoft.public.win32.programmer.kernel)
  • 2.6.24 regression: pan hanging unkilleable and un-straceable
    ... With Linux 2.6.24-rc8 I often have the problem that the pan usenet ... reader starts using 100% of CPU time after some time. ... kill -9 does not work, and strace just hangs when trying to attach to ...
    (Linux-Kernel)
  • Re: dd - process wont die
    ... you can't kill a process if its in kernel space..... ... some i/o.. ... if you dont want particular users to have access to the dd command, ...
    (comp.unix.aix)
  • Re: How to kill running process -- kill -9 has no effect
    ... >> but signal 9, SIGKILL, may not. ... If a process doesn't respond to KILL, ... > call so actually the kernel is executing on its behalf. ... > (since the cpu time used by the kernel on its behalf is credited ...
    (comp.os.linux.questions)