Zombie process using CPU

Andy Whitcroft apw at canonical.com
Tue Apr 20 11:00:37 UTC 2010


On Tue, Apr 20, 2010 at 07:06:28PM +0900, John Tapsell wrote:
> On 20 April 2010 18:47, Andy Whitcroft <apw at canonical.com> wrote:
> > On Tue, Apr 20, 2010 at 01:45:27PM +0900, John Tapsell wrote:
> >> Hi,
> >>
> >>   After a program (vuze) crashed I ended up in the situation of having
> >> a process, java, using 100% CPU of a core while also being a zombie.
> >>
> >>   Looking in /proc/<pid>/task  I saw two pids - the main task and a
> >> subtask.  The main task (cat /proc/<pid>/task/<pid>/status ) was
> >> indeed a zombie, but the subtask was still running and using CPU.
> >>
> >>   I could not find any way to kill this process. kill -9  on the <pid>
> >>  and on the pid on the subtask did nothing.  In the end I had to
> >> reboot.
> >>
> >>   is this situation supposed to be possible?  How do I kill a subtask?
> >
> > A zombie should indeed be nothing more than a shell.  I am not sure
> > there is even anything to run once a process hits Z state.  It is more
> > likely that the accounting is wrong than it was actually consuming the
> > CPU claimed.  Cirtainly it is not something I have experienced here.
> 
> The problem is that its _subtask_ is running and using CPU.
> 
> Specifically:
> 
> $ cat /proc/5728/status  | grep State
> State:  Z (zombie)
> 
> $ ls /proc/5728/task/
> 5728  5810
> 
> $ kill -9 5810
> $ cat /proc/5728/task/5810/status | grep State
> State:  R (running)
> 
> So this process '5810' is running despite the kill -9.

That looks stuck.  If its system time I'd guess a kernel bug.  From IRC
I see this is actually a 2.6.33 mainline kernel, so I'd be interested to
know if you can reproduce this on our release kernels.

To see what its doing, you will likely have to try either stracing it or
use the running process stack dump option off the sysrq menu.

-apw




More information about the kernel-team mailing list