From owner-freebsd-questions@FreeBSD.ORG Wed Jun 9 12:46:58 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 962431065673 for ; Wed, 9 Jun 2010 12:46:58 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 0CD0B8FC1E for ; Wed, 9 Jun 2010 12:46:57 +0000 (UTC) X-Spam-Status: No X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-0.2, required 5, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_50 0.80) X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-ID: o59CkLHV019710 Received: from kobe.laptop (ppp-94-64-214-134.home.otenet.gr [94.64.214.134]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-9.1) with ESMTP id o59CkLHV019710 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 9 Jun 2010 15:46:27 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.4/8.14.4) with ESMTP id o59CkLT8003529 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Jun 2010 15:46:21 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.4/8.14.4/Submit) id o59CkKeb003526; Wed, 9 Jun 2010 15:46:20 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Eitan Adler References: Date: Wed, 09 Jun 2010 15:46:20 +0300 In-Reply-To: (Eitan Adler's message of "Wed, 9 Jun 2010 14:08:58 +0300") Message-ID: <87bpbk9xwj.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: questions@freebsd.org Subject: Re: Too many defunct processes; kill -9 not working X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2010 12:46:58 -0000 On Wed, 9 Jun 2010 14:08:58 +0300, Eitan Adler wrote: > 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) That's the only way to kill zombies... You can't signal the zombie/defunct process itself, because it's gone already. But you can kill the process who spawned it.