Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Dec 2000 00:43:34 +0000
From:      Brian Somers <brian@Awfulhak.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        Brian Somers <brian@Awfulhak.org>, Dag-Erling Smorgrav <des@ofug.org>, "David E. O'Brien" <obrien@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, brian@Awfulhak.org
Subject:   Re: cvs commit: src/etc crontab 
Message-ID:  <200012110043.eBB0hYV06366@hak.lan.Awfulhak.org>
In-Reply-To: Message from Robert Watson <rwatson@FreeBSD.org>  of "Sat, 09 Dec 2000 22:42:41 EST." <Pine.NEB.3.96L.1001209223834.82272B-100000@fledge.watson.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> On Sat, 9 Dec 2000, Brian Somers wrote:
> 
> > It makes things a bit un-orthogonal though.  Maybe something like 
> > this would be more appropriate:
> > 
> > 1 3 * * * root lockf /var/run/periodic periodic daily
> > 1 3 * * 6 root lockf /var/run/periodic periodic weekly
> > 1 3 1 * * root lockf /var/run/periodic periodic monthly
> 
> While this is really much cleaner and appealing to me, it runs into the
> usual file locking problem: since they're advisory, they're inter-user and
> enforced for root (!).  As such, any random process running as any random
> user can acquire the lock and stack up all your periodic scripts, DoSing
> you.  And it's hard to track down, too, since it's hard to figure out what
> processes own what locks.  This actually applies to a really large number
> of other related problems: for example, when locking is used to protect
> mailboxes, any user can deny service by acquiring locks on all mailboxes,
> etc.  Usually the solution is to only use locks on objects which are
> appropriately protected, unfortunately.

I chose /var/run because it's only writable by root.

> On a related note, this is also more susceptible to cascading failure, as
> it queues the work rather than canceling it if resources aren't available.

This is no worse than what's already there though.  I guess it would 
make sense to have a job run at 5:00 that checks the lock and moans 
if it still exists.... but I think that's a bit horrible.

> Robert N M Watson             FreeBSD Core Team, TrustedBSD Project
> robert@fledge.watson.org      NAI Labs, Safeport Network Services

-- 
Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012110043.eBB0hYV06366>