From owner-freebsd-fs@FreeBSD.ORG Mon Oct 4 19:11:03 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 440A9106566B for ; Mon, 4 Oct 2010 19:11:03 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 9757B8FC14 for ; Mon, 4 Oct 2010 19:10:51 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 7397445E8E; Mon, 4 Oct 2010 21:10:50 +0200 (CEST) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 3DE1C45E6F; Mon, 4 Oct 2010 21:10:45 +0200 (CEST) Date: Mon, 4 Oct 2010 21:10:18 +0200 From: Pawel Jakub Dawidek To: Mikolaj Golub Message-ID: <20101004191018.GI7322@garage.freebsd.pl> References: <86hbh3igw4.fsf@kopusha.home.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="va4/JQ6j8/8uipEp" Content-Disposition: inline In-Reply-To: <86hbh3igw4.fsf@kopusha.home.net> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-fs@freebsd.org Subject: Re: hastd: zombies after hooks X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 19:11:03 -0000 --va4/JQ6j8/8uipEp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 03, 2010 at 03:45:47PM +0300, Mikolaj Golub wrote: > Hi, >=20 > After recent changes hastd does not garbage collect finished hooks leaving > zombies and messages in log like below: >=20 > Oct 3 18:21:05 bolek hastd[5144]: Hook is running for 1330 seconds (pid= =3D5223, cmd=3D[/usr/bin/true connect storage]). >=20 > This is because wait3() in hook_check() is never called (we never call > hook_check(true)). Below is a patch that works for me.=20 We don't call it, because it is not needed anymore. I believe there is a problem, but I think it must be somewhere else. In the main process there are two kinds of processes we fork: worker=20 processes and hook processes. When SIGCHLD is received we call=20 child_exit(), which first check if this is worker process (corresponding resource is configured). If this is not worker process then it must be hook process, so it calls hook_check_one(). I'll try to reproduce it and will get back to you. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --va4/JQ6j8/8uipEp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkyqJpoACgkQForvXbEpPzTdEACdEvsCxDzuqa6jnK6LqwtgsR4v hb0AoKLtTYJwYzaB+zaUSoml/PkgDiSs =CwCp -----END PGP SIGNATURE----- --va4/JQ6j8/8uipEp--