From owner-freebsd-questions@FreeBSD.ORG Tue May 10 17:18:15 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C907716A4CE for ; Tue, 10 May 2005 17:18:15 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E20F43D7B for ; Tue, 10 May 2005 17:18:15 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j4AHIEbd063992; Tue, 10 May 2005 12:18:14 -0500 (CDT) (envelope-from dan) Date: Tue, 10 May 2005 12:18:14 -0500 From: Dan Nelson To: Athanasios Douitsis Message-ID: <20050510171814.GC5894@dan.emsphone.com> References: <20050510164359.GL11613@noc.ntua.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050510164359.GL11613@noc.ntua.gr> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.8i cc: freebsd-questions@freebsd.org Subject: Re: cannot kill -9 a process X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2005 17:18:15 -0000 In the last episode (May 10), Athanasios Douitsis said: > Hello all, > > I have run into a peculiar problem. A process in one of my servers > has stopped working, but when I kill -9 the pid the process won't go away. > > ps axuw | grep nagios > nagios 36818 0.0 0.1 3964 2184 ?? TLs 30Mar05 46:14.69 /usr/local/bin/nagios -d /usr/local/etc/nagios/nagios.cfg T means the process has been stopped. "ps axlw" will also print the wchan column, which is what part of the kernel the process was waiting in before it was stopped, and the flags column, which may tell you what kind of stop it's in (see the ps manpage to decode the flags). On 5.3 I would occasionally see threaded processes hang when multiple threads tried to fork at once, but they usually freed themselves up after 20 seconds or so. If that's the case, upgrading to 5.4 will help. -- Dan Nelson dnelson@allantgroup.com