Article View: news.software.nntp
Article #29931Re: Best way to reset a cycbuff?
From: Jon Harley
Date: Mon, 20 Jul 1998 00:00
Date: Mon, 20 Jul 1998 00:00
74 lines
3948 bytes
3948 bytes
Niels van Sluis <nvs@admin.big-orange.net> writes:
>I've been working with INN-2.0 for a while now, but I wan't to clean up
>everything and start all over again, because I think my databases are
>corrupted. This is what happened:
...
>The problem that I'm now having is that newsarticles (not in all groups)
>are showing up in the wrong newsgroups. All messages that are sent to
>alt.test for example aren't readable for clients.
I got a similar problem and it turned out that my unified overview
files were out of sync. To explain:
When a newsreader (ie nnrpd) requests XOVER information to read a
group, it looks up the numbers from the overview index (files under
"overview") and for each article gets a hash key into the history.
file. The history file contains a token for that article, which
contains details of where it is in a cycbuf, and where its overview
line is in the unified overview (file/s under "uniover"). What happens
if you make a new history file during expire, but fail to make a new
unified overview file (or fail to completely overwrite the old one),
then the new history file will contain new pointers into uniover,
which don't point to the correct entries; usually these pointers
now point into the middle of an overview entry for a completely
different article.
>Now I wan't to cleanup everything (overview, spool, history, etc). The
>part that's worrying me most is that I have to cleanup my cycbuffs. If I
>have to make them again, it will again cost me a lot of time. My
>question is: is there a way to cleanup these file, without creating them
>again? Or is there an other way to reset your INN.
What I found sufficient was to run makehistory, to completely rebuild
the history, unified overview and overview indexes. This worked fine;
it turned out that all the articles in cycbufs were still there and
weren't at all corrupted themselves. I suggest you try that (though
beware, I found that makehistory *failed* to write any uniover data
when I used the -th flag; don't use it).
If makehistory doesn't get everything back to rights, and you decide
you want to reset your cycbufs, I found you can do this by zeroing
the first 3600 bytes of the cycbuf, such as with this program:
#include <stdio.h>
int main (int argc, char *argv[]) {
FILE *toblast;
int ix;
toblast = fopen (argv[1], "w");
for (ix = 0; ix < 3600; ix++)
fputc(0, toblast);
fclose(toblast);
}
You give this program the name of the cycbuf file, or block special
file if that's what you're using. innd should not be running when
you do this, and when you next start innd it should reinitialise
the cycbuf OK.
I haven't used this method since the first day I started running
INN2.0, so I don't know whether makehistory can still find articles
in a cycbuf which has been reset in this way.
/Jon
--
______________________________________________________________________________
Dr JW Harley J.W.Harley@warwick.ac.uk IT Services
Phone: 01203 524217 UNIX/Networking Consultant University of Warwick
See http://www.warwick.ac.uk/J.W.Harley/ for fax number, address and PGP key
Technical Details
Message-ID:
<6ov8gg$md$1@holly.csv.warwick.ac.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<35B2EFF7.73D8DD81@admin.big-orange.net>Show Full Headers
Complete Article Headers
Message-ID: <6ov8gg$md$1@holly.csv.warwick.ac.uk> Subject: Re: Best way to reset a cycbuff? Date: Mon, 20 Jul 1998 00:00:00 +0000 From: Jon.Harley@warwick.ac.uk (Jon Harley) References: <35B2EFF7.73D8DD81@admin.big-orange.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 373126039 X-Complaints-To: abuse@csv.warwick.ac.uk X-Trace: holly.csv.warwick.ac.uk 900932944 717 137.205.192.26 (20 Jul 1998 11:09:04 GMT) Organization: University of Warwick, UK NNTP-Posting-Date: 20 Jul 1998 11:09:04 GMT Newsgroups: news.software.nntp