From owner-freebsd-current@FreeBSD.ORG Wed Jun 2 08:32:13 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E79016A4CE; Wed, 2 Jun 2004 08:32:13 -0700 (PDT) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B9EA43D5A; Wed, 2 Jun 2004 08:32:12 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87])i52FWB4u018879; Thu, 3 Jun 2004 01:32:11 +1000 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i52FW8LS015978; Thu, 3 Jun 2004 01:32:09 +1000 Date: Thu, 3 Jun 2004 01:32:07 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Josef Karthauser In-Reply-To: <20040602140923.GA27070@genius.tao.org.uk> Message-ID: <20040603011806.E25331@gamplex.bde.org> References: <20040602134523.GA26835@genius.tao.org.uk> <20040602140148.GA27036@genius.tao.org.uk> <20040602140923.GA27070@genius.tao.org.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@FreeBSD.org cc: Mark Murray Subject: Re: Problems with periodic scripts in jails [Cron /usr/libexec/save-entropy] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jun 2004 15:32:13 -0000 On Wed, 2 Jun 2004, Josef Karthauser wrote: > On Wed, Jun 02, 2004 at 03:01:48PM +0100, Josef Karthauser wrote: > > > > (y/n [n]) not overwritten > > > > > > Not the answer you are looking for, but the entropy cronjob is an example > > > of the type of cronjob that IMVHO should not be run in jails. > > > > > > > Probably not :) The point is though that there is no reason why we > > should be getting permission errors here, save some kind of race > > condition. > > > > Ok, I've found the cause of the problem. Cron is spawning > more than one copy of the entropy script... Cron has been filling my mailbox with complaints about this for years. (I only partially filled the mailbox of the author of the entropy script with complaints about it 3 or 4 times :-). In my case, the multiple crons are caused by /usr being nfs-mounted and the server being down. cron forks OK, but each copy blocks waiting for something in /usr. When the server comes back up, a thundering herd of entropy scripts run and clobber each others' rotation of the entropy files. Cron normally runs the entropy script every 11 minutes, so the herd grows quickly. The herd (or perhaps other herds) also exhausts pipe kva on machines with small amounts of RAM (64M) while waiting. Bruce