From owner-freebsd-stable@FreeBSD.ORG Thu Jan 20 08:54:32 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2793216A4CE for ; Thu, 20 Jan 2005 08:54:32 +0000 (GMT) Received: from mail25.syd.optusnet.com.au (mail25.syd.optusnet.com.au [211.29.133.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5849843D48 for ; Thu, 20 Jan 2005 08:54:31 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j0K8sTOw012048 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 20 Jan 2005 19:54:30 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j0K8sTxP067276 for ; Thu, 20 Jan 2005 19:54:29 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id j0K8sTLS067275 for freebsd-stable@freebsd.org; Thu, 20 Jan 2005 19:54:29 +1100 (EST) (envelope-from pjeremy) Date: Thu, 20 Jan 2005 19:54:28 +1100 From: Peter Jeremy To: freebsd-stable@freebsd.org Message-ID: <20050120085428.GJ79646@cirb503493.alcatel.com.au> References: <200501191927.LAA07487@mina.soco.agilent.com> <20050120051426.3627.qmail@web54002.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050120051426.3627.qmail@web54002.mail.yahoo.com> User-Agent: Mutt/1.4.2i Subject: Re: User's cron job creates zombie process on 5.3 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2005 08:54:32 -0000 On Wed, 2005-Jan-19 21:14:26 -0800, spam maps wrote: >> ( /usr/bin/ssh -n -f ${tunnel} & ) > >Alas, no success. Still get the zombie >process. > >I actually wonder if this is an odd or buggy behaviour >of ssh, or is cron making a mistake here? The cron daemon (which will have a PPID of 1) forks a copy of itself to actually handle the cron job (I suspect this is the parent of the zombie that you are seeing). This child process runs "/bin/sh -c CRONJOB" (where CRONJOB is the line in your crontab) and I suspect this is the zombie you are seeing. My guess is that your ssh process is holding open file descriptors and the cron child process is waiting for these descriptors to close before wait()ing for the child. If this is true, then you should avoid it with something like: ( /usr/bin/ssh -n -f ${tunnel} >/dev/null 2>&1 & ) (or redirect to a suitable file). >Leaving a zombie process around, means there's a kind >of bug/mistake somewhere, right? Yes. But it's not necessarily a bug in FreeBSD :-). -- Peter Jeremy