🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
11 messages
11 total messages Started by pbs Wed, 24 Mar 2004 04:39
INN 2.3.4 article retrieval inconsistencies
#68773
Author: pbs
Date: Wed, 24 Mar 2004 04:39
53 lines
3153 bytes
I have had a problem with OOPS in a Linux kernel 2.4.24 which
pulls down an INN 2.3.4 server very suddenly.

When the system comes back up there are often problems which
indicates corruption in the overview directory so I
follow these steps as userid news to fix it:
   su root -c  /etc/init.d/innd stop
   rm -fr $HOME/overview/*
   makehistory -O -x -F
   su root -c "/etc/init.d/innd start"
   ctlinnd renumber ""
   makehistory -b -f history.n -I -O

However once the system is up and running there still seem to be problems 
with some articles accessed through the nntp socket connection. These 
seem to be some of articles which were downloaded in the 24 hours before 
the crash. I use suck to aquire the articles from my ISP and post them 
locally using rpost.

First for some information accessed throught command line by user news:
   grephistory pan.2004.03.22.20.04.57.686314@uk.me.buzzard
   @05000000007C0000537F0000000000000000@

   sm @05000000007C0000537F0000000000000000@ | grep -i ^Mess
   Message-ID: <pan.2004.03.22.20.04.57.686314@uk.me.buzzard>

   sm -i @05000000007C0000537F0000000000000000@
   uk/comp/os/linux: 21375

   grep uk.comp.os.linux /var/lib/news/active
   uk.comp.os.linux 0000021417 0000020765 y

Now to telnet to the nntp socket connection:
   telent newsserver nntp
   ...

   group uk.comp.os.linux
   211 596 20765 21417 uk.comp.os.linux

   article  21375
   423 Bad article number

   article <pan.2004.03.22.20.04.57.686314@uk.me.buzzard>
   220 0 <pan.2004.03.22.20.04.57.686314@uk.me.buzzard> article
   [snip] rest of article.

There are no logged error messages on the server when the "article 21375"
request is made.

Could someone please tell me what I need to fix so that this inconsitency 
goes away?

Re: INN article retrieval inconsistencies
#68829
Author: pbs
Date: Mon, 29 Mar 2004 01:05
65 lines
3789 bytes
pbs wrote:
> I have had a problem with OOPS in a Linux kernel 2.4.24 which
> pulls down an INN 2.3.4 server very suddenly.
> 
> When the system comes back up there are often problems which
> indicates corruption in the overview directory so I
> follow these steps as userid news to fix it:
>   su root -c  /etc/init.d/innd stop
>   rm -fr $HOME/overview/*
>   makehistory -O -x -F
>   su root -c "/etc/init.d/innd start"
>   ctlinnd renumber ""
>   makehistory -b -f history.n -I -O
> 
> However once the system is up and running there still seem to be 
> problems with some articles accessed through the nntp socket connection. 
> These seem to be some of articles which were downloaded in the 24 hours 
> before the crash. I use suck to aquire the articles from my ISP and post 
> them locally using rpost.
> 
> First for some information accessed throught command line by user news:
>   grephistory pan.2004.03.22.20.04.57.686314@uk.me.buzzard
>   @05000000007C0000537F0000000000000000@
> 
>   sm @05000000007C0000537F0000000000000000@ | grep -i ^Mess
>   Message-ID: <pan.2004.03.22.20.04.57.686314@uk.me.buzzard>
> 
>   sm -i @05000000007C0000537F0000000000000000@
>   uk/comp/os/linux: 21375
> 
>   grep uk.comp.os.linux /var/lib/news/active
>   uk.comp.os.linux 0000021417 0000020765 y
> 
> Now to telnet to the nntp socket connection:
>   telent newsserver nntp
>   ...
> 
>   group uk.comp.os.linux
>   211 596 20765 21417 uk.comp.os.linux
> 
>   article  21375
>   423 Bad article number
> 
>   article <pan.2004.03.22.20.04.57.686314@uk.me.buzzard>
>   220 0 <pan.2004.03.22.20.04.57.686314@uk.me.buzzard> article
>   [snip] rest of article.
> 
> There are no logged error messages on the server when the "article 21375"
> request is made.
> 
> Could someone please tell me what I need to fix so that this 
> inconsitency goes away?
> 

The problem seems to affect articles which were download between the 
last time the cron script news.daily  was run and the crash. I would 
guess it is caused by inconsistencies between the overview and the 
history database.

How can I tell which method for the overview storage inn is using?

Does anyone know what the difference in the access algorithm is between 
requesting an article by number eg "article  21375" and requesting it by 
message id eg "article <pan.2004.03.22.20.04.57.686314@uk.me.buzzard>"?
Re: INN article retrieval inconsistencies
#68830
Author: Jeffrey M. Vinocur
Date: Mon, 29 Mar 2004 02:34
45 lines
2507 bytes
In article <c47snt$540$1@squay.lomarline.freeserve.co.uk>,
pbs  <pnews@lomarline.freeserve.co.uk> wrote:
>pbs wrote:
>>
>>   su root -c  /etc/init.d/innd stop
>>   rm -fr $HOME/overview/*
>>   makehistory -O -x -F
>>   su root -c "/etc/init.d/innd start"
>>   ctlinnd renumber ""
>>   makehistory -b -f history.n -I -O

This doesn't seem like exactly the right recipe to me.  Are you
rebuilding the second time while INN is running?  And did you
ever rename the history.n files to remove the .n?


>The problem seems to affect articles which were download between the 
>last time the cron script news.daily  was run and the crash. I would 
>guess it is caused by inconsistencies between the overview and the 
>history database.

Seems reasonable.  If you can afford to take the server down for
a full rebuild, just rebuild history and overview both at once,
and be sure to do makedbz as well if necessary (some versions of
makehistory automatically generate new .dir, .hash, and .index
files to go along with the new history, and some require you to
run makedbz yourself).


>How can I tell which method for the overview storage inn is using?

"ovmethod" in inn.conf.


>Does anyone know what the difference in the access algorithm is between 
>requesting an article by number eg "article  21375" and requesting it by 
>message id eg "article <pan.2004.03.22.20.04.57.686314@uk.me.buzzard>"?

I should, but don't wa


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: INN article retrieval inconsistencies
#68831
Author: Jeffrey M. Vinocur
Date: Mon, 29 Mar 2004 02:37
25 lines
1833 bytes
In article <c4820a$6vk$1@puck.litech.org>,
Jeffrey M. Vinocur <jeff@litech.org> wrote:
>In article <c47snt$540$1@squay.lomarline.freeserve.co.uk>,
>pbs  <pnews@lomarline.freeserve.co.uk> wrote:
>
>>Does anyone know what the difference in the access algorithm is between 
>>requesting an article by number eg "article  21375" and requesting it by 
>>message id eg "article <pan.2004.03.22.20.04.57.686314@uk.me.buzzard>"?
>
>I should, but don't wa

Whoops!

...don't want to mislead you if I've gotten the details mixed up.

If you really want to figure out the intricacies of the behavior
you're seeing, try checking in the overview database (assuming
you're using tradindexed, where that can easily be done).



-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: INN article retrieval inconsistencies
#68873
Author: pbs
Date: Tue, 30 Mar 2004 21:17
62 lines
3700 bytes
Jeffrey M. Vinocur wrote:
> In article <c47snt$540$1@squay.lomarline.freeserve.co.uk>,
> pbs  <pnews@lomarline.freeserve.co.uk> wrote:
> 
>>pbs wrote:
>>
>>>  su root -c  /etc/init.d/innd stop
>>>  rm -fr $HOME/overview/*
>>>  makehistory -O -x -F
>>>  su root -c "/etc/init.d/innd start"
>>>  ctlinnd renumber ""
>>>  makehistory -b -f history.n -I -O
> 
> 
> This doesn't seem like exactly the right recipe to me.  Are you
> rebuilding the second time while INN is running?  And did you

Yes. But no one is accessing the system.

> ever rename the history.n files to remove the .n?

Whoops  no.
I had tacked this on the end of my script to try to fix the problem of 
none access via number, but it seems that it does not do anything to 
inn. I've now re-written the script to do a full rebuild.

With the initial script, I am very much monkey sees monkey does I took 
the first part of this script from
INN 2.x FAQ -- 4.4. tradspool: could not open ... File exists
	makehistory -O -x -F

(and a couple of archived usenet postings which advised the same thing)
But it seems that in my case anyway although it fixed the "File exists" 
problem it did not fix the more subtle problem of denial of access to 
some articles by number.

>>The problem seems to affect articles which were download between the 
>>last time the cron script news.daily  was run and the crash. I would 
>>guess it is caused by inconsistencies between the overview and the 
>>history database.
> 
> 
> Seems reasonable.  If you can afford to take the server down for
> a full rebuild, just rebuild history and overview both at once,
> and be sure to do makedbz as well if necessary (some versions of
> makehistory automatically generate new .dir, .hash, and .index
> files to go along with the new history, and some require you to
> run makedbz yourself).

Did this and the system now allows access to all the articles via number 
including those which had gone AWAL. Thanks

>>How can I tell which method for the overview storage inn is using?
> 
> 
> "ovmethod" in inn.conf.

grep "ovmethod" /etc/news/inn.conf
ovmethod:               tradindexed

Thanks.
Re: INN article retrieval inconsistencies
#68874
Author: pbs
Date: Tue, 30 Mar 2004 21:26
35 lines
2813 bytes
Jeffrey M. Vinocur wrote:
> In article <c4820a$6vk$1@puck.litech.org>,
> Jeffrey M. Vinocur <jeff@litech.org> wrote:
> 
>>In article <c47snt$540$1@squay.lomarline.freeserve.co.uk>,
>>pbs  <pnews@lomarline.freeserve.co.uk> wrote:
>>
>>
>>>Does anyone know what the difference in the access algorithm is between 
>>>requesting an article by number eg "article  21375" and requesting it by 
>>>message id eg "article <pan.2004.03.22.20.04.57.686314@uk.me.buzzard>"?
>>
>>I should, but don't wa
> 
> 
> Whoops!
> 
> ...don't want to mislead you if I've gotten the details mixed up.

You didn't you have been most helpful.

> If you really want to figure out the intricacies of the behavior
> you're seeing, try checking in the overview database (assuming

I don't, but perhaps I ought to, so that if someone else has the problem 
on a bigger system than mine, which makes a total rebuild impractical 
they will at least know what the problem is.

> you're using tradindexed, where that can easily be done).

Yes I am using tradindexed. But can you give me some pointers
to get the monkey started? As the system is now clean, after a full 
history rebuild, it will have to wait until next time the system crashes 
(which the kernel oops is causing about once every two weeks).
Re: INN 2.3.4 article retrieval inconsistencies
#68880
Author: Robert Nichols
Date: Wed, 31 Mar 2004 18:38
85 lines
4414 bytes
In article <c3r3eh$6k8$1@squay.lomarline.freeserve.co.uk>,
pbs  <pnews@lomarline.freeserve.co.uk> wrote:
:I have had a problem with OOPS in a Linux kernel 2.4.24 which
:pulls down an INN 2.3.4 server very suddenly.
:
:When the system comes back up there are often problems which
:indicates corruption in the overview directory so I
:follow these steps as userid news to fix it:
:   su root -c  /etc/init.d/innd stop
:   rm -fr $HOME/overview/*
:   makehistory -O -x -F
:   su root -c "/etc/init.d/innd start"
:   ctlinnd renumber ""
:   makehistory -b -f history.n -I -O
:
:However once the system is up and running there still seem to be problems 
:with some articles accessed through the nntp socket connection. These 
:seem to be some of articles which were downloaded in the 24 hours before 
:the crash. I use suck to aquire the articles from my ISP and post them 
:locally using rpost.

I've seen some similar problems that are apparently due to recent
database updates being held in the system's buffer cache and not flushed
out to disk.  If the system crashes while innd is running, those recent
changes are lost.  What I do now is pause the server momentarily after
processing each incoming batch.  This causes the databases to be closed
and reopened.

  { ctlinnd pause "sync" && ctlinnd go "sync"; sync; } | grep -v '^Ok$'

After running the above command, the blocks on disk should be consistent
with the history file and the various overview '.DAT' files as seen
through the kernel's buffer cache.  One might think that 'sync' alone
would do the job, but apparently changes in the mmap-ed database files
don't get flagged for flushing to disk until the files are closed.

Testing the above is a painful process.  Short of rebooting or writing
software that directly accesses the hardware, I don't know of any way
to read what is really on the disk.  I offer the following script, but
IT ONLY WORKS ONCE.  Until you reboot the system there is no way to be
sure that subsequent invocations of 'debugfs' won't be seeing cached
data that is not consistent with what is actually on the platters.
This script works on my Fedora Core 1 Linux distribution.  I make no
claim that it is portable to other systems.  At a minimum, you'll need
to be sure that SPOOLDIR and DBDIR are correct for your installation.

#!/bin/bash
cat <<EOF >&2
########
# WARNING: Caching by the kernel makes this script inherently
#          unreliable.  Use at your own risk.
########
EOF
SPOOLDIR=/newsspool
DBDIR=/var/lib/news
TDIR=`mktemp -d /var/tmp/dbk.XXXXXX` || exit
trap "rm -rf $TDIR" 0

function setdev () {
    cd "$1"
    set -- `df . | tail -1`
    DEV=$1
    FS=$6
    DIR=`/bin/pwd`
    if [ "$DIR" = "$FS" ]
    then  DDIR=
    else  DDIR=${DIR#$FS/}/
    fi
}

setdev $SPOOLDIR
find overview -name '*.DAT' -printf "dump $DDIR%p $TDIR/%f\\n" >$TDIR/dumpov
debugfs -f $TDIR/dumpov $DEV >/dev/null
setdev $DBDIR
debugfs -R "dump ${DDIR}history $TDIR/history" $DEV

find $SPOOLDIR/overview -name '*.DAT' | while read F
do  cmp "$F" "$TDIR/`basename \"$F\"`" || diff "$F" "$TDIR/`basename \"$F\"`"
done
cmp "$DBDIR/history" "$TDIR/history" || diff "$DBDIR/history" "$TDIR/history"
# End of script

-- 
Bob Nichols         AT interaccess.com I am "rnichols"
Re: INN 2.3.4 article retrieval inconsistencies
#68881
Author: pbs
Date: Wed, 31 Mar 2004 23:14
49 lines
3734 bytes
Robert Nichols wrote:
> In article <c3r3eh$6k8$1@squay.lomarline.freeserve.co.uk>,
> pbs  <pnews@lomarline.freeserve.co.uk> wrote:
> :I have had a problem with OOPS in a Linux kernel 2.4.24 which
> :pulls down an INN 2.3.4 server very suddenly.
> :
> :When the system comes back up there are often problems which
> :indicates corruption in the overview directory so I
> :follow these steps as userid news to fix it:
> :   su root -c  /etc/init.d/innd stop
> :   rm -fr $HOME/overview/*
> :   makehistory -O -x -F
> :   su root -c "/etc/init.d/innd start"
> :   ctlinnd renumber ""
> :   makehistory -b -f history.n -I -O
> :
> :However once the system is up and running there still seem to be problems 
> :with some articles accessed through the nntp socket connection. These 
> :seem to be some of articles which were downloaded in the 24 hours before 
> :the crash. I use suck to aquire the articles from my ISP and post them 
> :locally using rpost.
> 
> I've seen some similar problems that are apparently due to recent
> database updates being held in the system's buffer cache and not flushed
> out to disk.  If the system crashes while innd is running, those recent
> changes are lost.  What I do now is pause the server momentarily after
> processing each incoming batch.  This causes the databases to be closed
> and reopened.

This is the conclusion I have come too. The articles with which I have 
problems are one which are posted after the last cron invocation of 
"news.daily delayrm".  BUT the articles are on disk and they are 
accessible via "article <MID>", They are just not accessible via 
"artical number".

I know that I can fix the problem with a history rebuild. But is there a 
way to fix it which would be more elegant given that INN 2.x FAQ -- 4.4. 
fixes the "tradspool: could not open ... File exists" problem but leaves 
this one?

To turn the problem on its head. What could it be that news.daily does
which fixes previous articles so that even if there is a crash the 
articles are still avilable via "article number" as well as "article 
<MID>" ?

Thanks for the script, but as I don't know when a crash can take place 
and you say it will only work once, I don't think it is going to be a 
viable alternative.
Re: INN 2.3.4 article retrieval inconsistencies
#68885
Author: Jeffrey M. Vinocur
Date: Thu, 01 Apr 2004 01:17
16 lines
1778 bytes
In article <c4ep5s$n8c$1@omega-3a.right.here>,
Robert Nichols  <SEE_SIGNATURE@localhost.localdomain.invalid> wrote:
>
>I've seen some similar problems that are apparently due to recent
>database updates being held in the system's buffer cache and not flushed
>out to disk.  If the system crashes while innd is running, those recent
>changes are lost.

Are you still seeing these problems with 2.4.x?  We're quite
aware that system crashes caused problems with the 2.3.x series,
but that has theoretically been much improved in later versions.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: INN 2.3.4 article retrieval inconsistencies
#68888
Author: Russ Allbery
Date: Thu, 01 Apr 2004 02:49
22 lines
2255 bytes
Jeffrey M Vinocur <jeff@litech.org> writes:
> Robert Nichols  <SEE_SIGNATURE@localhost.localdomain.invalid> wrote:

>> I've seen some similar problems that are apparently due to recent
>> database updates being held in the system's buffer cache and not
>> flushed out to disk.  If the system crashes while innd is running,
>> those recent changes are lost.

> Are you still seeing these problems with 2.4.x?  We're quite
> aware that system crashes caused problems with the 2.3.x series,
> but that has theoretically been much improved in later versions.

In particular, the overview database in 2.4.x, if you're using
tradindexed, does a background sync to disk after every incoming article.
Which makes it somewhat slower (although not as much as you'd think, in my
testing), but a *lot* more robust.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: INN 2.3.4 article retrieval inconsistencies
#68893
Author: Robert Nichols
Date: Thu, 01 Apr 2004 16:52
19 lines
1923 bytes
In article <c4fqip$949$1@puck.litech.org>,
Jeffrey M. Vinocur <jeff@litech.org> wrote:
:In article <c4ep5s$n8c$1@omega-3a.right.here>,
:Robert Nichols  <SEE_SIGNATURE@localhost.localdomain.invalid> wrote:
:>
:>I've seen some similar problems that are apparently due to recent
:>database updates being held in the system's buffer cache and not flushed
:>out to disk.  If the system crashes while innd is running, those recent
:>changes are lost.
:
:Are you still seeing these problems with 2.4.x?  We're quite
:aware that system crashes caused problems with the 2.3.x series,
:but that has theoretically been much improved in later versions.

I'm running INN version 2.3.5 here.  Glad to hear things are improved
in the current version.

-- 
Bob Nichols         AT interaccess.com I am "rnichols"
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads