[news.software.b] expire/rnews file locking

johnl@n3dmc.UU.NET (John Limpert) (03/23/89)

Why does a running expire process prevent rnews from running while
a running rnews process does not prevent expire from running?

I have noticed some problems on my system when expire is run by cron
at the same time rnews is processing incoming compressed batched news.
The contents of the active file get out of sync with the actual
min/max article numbers in some of the newsgroups.  This causes problems
with rn and rnews.  Rn will sometimes 'reset' a newsgroup, presumably
because the min/max article numbers in the active file are inconsistent
with what it finds in the .newsrc file.  Rnews will run into problems
storing new articles due to the max article number not being correct.
It has to keep trying to store the new article at an incremented
article number until it succeeds.

After looking at the sources I couldn't find anything in the locking
scheme that prevented expire from interfering with rnews.  Rnews
removes the lock from the active file as soon as it has determined that
expire is not running.  When it updates the active file, rnews locks
the sys file (LOCKF was defined).  This prevents multiple rnews
processes from interfering with each other, but it doesn't prevent
expire from running and rewriting the active file.

Is this the way the news software is supposed to work?  IMHO, rnews
shouldn't be updating the active file while expire is running.
Rnews should sleep until expire has finished creating the new active
file.  Am I missing something?

-- 
John A. Limpert
UUCP:	johnl@n3dmc.UUCP, johnl@n3dmc.UU.NET, uunet!n3dmc!johnl

henry@utzoo.uucp (Henry Spencer) (03/24/89)

In article <634@n3dmc.UU.NET> johnl@n3dmc.UU.NET (John Limpert) writes:
>Is this the way the news software is supposed to work?  IMHO, rnews
>shouldn't be updating the active file while expire is running.

The problem is that expire (especially old B News expire) can take a
long time, and your news system is locked up meanwhile.
-- 
Welcome to Mars!  Your         |     Henry Spencer at U of Toronto Zoology
passport and visa, comrade?    | uunet!attcan!utzoo!henry henry@zoo.toronto.edu