From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 15:36:47 2014 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DD32CAF; Tue, 1 Apr 2014 15:36:47 +0000 (UTC) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCF13644; Tue, 1 Apr 2014 15:36:46 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1WV0js-0001Im-NT; Tue, 01 Apr 2014 17:36:36 +0200 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: "Chris H" , "John Baldwin" Subject: Re: Process handlers, and zombies, or preap(1) References: <26dbb84bafaf0114cb75c3fbe060d412.authenticated@ultimatedns.net> <201404010941.33741.jhb@freebsd.org> <201404011110.31723.jhb@freebsd.org> Date: Tue, 01 Apr 2014 17:36:35 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201404011110.31723.jhb@freebsd.org> User-Agent: Opera Mail/12.16 (Win32) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.3.2 X-Scan-Signature: 4b95630a2805109a2fafe329e7ec4fd6 X-Mailman-Approved-At: Tue, 01 Apr 2014 16:24:34 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-hackers , freebsd-stable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2014 15:36:47 -0000 On Tue, 01 Apr 2014 17:10:31 +0200, John Baldwin wrote: > On Tuesday, April 01, 2014 10:28:02 am Chris H wrote: >> > On Monday, March 31, 2014 4:06:43 pm Chris H wrote: >> >> Greetings, >> >> I'm evaluating/experimenting on releng_9. The install, and now >> >> custom kernel have noting exotic, or anything out of the ordinary. >> >> top(1), and ps(1) indicate a (1) zombie, or process. On >> >> my releng_8 systems, when I occasionally encounter one of these, >> >> they soon disappear (are reaped) from the process table. While I >> >> have not investigated this far enough on both versions to determine >> >> whether the parent process reaped the child on the releng_8 systems, >> >> and the parent on releng_9 is simply an irresponsible parent, eg; >> >> a different parent. Before I do, I was wondering if there was any >> >> specific difference between the 2 versions that might cause better >> >> handling of such situations. While I recognize that resource >> >> starvation is HIGHLY unlikely, except by perhaps a rouge parent >> >> spawning multitudes of zombies. I thought it might be useful for >> >> "housekeeping" to 1) provide a process table housekeeper (zombie >> >> reaper), or 2) create a system utility/command like SunOS/OpenSolaris >> >> has; preap(1). >> >> >> >> http://www.freebsd.org/cgi/man.cgi?query=preap&manpath=SunOS+5.10 >> >> >> >> Thank you for your time, and consideration. >> > >> > Nothing is different with child processes in 9 vs 8. It is most >> > likely a misbehaving parent (or the parent is stuck or hung). >> >> Hello, John, and thank you for the reply. >> Right you are. Julian Elischer was kind enough to remind me that >> ps -alx >> would give me the information I needed to find the seemingly >> "lazy" parent process. But not before I had already (re)created >> a (Free)BSD version of preap(1), and cleared the entry from the >> proc table. >> However, it re-appeared again. So this time I traced it to it's >> parent, and now I can deal with it /properly/. It's an old port >> who's development was taken over by a Windows developer. So he >> doesn't have access to the *NIX-isms. I'll see if I can find >> the time to coordinate some effort(s) to clean it up, or branch >> a NIX version. >> >> Thank you /very/ much for addressing my original question. > > sysutils/pstree from ports can also be useful for figuring this > sort of thing out btw. > or 'ps axd'