[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] Cannot allocate memory?



Matthias Andree wrote:
> 
> jom1@xxxxxxxxxx writes:
> 
> > I don't understand why locking is absolutely necessary.
> 
> To prevent concurrent file updates from trashing each other.
> 
> > Only "fetchnews" (and "texpire") modify the groupinfo file...
> > Also only one instance of fetchnews or texpire should be active at a given
> > time.
> 
> You never know unless you use lock files.
> 
> > I presume problems occur only when running external programs that also
> > modify the groupinfo file...
> 
> No, the original 1.9.19 (and previous version) lockfile creation does
> not work properly. Don't do that unless that external program uses the
> same locking scheme. Look at the lockfile_exists function (or just rip
> it out) of the PATCHED 1.9.19 version (the original 1.9.19 is broken).

Sorry but I don't agree with you.
I understand that the "lockfile_exists" 1.9.19 has a TOC-TOU race (time of
check - time of use), but this is not a real problem, because we need a task
locking, not a file locking.
Of course if you start in a cron job fetchnews and texpire at *exactly* the
same time, you may encounter some problems... but this is your
responsibility.
I am missing something else ?

P.S.
applyfilter also need the task locking for this task must not run
concurrently with fetchnews or texpire, but the groupinfo file should not be
modified: this is absolutely useless and also a waste of time.

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list