From owner-freebsd-ports@FreeBSD.ORG Mon Oct 20 08:31:19 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA6A03DE; Mon, 20 Oct 2014 08:31:19 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EFFAE8C; Mon, 20 Oct 2014 08:31:19 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s9K8VD13075208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Oct 2014 11:31:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s9K8VD13075208 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s9K8VDJv075207; Mon, 20 Oct 2014 11:31:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 20 Oct 2014 11:31:13 +0300 From: Konstantin Belousov To: Jim Pazarena Subject: Re: at - atrun utility bug on 10.0 Message-ID: <20141020083113.GL2153@kib.kiev.ua> References: <294ded22fe13975898c8d5e4b1a79a01@paz.bz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <294ded22fe13975898c8d5e4b1a79a01@paz.bz> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: current@freebsd.org, freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2014 08:31:20 -0000 On Sun, Oct 19, 2014 at 10:53:35AM -0700, Jim Pazarena wrote: > I find that while a job is running via the at facility, that is, > atrun has executed it, every subsequent execution of atrun (via > cron) STAYS running while the original program (executed by atrun) > is still active. > > Generally, according to the docs, atrun is executed every 5 minutes > */5 * * * * within /etc/crontab > I always modify this to * * * * * for more prompt at execution. > > I have jobs submitted via 'at' which tend to run for several hours > sometimes even all day. > If I do a 'ps wwax' I could see dozens, hundreds, even thousands > of "atrun" running. > When the original job completes all the "atrun"s disappear. > I noticed this on 10.0, where on 9.1 it simply does not happen. > > It is my feeling that the atrun on 10.0 is either being held up by > a lock fyl, an flock, or something else which is blocking its > normal termination when there is an empty queue, or rather when > there is an item in the queue which is already being tended to > by another process. > > I would think that the general */5 granularity of atrun, along with > most jobs NOT running for multiple hours tends to obfuscate this > (what I think is a) bug. And most people looking at an wwax would > skip past it without giving it any thought. > > If anyone could confirm that I am not going insane, I would file a > bug report thru normal channels. Of course, I may be going insane > regardless of THIS email :-) I doubt that port people can help you. What version of FreeBSD do you run, exactly ? It is 10.0 or stable/10 ? It seems that your observations are sound, and your trouble is caused by HEAD r251625. OTOH, it seems that HEAD r264617, merged to stable/10 as r265368, fixed something which is described very similar to the bug you hit.