From owner-freebsd-current@FreeBSD.ORG Wed Jun 2 07:09:24 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 5893F16A4CE for ; Wed, 2 Jun 2004 07:09:24 -0700 (PDT) Received: from genius.tao.org.uk (genius.tao.org.uk [212.135.162.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECF0D43D45 for ; Wed, 2 Jun 2004 07:09:23 -0700 (PDT) (envelope-from joe@tao.org.uk) Received: by genius.tao.org.uk (Postfix, from userid 100) id 1C8144257; Wed, 2 Jun 2004 15:09:23 +0100 (BST) Date: Wed, 2 Jun 2004 15:09:23 +0100 From: Josef Karthauser To: Mark Murray , current@FreeBSD.ORG Message-ID: <20040602140923.GA27070@genius.tao.org.uk> Mail-Followup-To: Josef Karthauser , Mark Murray , current@FreeBSD.ORG References: <20040602134523.GA26835@genius.tao.org.uk> <200406021357.i52DvCIn002903@grimreaper.grondar.org> <20040602140148.GA27036@genius.tao.org.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline In-Reply-To: <20040602140148.GA27036@genius.tao.org.uk> User-Agent: Mutt/1.5.6i 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 14:09:24 -0000 --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 02, 2004 at 03:01:48PM +0100, Josef Karthauser wrote: > > > (y/n [n]) not overwritten > >=20 > > Not the answer you are looking for, but the entropy cronjob is an examp= le > > of the type of cronjob that IMVHO should not be run in jails. > >=20 >=20 > 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. >=20 Ok, I've found the cause of the problem. Cron is spawning more than one copy of the entropy script... I've got the same problem with the election script I run on the server: obleo# crontab -u root -l # Run the election process */2 * * * * ~joe/elections/cronjobs/doit obleo# grep doit /var/log/cron | tail Jun 2 14:00:00 obleo /usr/sbin/cron[90837]: (root) CMD (~joe/elections= /cronjobs/doit) Jun 2 14:00:01 obleo /usr/sbin/cron[90904]: (root) CMD (~joe/elections= /cronjobs/doit) Jun 2 14:02:00 obleo /usr/sbin/cron[91017]: (root) CMD (~joe/elections= /cronjobs/doit) Jun 2 14:02:00 obleo /usr/sbin/cron[91048]: (root) CMD (~joe/elections= /cronjobs/doit) Jun 2 14:04:00 obleo /usr/sbin/cron[91162]: (root) CMD (~joe/elections= /cronjobs/doit) Jun 2 14:04:00 obleo /usr/sbin/cron[91166]: (root) CMD (~joe/elections= /cronjobs/doit) Jun 2 14:06:00 obleo /usr/sbin/cron[91297]: (root) CMD (~joe/elections= /cronjobs/doit) Jun 2 14:06:00 obleo /usr/sbin/cron[91301]: (root) CMD (~joe/elections= /cronjobs/doit) Jun 2 14:08:00 obleo /usr/sbin/cron[91402]: (root) CMD (~joe/elections= /cronjobs/doit) Jun 2 14:08:00 obleo /usr/sbin/cron[91448]: (root) CMD (~joe/elections= /cronjobs/doit) obleo# ps -auxww | grep cron root 23586 0.0 0.0 1396 948 ?? IsJ Mon01PM 0:00.83 /usr/sb= in/cron There's only one running!!! Joe --=20 Josef Karthauser (joe@tao.org.uk) http://www.josef-k.net/ FreeBSD (cvs meister, admin and hacker) http://www.uk.FreeBSD.org/ Physics Particle Theory (student) http://www.pact.cpes.sussex.ac.uk/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D An eclectic mix of fact an= d theory. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --6c2NcOVqGQ03X4Wi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iEYEARECAAYFAkC935IACgkQXVIcjOaxUBaqgACcDgEHRNYlGzpCSxFwCUXhAxtE mJMAoJtZ+bCw6DMRQbtzvmSc5QKJuE+T =RU3K -----END PGP SIGNATURE----- --6c2NcOVqGQ03X4Wi--