Problems with periodic scripts in jails [Cron <operator@sosai>
bde at zeta.org.au
Wed Jun 2 15:32:13 GMT 2004
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.
More information about the freebsd-current