Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jun 2010 12:24:55 -0500 (CDT)
From:      Robert Bonomi <bonomi@mail.r-bonomi.com>
To:        lists@eitanadler.com, questions@freebsd.org
Subject:   Re: Too many defunct processes; kill -9 not working
Message-ID:  <201006101724.o5AHOtuT009189@mail.r-bonomi.com>

next in thread | raw e-mail | index | archive | help
> From owner-freebsd-questions@freebsd.org  Wed Jun  9 06:09:36 2010
> From: Eitan Adler <lists@eitanadler.com>
> Date: Wed, 9 Jun 2010 14:08:58 +0300
> To: questions@freebsd.org
> Cc: 
> Subject: Too many defunct processes; kill -9 not working
>
> Lately I've been getting a considerable number of defunct processes. I
> do not know of any major event that changed my computer (ie it is not
> related to an ports update or a freeBSD upgrade).
>
> This is often caused by me killing the process using kill -15 or kill
> -3 or kill -9.
>
> What can I do to determine why processes are not getting killed by kill -9?
>
> % ps -o ppid -o comm|grep defunct|cut -d ' ' -f 1 |xargs kill -9
> typically gets rid of them (by killing their parent)

A 'defunct' process _has_ been killed.  What you see is the 'remains' of 
the dead process,  because the parent process has not yet 'reaped' the 
exit status of the dead child.  

All the resources of the child have been released, _except_ for the job-
table slot entry.  THAT is needed because that is where the child's exit
status is kept.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006101724.o5AHOtuT009189>