gnb@bby.oz (Gregory N. Bond) (11/30/89)
I just noticed an interesting thing... I was recreating our news by hand as our feed forgot about us for a few days. I had the news items in a stack of files, and was using rnews to input them. (In our system, rnews copies to in.coming and newsrun is kicked off every 20 mins by cron). The rnews eventually hung waiting for disk space. Ok, thought I, run doexpire to make some room. Half way through the doexipre, the rnews woke up (as the spool disk had emptied). That was OK. However, at 20 past, cron fired off newsrun which kicked off relaynews on the 6 or so batches waiting in in.coming. _While expire was running_. So now I think I have a corrupt history file, as the message-id from the last line in the log file appears in both history and history.o, but neither history.dir or history.pag. I got no mail from either newsrun or doexpire. Should not relaynews have waited until the expire was finished (according to my understanding of newslock()). I can verify they ran simultaneously (I was watching top(1) on the other window - a new relaynews for each batch, all the while expire was running.) Am I really hosed? What have I done wrong in the install? (This is Cnews, 13-Nov-1989, on a Sun-4 (actually, a Solbourne) running SunOs 4.0.1 and a bit). Greg. -- Gregory Bond, Burdett Buckeridge & Young Ltd, Melbourne, Australia Internet: gnb@melba.bby.oz.au non-MX: gnb%melba.bby.oz@uunet.uu.net Uucp: {uunet,pyramid,ubc-cs,ukc,mcvax,prlb2,nttlab...}!munnari!melba.bby.oz!gnb
henry@utzoo.uucp (Henry Spencer) (12/01/89)
In article <GNB.89Nov30133423@baby.bby.oz> gnb@bby.oz (Gregory N. Bond) writes: >... cron fired off newsrun which kicked off relaynews on the 6 or so >batches waiting in in.coming. _While expire was running_. So now I >think I have a corrupt history file... Relaynews running while expire is running is normal, believe it or not. The crucial observation is that relaynews only *appends* to the history file. When expire hits EOF, *then* it locks the news system (waiting, if necessary, until something else releases the lock), and tries to read more in case there was more. When it hits EOF the second time, that's definitely it. This lets relaynews run freely for most of the expire run, but still guarantees consistency. >line in the log file appears in both history and history.o, but >neither history.dir or history.pag... How are you looking it up in history.{dir,pag}? Those are *not* text files, and a grep won't find anything sensible in them. Try doing the lookup using "newshist" (see newsaux(8)); if it finds it, then the dbm files are correct. -- Mars can wait: we've barely | Henry Spencer at U of Toronto Zoology started exploring the Moon. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu