🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
43 messages
43 total messages Started by Rebecca Ore Sun, 28 Jan 2001 20:55
Has anyone built INN-2.3.1 on Open BSD?
#50232
Author: Rebecca Ore
Date: Sun, 28 Jan 2001 20:55
17 lines
1644 bytes
I'm having some issues with an installation on a SparcStation LX (50
megahertz, 72 meg of RAM) under NetBSD.  I'm showing duplicate
articles.  I'm accepting them, the messages id's are duplicated in the
history.  One person suggested the OS wasn't optimized for INN.  In
email, one of my peers suggested that the probem might be a race
condition, that the slow machine wasn't logged articles as quickly as
I was being fed.

Suggestions on the problem welcome, but I'm also interested in hearing
whether anyone else has worked with OpenBSD using INN-2.3 or more
recent.

-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: Has anyone built INN-2.3.1 on Open BSD?
#50233
Author: Andrew Gierth
Date: Sun, 28 Jan 2001 21:14
23 lines
2092 bytes
>>>>> "Rebecca" == Rebecca Ore <rebecca@ogoense.net> writes:

 Rebecca> I'm having some issues with an installation on a
 Rebecca> SparcStation LX (50 megahertz, 72 meg of RAM) under NetBSD.
 Rebecca> I'm showing duplicate articles.  I'm accepting them, the
 Rebecca> messages id's are duplicated in the history.  One person
 Rebecca> suggested the OS wasn't optimized for INN.  In email, one of
 Rebecca> my peers suggested that the probem might be a race
 Rebecca> condition, that the slow machine wasn't logged articles as
 Rebecca> quickly as I was being fed.

both these suggestions are probably red herrings

Getting duplicate articles in history is very common on new INN 2.x
setups (at least for 2.2, this applied both to tagged-hash and the new
history dbz format). My suspicion is a bug in the overflow behaviour
of dbz, but I have never been able to track it down (the dbz code in
2.2 is virtually unmaintainable due to the patching it's had over the
years).

-- 
Andrew.
Re: Has anyone built INN-2.3.1 on Open BSD?
#50235
Author: Charlie Channelfeed
Date: Sun, 28 Jan 2001 22:05
101 lines
6718 bytes
::  Rebecca> SparcStation LX (50 megahertz, 72 meg of RAM) under NetBSD.
::  Rebecca> I'm showing duplicate articles.  I'm accepting them, the
::  Rebecca> messages id's are duplicated in the history.  One person
::  Rebecca> suggested the OS wasn't optimized for INN.  In email, one of

:: both these suggestions are probably red herrings

AW SHADDAP!!!  Er, I mean, I still haven't slept due to a Toblerone
overdose, but, are you a participant in The Other Place?  Unfortunately
I held my tongue when Rebecca first posted here, but I couldn't control
my geeked-up posting fingers when she did complain about problems.

``[t]he OS wasn't optimized for INN'' is a poor way of saying that it
does *not* have a unified buffer cache in the 1.5-RELEASE form that
was installed on Rebecca's machines, or in the 1.5-CURRENT that I had
installed late last year on one of my test reader boxes where I saw
the results of this and quickly jumped ship.

What this means is that HAVE_MMAP is defined as true, but also NEEDS_MSYNC
and MISSES_WRITES.  Or at least NEEDS_MSYNC, which is the key bit of
config.h.

There is a unified buffer cache in 1.5-CURRENT as of today, or even
near the end of last year, after I had carried out my tests on the
reader box.  But not on Rebecca's machine.  I've told her to install
the latest -current source tarballs rather than try to get things
working on the released version without this.

What this means is that all activity done with a write to a mmap()ed
file needs an msync() call immediately following, or else the data
is not immediately available for reading.  As the dbz v3 (traditional
old-school history) lookups are first done by looking for the presence
of a hash entry in a hash table, then a positive hit is verified by
a lookup against the text file, if the newly-arrived and newly-written
history entry in the .pag file is *not* available to be read, it will
appear to the history k0de that the article has not yet been received.

What needs to be done, since the .pag file is mmap'ed, is to msync()
the file immediately following the history update, which is not done
in the history k0de.  When I was running my ill-fated NetBSD reader
machine, I would tail the last entries off the news logfile and do
grephistory lookups, and occasionally the data would return a hit,
sometimes it would not for a minute or more.

Allegedly the CNFS k0deZ and the other article spool k0deZ do make
use of msync() if config.h shows it needed.  Nonetheless, the `sm'
program which seeks to the offset in the CNFS buffer and then reads
the article very often showed old garbage that had not yet been
overwritten.  This matched what innfeed was logging the outgoing
feed, that was trying to deliver the old spool data, was seeing.
Here it could be a few minutes before the lseek+read would actually
return the new article data.  a `sync' call didn't help all the
time either.

I quickly gave up on NetBSD without UBC.  I see similar problems
with our only remaining NetBSD-1.4-current reader machine from many
months ago, not so much with duplicates since it uses the MD5-based
two-hash-table no-text-lookups history, but with apparent missing
articles.  The FreeBSD VM k0de does not have this problem, they
have had a unified buffer cache for a long time.  I've urged my
replacement to replace this machine ASAP, as I only found out about
this for certain a week or two before my departure and I had been
overwhelmed by other things.


:: Getting duplicate articles in history is very common on new INN 2.x
:: setups (at least for 2.2, this applied both to tagged-hash and the new
:: history dbz format). My suspicion is a bug in the overflow behaviour
:: of dbz, but I have never been able to track it down (the dbz code in

I've seen duplicates with alarming frequency on our 2.2 machine,
but this only seems to happen when expire runs but appears to fail
or somehow bail out, and the old history inodes are kept but are
*not* being updated -- after the failed expire, their timestamps
remain unchanged.  OF course, if history lookups are being done to
inodes that are unchanging, or to removed inodes somehow, especially
if those inodes were not properly built, then they're not seeing
recent articles and you get both a problem of duplicates, as well
as a boatload of articles that don't make it into history.

It appears that at least one way this can be triggered, out of
potentially several ways, is if INN becomes throttled during expire,
or else if INN is throttled at expire and becomes unthrottled.  I've
kept logs but I haven't analyzed them to see what's happened during
the expires followed by failed updates of the history files.

Aside from this, I haven't seen any other reason for duplicates with
the newer MD5-style history, and I've been in too much a state of
permanent sleep deprivation to be able to try to track down the
known cases where it has happened and the history files have failed
to have their timestamps updated properly.


But back to NetBSD, with what I *have* seen from the reader machine
and knowing that it does not have a unified buffer cache, I'd hardly
call that a red herring.  Anything less than a recent -current is
a waste of time with that OS for news.

Not that I want to disagree with you or anything, but I sure wish
I could kick the toblerone buzz that has me HYPER HYPER HYPER
Re: Has anyone built INN-2.3.1 on Open BSD?
#50237
Author: Andrew Gierth
Date: Sun, 28 Jan 2001 22:17
54 lines
3712 bytes
>>>>> "Charlie" == Charlie Channelfeed <autocyberretributionmeowbot@plonk.invalid> writes:

 Charlie> AW SHADDAP!!!  Er, I mean, I still haven't slept due to a
 Charlie> Toblerone overdose, but, are you a participant in The Other
 Charlie> Place?

not for some time - I keep meaning to ask someone for a feed, but other
matters keep getting in the way

 [non-unified buffer cache]

 Charlie> What this means is that all activity done with a write to a
 Charlie> mmap()ed file needs an msync() call immediately following,
 Charlie> or else the data is not immediately available for reading.

not immediately available for reading _via read()_. reading it back out
of the same mapped region should work fine, and that should be enough
to avoid accepting duplicates.

 Charlie> As the dbz v3 (traditional old-school history) lookups are
 Charlie> first done by looking for the presence of a hash entry in a
 Charlie> hash table, then a positive hit is verified by a lookup
 Charlie> against the text file, if the newly-arrived and
 Charlie> newly-written history entry in the .pag file is *not*
 Charlie> available to be read, it will appear to the history k0de
 Charlie> that the article has not yet been received.

This should not be the case, because the same process is doing both
the additions and the lookups, and the history text is not mmaped.

Other stuff will likely break, of course, especially stuff to do with
outward feeding or history lookups from separate processes....

 >> Getting duplicate articles in history is very common on new INN
 >> 2.x setups (at least for 2.2, this applied both to tagged-hash and
 >> the new history dbz format). My suspicion is a bug in the overflow
 >> behaviour of dbz, but I have never been able to track it down (the
 >> dbz code in

 Charlie> I've seen duplicates with alarming frequency on our 2.2
 Charlie> machine, but this only seems to happen when expire runs but
 Charlie> appears to fail or somehow bail out, and the old history
 Charlie> inodes are kept but are *not* being updated -- after the
 Charlie> failed expire, their timestamps remain unchanged.

my 2.2 box (tagged-hash) occasionally mailbombs me with news.daily
reports over 10000 lines long, where most of the content is "Duplicate
messageid found in history" errors. This was particularly noticable
when I first set it up, and I've seen the same thing from
newly-installed non-tagged-hash 2.2 fullfeed systems.

-- 
Andrew.
Re: Has anyone built INN-2.3.1 on Open BSD?
#50240
Author: Charlie Chocolategobbler
Date: Mon, 29 Jan 2001 00:43
141 lines
8636 bytes
::  Charlie> Toblerone overdose, but, are you a participant in The Other
::  Charlie> Place?
:: 
:: not for some time - I keep meaning to ask someone for a feed, but other

Contact the usenet contact address at tdk.net, who can give full
access to an IP of your choice, or even a feed if you're ready for
that.  Ask Joachim to relay your read/post request to me an' I'll
fix ya up REEEEL good-like.


::  Charlie> mmap()ed file needs an msync() call immediately following,
::  Charlie> or else the data is not immediately available for reading.
:: 
:: not immediately available for reading _via read()_. reading it back out
:: of the same mapped region should work fine, and that should be enough

*should* work fine, but there have been mumblings in the list about
mmap being b0rken for quite some time.  I'm glad that someone who
actually knows something about this is piping up, since it's not as
though I know what I'm talking about.

Conceivably, if data that were written and then (if I trust what Russ
said about the INN k0deZ and the mmaped CNFS buffers) msync'ed was *not*
available for immediate read (or even several minutes delayed reads),
there could be b0rkenness beyond the known behaviour of a lack of a
unified buffer cache.  Of course, I haven't investigated this, nor
have I studied all parts of the k0de known to be b0rken.  My choice of
action was to run away, far far away, very fast.


::  Charlie> first done by looking for the presence of a hash entry in a
::  Charlie> hash table, then a positive hit is verified by a lookup
::  Charlie> against the text file, if the newly-arrived and
::  Charlie> newly-written history entry in the .pag file is *not*
::  Charlie> available to be read, it will appear to the history k0de
::  Charlie> that the article has not yet been received.
:: 
:: This should not be the case, because the same process is doing both
:: the additions and the lookups, and the history text is not mmaped.

Yeah, what I see is the opposite, where fewer than the expected number
of message IDs really are available, but not a problem with duplicates.
Not being a VM expert by any means, I'm wondering if somehow NetBSD's
use of trickle sync for the history.pag file throws any monkey wrenches
into the situation.

The question I have is which of the two steps in the history lookups
is at fault -- does the first check against the history.pag hash table
fail (translation: article not yet present), or does that succeed but
the following text search fail (translation: hash collision but article
still not yet present)?  Or could this be a failure in general in the
text lookup if *all* message ID lookups fail, a third option which just
occurred to me right now?

If I were trying to get to the r00t of the matter, I'd add debugging
lines to Rebecca's history k0deZ to log success or failure of the .pag
hash check, as well as the text file check.  And actually, I'd ask
Rebecca to do a `grephistory -l '<actual-message-ID-in-spool>' ' command
for several IDs that can be read to see if the third possibility that
I had experienced part of the time, might be at fault.

The `grephistory' output should be different for every ID.  It should
partially match the `grephistory -h' output for the same ID.  The `sm'
output of the last part of the `grephistory' output should retrieve the
article.  If the `grephistory -l' output matches `head -1' of the
history text file, then one is seeing the same problem I had seen earlier
where I somehow had to use a (long) added to an lseek() call to get any
decent results.

Rebecca, another way to track whether your history lookups are corrupted
is to try to retrieve messages by ID.  It should work, for example, by
using lynx --
lynx news://193.162.153.117:143/news.software.nntp

If you try the same thing, replacing 193...:143 with your own news
swerver's name, but all attempts to retrieve articles in The Other
Place that you'd replace n.s.nntp happen to fail `430 no such article'
which you could also see by telnet...
telnet news 119
200 foo InterNerdNuze swerver sez HIT ME (posting okie-dokie)
group your.preferred.group
(response is returned)
head ####   (where #### is some number in the range of the last two numbers
             in the response above)
(article header is returned, cut-n-paste the <message-ID> part of the
  message-ID or any ID in the References: header)

head <message-id-cut-n-pasted-from-above>

If this works, your history lookups are okay.  If you get the same
`430' error, then you have serious history problems.  I use `lynx' as a
`newsreader' because it shows any history `problems' immediately, that
other `readers' using message numbers would `hide'.


:: Other stuff will likely break, of course, especially stuff to do with
:: outward feeding or history lookups from separate processes....

That is the other reason I've urged Rebecca to immediately upgrade
to NetBSD-current, with the unified buffer cache, if not abandon
ship for another operating system entirely, before putting too much
blame on INN proper.  After all, if someone makes a post to that
swerver but innfeed can't retrieve the article when it tries to
send it out immediately, that's going to be cause of concern.  Even
delaying the feed with innxmit wasn't enough for me to get 100%
reliable propagation out of the test box I set up when I had this
problem.  And of course, reading was b0rken for the last two or
three articles in active groups most of the time.


:: my 2.2 box (tagged-hash) occasionally mailbombs me with news.daily
:: reports over 10000 lines long, where most of the content is "Duplicate
:: messageid found in history" errors. This was particularly noticable

Hmmm.  I am running a FreeBSD INN-2.4-something machine with the
old-style tagged-hash history, and while I've never paid much attention
to it, it does get redundant time-delayed feeds from all feeds due to
known innfeed crashes that result in lost articles that innxmit will
deliver.  This is a prime candidate for duplicates, although I probably
have the history cache tweaked to handle dupes within a short time even
if there is history corruption proper.  It gets other feeds with more
varied delays of up to several hours, so there's plenty of chance for
it to take in duplicates.

I've ignored this machine most of the time, but I've never seen any
history-related problems with it.  No reports of duplicates, no nuthin.
So I'm not seeing this problem that others have reported.  It's a
transit machine with three days history retention, fed by two transit
machines with up to 22 days retention and a small handful of realtime
partial feeds (which is how I see recycled Cyclone news after four
days), and downstream machines should have history equivalent to their
cutoff or spool retention.  Small history chosen to keep memory needs
minimal, for the same reason I chose old-style dbz (the relatively few
text-hit lookups it would need to do was another reason).

I don't know what to say.  DO NOT TEMPT ME TO BUILD ANOTHER NETBSD
RELEASE MACHINE OR BOOT A RETIRED BOX BACK INTO NETBSD AND MAKE A
FRESH INSTALL WITHOUT MY TARBALL OF PATCHES JUST TO SEE IF I CAN
REPRODUCE THESE HISTORY PROBLEMS.  PLEASE, I BEG THEE.  LET ME SLEEP.
Re: Has anyone built INN-2.3.1 on Open BSD?
#50242
Author: Rebecca Ore
Date: Mon, 29 Jan 2001 01:38
32 lines
2583 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:

> >>>>> "Rebecca" == Rebecca Ore <rebecca@ogoense.net> writes:
> 
>  Rebecca> I'm having some issues with an installation on a
>  Rebecca> SparcStation LX (50 megahertz, 72 meg of RAM) under NetBSD.
>  Rebecca> I'm showing duplicate articles.  I'm accepting them, the
>  Rebecca> messages id's are duplicated in the history.  One person
>  Rebecca> suggested the OS wasn't optimized for INN.  In email, one of
>  Rebecca> my peers suggested that the probem might be a race
>  Rebecca> condition, that the slow machine wasn't logged articles as
>  Rebecca> quickly as I was being fed.
> 
> both these suggestions are probably red herrings
> 
> Getting duplicate articles in history is very common on new INN 2.x
> setups (at least for 2.2, this applied both to tagged-hash and the new
> history dbz format). My suspicion is a bug in the overflow behaviour
> of dbz, but I have never been able to track it down (the dbz code in
> 2.2 is virtually unmaintainable due to the patching it's had over the
> years).

A person's who has done a lot to help me set up suggested just giving
it up to ten days to work itself in, so that's the course we're
planning to take at this point.  I'll add new peers when things are
calmer.  A coworker who's also pretty knowledgeable said that he very
seriously doubted the OS was to blame, or even the machine speed.

-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: Has anyone built INN-2.3.1 on Open BSD?
#50247
Author: Rebecca Ore
Date: Mon, 29 Jan 2001 04:42
101 lines
5121 bytes
Charlie Chocolategobbler <autocyberretributionmeowbot@plonk.invalid> writes:

(Snips of stuff that makes me blink like a fish)

> 
> Rebecca, another way to track whether your history lookups are corrupted
> is to try to retrieve messages by ID.  It should work, for example, by
> using lynx --
> lynx news://193.162.153.117:143/news.software.nntp
> 
> If you try the same thing, replacing 193...:143 with your own news
> swerver's name, but all attempts to retrieve articles in The Other
> Place that you'd replace n.s.nntp happen to fail `430 no such
> article'

Just tried it and it showed the articles all nicely there, doubled,
but when I tried to read, it gave me 

430 no such article



> which you could also see by telnet...
> telnet news 119
> 200 foo InterNerdNuze swerver sez HIT ME (posting okie-dokie)
> group your.preferred.group
> (response is returned)
> head ####   (where #### is some number in the range of the last two numbers
>              in the response above)
> (article header is returned, cut-n-paste the <message-ID> part of the
>   message-ID or any ID in the References: header)
> 
> head <message-id-cut-n-pasted-from-above>

and it looks like this:

Message-ID: <ygtitmzdf0b.fsf@tsathoggua.rlyeh.net>
References: <slrn974uji.95b.rebecca@pyrophore.ogoense.net> <ylelxpqt8k.fsf@windlord.stanford.edu> <m3y9vxgx35.fsf_-_@pyrophore.ogoense.net> <94uc9m$4an$1@news.contactel.cz> <m3y9vw52lt.fsf@pyrophore.ogoense.net> <94vr7m$8al$1@news.contactel.cz> <m3u26kteld.fsf@pyrophore.ogoense.net> <950hsd$9cr$1@news.contactel.cz>
NNTP-Posting-Host: tsathoggua.rlyeh.net
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: tsathoggua.rlyeh.net 980685764 18240 194.143.111.168 (28 Jan 2001 12:42:44 GMT)
X-Complaints-To: usenet@tsathoggua.rlyeh.net
NNTP-Posting-Date: 28 Jan 2001 12:42:44 GMT
X-Newsreader: Gnus v5.7/Emacs 20.7
Xref: paradoxa.ogoense.net bofh.config:4189
..
head <ygtitmzdf0b.fsf@tsathoggua.rlyeh.net>
430 No such article


> 
> If this works, your history lookups are okay.  If you get the same
> `430' error, then you have serious history problems.  I use `lynx' as a
> `newsreader' because it shows any history `problems' immediately, that
> other `readers' using message numbers would `hide'.

Okay, I have serious history problems.

> 
> 
> :: Other stuff will likely break, of course, especially stuff to do with
> :: outward feeding or history lookups from separate processes....
> 
> That is the other reason I've urged Rebecca to immediately upgrade
> to NetBSD-current, with the unified buffer cache, if not abandon
> ship for another operating system entirely, before putting too much
> blame on INN proper.  After all, if someone makes a post to that
> swerver but innfeed can't retrieve the article when it tries to
> send it out immediately, that's going to be cause of concern.  Even
> delaying the feed with innxmit wasn't enough for me to get 100%
> reliable propagation out of the test box I set up when I had this
> problem.  And of course, reading was b0rken for the last two or
> three articles in active groups most of the time.
>

I use nntpsend/innxmit.

(Snips)


> 
> I don't know what to say.  DO NOT TEMPT ME TO BUILD ANOTHER NETBSD
> RELEASE MACHINE OR BOOT A RETIRED BOX BACK INTO NETBSD AND MAKE A
> FRESH INSTALL WITHOUT MY TARBALL OF PATCHES JUST TO SEE IF I CAN
> REPRODUCE THESE HISTORY PROBLEMS.  PLEASE, I BEG THEE.  LET ME SLEEP.

I was going to sleep at work but the second NOC monkey isn't showing
up.

One of the OpenBSD people said that people were successfully building
INN-2.3.1 from tarballs and there's my Solarius on an internal hard drive
that I can look at before going critical.



-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: Has anyone built INN-2.3.1 on Open BSD?
#50250
Author: Charlie Corefile
Date: Mon, 29 Jan 2001 06:07
62 lines
3678 bytes
:: Charlie Chocolategobbler <autocyberretributionmeowbot@plonk.invalid> writes:
:: (Snips of stuff that makes me blink like a fish)

As I'm writing for a larger audience that might have a vague clue
what I'm trying to say, I include things you don't need to know
to get things working, but which other k0dewankerz might find useful.
Just skip anything that makes no sense.  Makes reading my overly-long
articles simple -- Just Say N.


:: but when I tried to read, it gave me 
:: 
:: 430 no such article

Ha.  Thought so.  Okay, now onto the next step:


:: head <ygtitmzdf0b.fsf@tsathoggua.rlyeh.net>
:: 430 No such article

Try this as a `grephistory' command, like this, from the command
line on your news swerver:

bash$ grephistory -l '<ygtitmzdf0b.fsf@tsathoggua.rlyeh.net>'

Also, show me the result of
head -1 /news/db/history

And, for giggles, try the above `grephistory -l '<messgae-ID>' ' command
with a few other articles from the References header you quoted
in the message, or any other message IDs you have in your spool.
Be sure to add ' ' around the <message-ID> so it doesn't get all
mangled and stuff by being interpreted by the shell.


:: > If this works, your history lookups are okay.  If you get the same
:: > `430' error, then you have serious history problems.  I use `lynx' as a
:: > `newsreader' because it shows any history `problems' immediately, that
:: > other `readers' using message numbers would `hide'.
:: 
:: Okay, I have serious history problems.

I'll try and find some `debugging' hacks I've done that may `fix' this
problem or else show where it is so you may still be able to use
NetBSD, although I do recommend using -current to assure `propagation'
of locally posted news once the history `problem' is licked.


:: One of the OpenBSD people said that people were successfully building
:: INN-2.3.1 from tarballs and there's my Solarius on an internal hard drive
:: that I can look at before going critical.

I won't be offended if you choose to use a different OS rather than
try to find the r00t of this problem with the hacks I'll be digging
up, but I'm pretty sure that Russ and others will be interested in
the results you see.

I'll get back to you about the patches, but go ahead and give the
`grephistory' commands a try with a few message IDs.

Thanks...
Re: Has anyone built INN-2.3.1 on Open BSD?
#50251
Author: Rebecca Ore
Date: Mon, 29 Jan 2001 07:15
102 lines
4539 bytes
Charlie Corefile <autocyberretributionmeowbot@plonk.invalid> writes:

> :: Charlie Chocolategobbler <autocyberretributionmeowbot@plonk.invalid> writes:
> :: (Snips of stuff that makes me blink like a fish)
> 
> As I'm writing for a larger audience that might have a vague clue
> what I'm trying to say, I include things you don't need to know
> to get things working, but which other k0dewankerz might find useful.
> Just skip anything that makes no sense.  Makes reading my overly-long
> articles simple -- Just Say N.
> 
> 
> :: but when I tried to read, it gave me 
> :: 
> :: 430 no such article
> 
> Ha.  Thought so.  Okay, now onto the next step:

Greg tried a rebuild, but I've still got the same answer in lynx.


> 
> 
> :: head <ygtitmzdf0b.fsf@tsathoggua.rlyeh.net>
> :: 430 No such article
> 
> Try this as a `grephistory' command, like this, from the command
> line on your news swerver:
> 
> bash$ grephistory -l '<ygtitmzdf0b.fsf@tsathoggua.rlyeh.net>'

Returned nada.


> 
> Also, show me the result of
> head -1 /news/db/history

From telnet, I guessed:

head -1 /news/db/history
501 [MessageID|Number]


> 
> And, for giggles, try the above `grephistory -l '<messgae-ID>' ' command
> with a few other articles from the References header you quoted
> in the message, or any other message IDs you have in your spool.
> Be sure to add ' ' around the <message-ID> so it doesn't get all
> mangled and stuff by being interpreted by the shell.

Okay. Unless I'm supposed to be doing something more, it looks like
this:

bash-2.04$ grephistory -l '<ygtitmzdf0b.fsf@tsathoggua.rlyeh.net>'
bash-2.04$ grephistory -l '<m3zogbl7mg.fsf@pyrophore.ogoense.net>'
bash-2.04$ grephistory -l '<m3zogbl7mg.fsf@pyrophore.ogoense.net>'

Just returning.

> 
> 
> :: > If this works, your history lookups are okay.  If you get the same
> :: > `430' error, then you have serious history problems.  I use `lynx' as a
> :: > `newsreader' because it shows any history `problems' immediately, that
> :: > other `readers' using message numbers would `hide'.
> :: 
> :: Okay, I have serious history problems.
> 
> I'll try and find some `debugging' hacks I've done that may `fix' this
> problem or else show where it is so you may still be able to use
> NetBSD, although I do recommend using -current to assure `propagation'
> of locally posted news once the history `problem' is licked.

So far, I haven't had anything go missing.

> 
> :: One of the OpenBSD people said that people were successfully
> building :: INN-2.3.1 from tarballs and there's my Solarius on an
> internal hard drive :: that I can look at before going critical.


> 
> I won't be offended if you choose to use a different OS rather than
> try to find the r00t of this problem with the hacks I'll be digging
> up, but I'm pretty sure that Russ and others will be interested in
> the results you see.

They also serve who beta test.  At least, I'm not having to convince
someone there is a bug.  


> I'll get back to you about the patches, but go ahead and give the
> `grephistory' commands a try with a few message IDs.




-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: Has anyone built INN-2.3.1 on Open BSD?
#50252
Author: Rebecca Ore
Date: Mon, 29 Jan 2001 07:23
12 lines
1600 bytes
Charlie Corefile <autocyberretributionmeowbot@plonk.invalid> writes:

> I'll get back to you about the patches, but go ahead and give the
> `grephistory' commands a try with a few message IDs.

Went back to get them from the right groups, but still no results.


-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: Has anyone built INN-2.3.1 on Open BSD?
#50254
Author: Charlie Chocoholic
Date: Mon, 29 Jan 2001 07:44
77 lines
4297 bytes
:: > bash$ grephistory -l '<ygtitmzdf0b.fsf@tsathoggua.rlyeh.net>'
:: 
:: Returned nada.

Hmmm.  Odd.  I expected it to return the first line from history.
I'll have to look again at the patches I was going to send, and
see if I can find the debugging ones.


:: > head -1 /news/db/history
:: 
:: From telnet, I guessed:

No, from the command line, but you're not getting the grephistory
results I expected.  Nevermind.


:: bash-2.04$ grephistory -l '<ygtitmzdf0b.fsf@tsathoggua.rlyeh.net>'
:: bash-2.04$ grephistory -l '<m3zogbl7mg.fsf@pyrophore.ogoense.net>'
:: bash-2.04$ grephistory -l '<m3zogbl7mg.fsf@pyrophore.ogoense.net>'
:: 
:: Just returning.

I found a set of patches I needed for grephistory, and I also needed
patches against `sm' since I use SNCF.  I mean, CNFS.  Getting travel
itch, or else listening to paris radio, or something.  But you don't
need those since you use traditional spool.  What you would need would
be dbz patches, and basically my dbz.c k0deZ are a total mess.  Ugh.
Something like six versions in one source directory.  But I don't think
I made any patches in the old-style part of dbz.

Anyway, let's see if history lookups your peers are making return the
needed results.  Using the above message IDs without the ' ' around
them, pretend to be a news peer.

Telnet to your swerver from a machine you've given permission to transfer
news.  That may be localhost.  If not, add it to your incoming.conf list
if you don't have access from elsewhere.

bash$ telnet your-news-box port-where-inn-listens,119-or-433-probably

you will get a greeting that you should be able to say
mode stream
and you'll get an ok response.  If not, you are connected as a
reader, not as a feeder.

When you have the prompt as a feeder, give the following commands

ihave <one-of-the-above-message-ids>
you will see either
335
in which case just type a dot by itself and return, or else
what you should see would be
435 Duplicate
for all the IDs you try that you have in the spool.

If you get 335, that is why you get sent the article several times.


Let me look closely at my patches and see if you might be able to
use them or if they are for a different problem.  It turns out
that I built INN on this machine when it was running NetBSD, made
a bunch of patches, discovered the corruption caused by the lack
of unified buffer cache, and used the very same source, nearly all
patches intact, under FreeBSD.  Perhaps forgetting I patched things
at all.

The patches are against a different history database format, so I
need to figure out what is relevant and probably hack a new set for
you to try.  Apparently I also ran NetBSD on the filter machine,
where I use the same history you use, but I don't see any specific
hacks against innd/his.c or lib/dbz.c that are obviously needed.

More in a minute...

thanks
Re: Has anyone built INN-2.3.1 on Open BSD?
#50255
Author: Rebecca Ore
Date: Mon, 29 Jan 2001 08:04
60 lines
3313 bytes
:: > I'll get back to you about the patches, but go ahead and give the
:: > `grephistory' commands a try with a few message IDs.
:: 
:: Went back to get them from the right groups, but still no results.

Try this patch, just to see if it gets you anywhere.  I think I
added the needed debugging to `sm' and not `grephistory' since I
don't see heavy evidence of debuggery in the source I've found so
far.

Go to your inn-version/expire/ directory, where your grephistory
source is, and apply this patch that you've saved to some file
patch < name-of-this-patchfile



--- /news/src/inn-STABLE-20001114/expire/grephistory.c-OLD	Fri Nov 19 10:16:57 1999
+++ /news/src/inn-STABLE-20001114/expire/grephistory.c	Mon Nov 20 10:51:34 2000
@@ -50,7 +50,8 @@
     int	c;
     int	i;
 
-    if (fseek(F, offset, SEEK_SET) == -1) {
+    if (fseek(F, (long)offset, SEEK_SET) == -1) {
+    /* if (fseek(F, offset, SEEK_SET) == -1) { */
 	(void)fprintf(stderr, "Can't seek to %ld, %s\n", offset, strerror(errno));
 	return FALSE;
     }
@@ -77,7 +78,8 @@
 {
     int	                c;
 
-    if (fseek(F, offset, SEEK_SET) == -1) {
+    if (fseek(F, (long)offset, SEEK_SET) == -1) {
+    /* if (fseek(F, offset, SEEK_SET) == -1) { */
 	(void)fprintf(stderr, "Can't seek to %ld, %s\n", offset, strerror(errno));
 	exit(1);
     }


This is against a fairly old source, but probably should apply
pretty cleanly.  If greagoir is building things for you, he would
be able to do this if you have problems.

Rebuild grephistory --
make grephistory

then try this hacked version with the message IDs that gave you
no results before
 ./grephistory -l '<mesage-idz>'


I'll look at the dbz k0deZ, and try to remember what all I had to
hack to get things to work, esp. depending on the results of your
trying to see if innd knows about message IDs it has already in
history.

viel spass damit
Charlie Fluffie
Re: Has anyone built INN-2.3.1 on Open BSD?
#50256
Author: Rebecca Ore
Date: Mon, 29 Jan 2001 08:19
51 lines
2982 bytes
Charlie Chocoholic <autocyberretributionmeowbot@ploink.invalid> writes:

> :: > bash$ grephistory -l '<ygtitmzdf0b.fsf@tsathoggua.rlyeh.net>'
> :: 
> :: Returned nada.
> 
> Hmmm.  Odd.  I expected it to return the first line from history.
> I'll have to look again at the patches I was going to send, and
> see if I can find the debugging ones.
> 
> 
> :: > head -1 /news/db/history
> :: 
> :: From telnet, I guessed:
> 
> No, from the command line, but you're not getting the grephistory
> results I expected.  Nevermind.

I even went to the top of history and make sure I was using message
ID's from the right groups.

I tried head from the command line:

bash-2.04$ head -1 history
[C061B3EAE6B4B7C1497F71F53DC66CCD]      980288382~-~980288382   @05010000000B000000010000000000000000@

> 
> Anyway, let's see if history lookups your peers are making return the
> needed results.  Using the above message IDs without the ' ' around
> them, pretend to be a news peer.
> 
> Telnet to your swerver from a machine you've given permission to transfer
> news.  That may be localhost.  If not, add it to your incoming.conf list
> if you don't have access from elsewhere.

You think I'm going to have an active telnet demon running on either
of my home boxes?

I just tried lynx again and it looked like Greg did something more.

We need to get him to say what it was.

<Goes to email>  He switched it to dbz 6 and everything looks much
much better.  Wants me to wait before apply random patches.



-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: Has anyone built INN-2.3.1 on Open BSD?
#50257
Author: Charlie Rebecca
Date: Mon, 29 Jan 2001 08:28
59 lines
3594 bytes
:: From: Rebecca Ore <rebecca@ogoense.net>

ARRRGH!!!  MY SEKRIT IS REVEALED!!!  I use `vi' as newsreader and
forgot to change your name to mine before posting.  How shall I
ever live this down.  Oh well.  Like They say, you only live once,
and that's once too often for me.


:: Try this patch, just to see if it gets you anywhere.  I think I

I don't think it will get you anywhere, because it\s doing a dbz
search that requires a text file lookup, and if the seek into the
textfile is b0rken, you won't get any result for this to work with.
That's probably why you saw nothing with grephistory results, when
I expected to see the first line from the history file -- for me,
my md5 hash lookups returned the offsets but my seek failed.

That's what I get for not sleeping.


Try the following patch against inn-version/lib/dbz.c .  This will
require you to either rebuild everything for grephistory to use this,
or else you need to `make; make install' in the lib directory and
then return and `make grephistory' in the expire directory.

I'd try this myself, but I'm not running a NetBSD machine with this
history format, so...



--- /news/src/inn-STABLE-20001114/lib/dbz.c-DIST	Tue Nov 14 11:03:20 2000
+++ dbz.c	Mon Jan 29 09:23:27 2001
@@ -972,7 +972,7 @@
 	offset <<= conf.dropbits;
 	if (offset)		/* backspace 1 character to read '\n' */
 	    offset--;
-	if (fseek(basef, (OFFSET_T) offset, SEEK_SET) != 0) {
+	if (fseek(basef, (long) offset, SEEK_SET) != 0) {
 	    DEBUG(("fetch: seek failed\n"));
 	    return FALSE;
 	}


cd into lib, save this,
patch < this-patch-file
and rebuild as above.

This is if what I had noted before really is the problem, where
apparently fseek() was failing except where I forced it to be a
(long) offset.

This patch should be tried if the transfer-type history lookups where
you pretend to be a peer are failing.  If they succeed, you do not
need this.  I'm suspecting they are failing, else your other peers
should not be sending you the same articles.

HTH, HAND, Meow.
The One And Only Real True Rebecca
Re: Has anyone built INN-2.3.1 on Open BSD?
#50258
Author: Rebecca Ore
Date: Mon, 29 Jan 2001 08:29
47 lines
2769 bytes
Rebecca Ore <rebecca@ogoense.net> writes:

Barry, don't use my email address for your posts.  

> :: > I'll get back to you about the patches, but go ahead and give the
> :: > `grephistory' commands a try with a few message IDs.
> :: 
> :: Went back to get them from the right groups, but still no results.
> 
> Try this patch, just to see if it gets you anywhere.  I think I
> added the needed debugging to `sm' and not `grephistory' since I
> don't see heavy evidence of debuggery in the source I've found so
> far.
> 
> Go to your inn-version/expire/ directory, where your grephistory
> source is, and apply this patch that you've saved to some file
> patch < name-of-this-patchfile
> 

I've saved the patch.  Greg wants me to hold off to see if what he did
worked.  


> no results before
>  ./grephistory -l '<mesage-idz>'

Whatever, Greg did, it's working now.  I did the up arrow thing so
it's exactly the same command.

bash-2.04$ grephistory -l '<980750259.377012@sidehack.sat.gweep.net>'
[B377E7EB9F205401588C294B9EB5FF4A]      980750259~-~980750259   @050100000016000042990000000000000000@



> 
> 
> I'll look at the dbz k0deZ, and try to remember what all I had to
> hack to get things to work, esp. depending on the results of your
> trying to see if innd knows about message IDs it has already in
> history.
> 

-- 
Rebecca Ore
votefraud's newsmater
http://www.ogoense.net/rebecca
Re: Has anyone built INN-2.3.1 on Open BSD?
#50259
Author: Charlie Changeable
Date: Mon, 29 Jan 2001 08:40
37 lines
3121 bytes
:: I tried head from the command line:
:: 
:: bash-2.04$ head -1 history
:: [C061B3EAE6B4B7C1497F71F53DC66CCD]      980288382~-~980288382  @05010000000B000000010000000000000000@

Save this for later, cuz...


:: I just tried lynx again and it looked like Greg did something more.

:: <Goes to email>  He switched it to dbz 6 and everything looks much
:: much better.  Wants me to wait before apply random patches.

The problem with your md5-based hashes is that it needs far more
memory for expire.  Much more than a small hobby swerver needs to
have.  If you can get away with it, fine, but v3 should work for you.

The question I have though is whether with this md5-based dbz v6
you will be able to get the `grephistory' commands to work.  If not,
then I think you need the patch I sent first.  If that's the case,
then I think you need the second patch to get dbz v3 to work with
NetBSD.  At least, I had had failures getting `grephistory' to work
at all without this patch, even when it worked fine with FreeBSD.

If your `grephistory' results on messages you have all look like the
same thing and happen to be the same as the history line I quoted
above, then you have an fseek() problem.  If it's all okay, then
you don't have the problem I had.

Anyway, if you choose to stay with v6 and it doesn't kill your machine
during expire, then I'll never know if the patches to work around what
is probably a NetBSD bug really do work or not, and my life will be
meaningless.  Which is nothing new.  But if someone else wants to try
this out, feel free.

Of course, I could be wrong.
Re: Has anyone built INN-2.3.1 on Open BSD?
#50261
Author: Rebecca Ore
Date: Mon, 29 Jan 2001 08:52
70 lines
4295 bytes
Charlie Changeable <autocyberretributionmeowbot@plonk.invalid> writes:

> :: I tried head from the command line:
> :: 
> :: bash-2.04$ head -1 history
> :: [C061B3EAE6B4B7C1497F71F53DC66CCD]      980288382~-~980288382  @05010000000B000000010000000000000000@
> 
> Save this for later, cuz...
> 
> 
> :: I just tried lynx again and it looked like Greg did something more.
> 
> :: <Goes to email>  He switched it to dbz 6 and everything looks much
> :: much better.  Wants me to wait before apply random patches.
> 
> The problem with your md5-based hashes is that it needs far more
> memory for expire.  Much more than a small hobby swerver needs to
> have.  If you can get away with it, fine, but v3 should work for you.

He had his reasons.  And *all* I'm getting are two hiearchies, and
only two users, me and a real sysadmin, are allowed on one of them.
All the other people have elected to play only in local groups, or in
net.*, or on the commercial servers being my user lets them play on,
as long as they have repliable email addresses which can be changed on
a modestly regular basis.

We have a considerable amount of swap since I had to have that to
compile INN at all when I only had 16 meg of RAM.  The swap on the
second drive where INN lives is as large as the swap and root
partition on the first drive (cheap quick lazy non-calculating disk
label so I could try again).



> The question I have though is whether with this md5-based dbz v6
> you will be able to get the `grephistory' commands to work.  If not,
> then I think you need the patch I sent first.  If that's the case,
> then I think you need the second patch to get dbz v3 to work with
> NetBSD.  At least, I had had failures getting `grephistory' to work
> at all without this patch, even when it worked fine with FreeBSD.

Works now.


> If your `grephistory' results on messages you have all look like the
> same thing and happen to be the same as the history line I quoted
> above, then you have an fseek() problem.  If it's all okay, then
> you don't have the problem I had.


> Anyway, if you choose to stay with v6 and it doesn't kill your machine
> during expire, then I'll never know if the patches to work around what
> is probably a NetBSD bug really do work or not, and my life will be
> meaningless.  Which is nothing new.  But if someone else wants to try
> this out, feel free.

The patches can wait until we see how the machine behaves.

Eventually, the noise of the drive case will force me to buy a Sparc10
and try the transplant trick.  If that works, my Linux advisor and I
shall drive the thing to a location in Spring Mill, PA, and put it in
employee ghetto.  Then I can play with something else on the LX.

> 
> Of course, I could be wrong.

-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: Has anyone built INN-2.3.1 on Open BSD?
#50264
Author: Russ Allbery
Date: Mon, 29 Jan 2001 10:47
20 lines
2269 bytes
Charlie Changeable <autocyberretributionmeowbot@plonk.invalid> writes:

> The problem with your md5-based hashes is that it needs far more memory
> for expire.  Much more than a small hobby swerver needs to have.  If you
> can get away with it, fine, but v3 should work for you.

Er, well, it doesn't when the history file is small....  Or at least it
certainly shouldn't.  Memory usage is proportional to the history file.

Sometimes I really wish that *I* would see some of these duplicate article
problems so that I could actually track them down; having run all sorts of
various versions of INN 2.2, 2.3, and CURRENT since I started helping
maintain INN, I've yet to ever see this happen, even when starting a new
server from a completely empty history file.

I've never used tagged hash, though.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>
Re: Has anyone built INN-2.3.1 on Open BSD?
#50265
Author: Rebecca Ore
Date: Mon, 29 Jan 2001 11:02
33 lines
2850 bytes
Russ Allbery <rra@stanford.edu> writes:

> Charlie Changeable <autocyberretributionmeowbot@plonk.invalid> writes:
> 
> > The problem with your md5-based hashes is that it needs far more memory
> > for expire.  Much more than a small hobby swerver needs to have.  If you
> > can get away with it, fine, but v3 should work for you.
> 
> Er, well, it doesn't when the history file is small....  Or at least it
> certainly shouldn't.  Memory usage is proportional to the history file.

Greg took a look at the dailies and thought things looked normal.  And
it certainly solved the multiple copies problem (and I can look at the
the groups with lynx from pyrophore).  Right now I have 72 meg of RAM
and plan to put in another 32 for 96, and eventually, the news disks
should be running from something more substantial.

> 
> Sometimes I really wish that *I* would see some of these duplicate article
> problems so that I could actually track them down; having run all sorts of
> various versions of INN 2.2, 2.3, and CURRENT since I started helping
> maintain INN, I've yet to ever see this happen, even when starting a new
> server from a completely empty history file.
> 
> I've never used tagged hash, though.

It disappeared when paradoxa's INN was compiled not using tagged
hash.

-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: Has anyone built INN-2.3.1 on Open BSD?
#50269
Author: Russ Allbery
Date: Mon, 29 Jan 2001 12:11
9 lines
1599 bytes
Rebecca Ore <rebecca@ogoense.net> writes:

> It disappeared when paradoxa's INN was compiled not using tagged hash.

I really don't trust tagged hash.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>
Re: Has anyone built INN-2.3.1 on Open BSD?
#50281
Author: Charlie Calipers
Date: Mon, 29 Jan 2001 14:42
24 lines
2748 bytes
:: > It disappeared when paradoxa's INN was compiled not using tagged hash.
:: 
:: I really don't trust tagged hash.

But... but...  it's supposed to work, and it's worked fine for me
(as long as the file sizes don't require 64-bit offsets)!!!

And... now... I'll never know if the patches were what was needed
to get things to work with dbz v3 history.  Unless I reboot this
machine into NetBSD and recompile things for tagged hash and try
it myself.  WAAAAH!!!  Usenet is ruined.

Old-style history is, out of the box, actually a much better
performer than the way the new md5 history is built.  It can be
fixed, but I still don't understand the choice of changing the
mmap options between the original history that I grafted out of
1.8 or whatever, and how it is supposed to be better.  Oh well.

And I see absolutely the expected tagged hash history performance
on the FreeBSD box that has negligible hackery -- I certainly did
not need to make any hacks there to make it work.  Grr.  Curse you
all.  I'll try to resist firing up NetBSD, but if I can't, you all
have only yourselves to blame, right?  I'm warning you.
Re: Has anyone built INN-2.3.1 on Open BSD?
#50284
Author: Russ Allbery
Date: Mon, 29 Jan 2001 15:28
16 lines
2095 bytes
Charlie Calipers <autocyberretributionmeowbot@plonk.invalid> writes:

> Old-style history is, out of the box, actually a much better performer
> than the way the new md5 history is built.  It can be fixed, but I still
> don't understand the choice of changing the mmap options between the
> original history that I grafted out of 1.8 or whatever, and how it is
> supposed to be better.  Oh well.

Yeah, but v3 history isn't the same thing as tagged hash.  Tagged hash is
even weirder.

Need to finish writing a history API so that people can mix and match.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>
Re: Has anyone built INN-2.3.1 on Open BSD?
#50285
Author: Charlie Crunchy
Date: Mon, 29 Jan 2001 15:56
55 lines
4501 bytes
:: Yeah, but v3 history isn't the same thing as tagged hash.  Tagged hash is
:: even weirder.

Okay, I'm being imprecise because I simply have not been able to
wrap my brane around the phrase `tagged hash' in any meaningful
manner.  While referring to v3, v3.2, v6, md5-based, and the like,
all actually mean something to me.  So I know what I'm saying, I
just don't know how to say it.  Kinda like most languages.

A big part of the problem could well be that I was pretending to
actually Have A Life[tm] during the time that the major early
development on INN 2.x happened, and when I returned to the Real
World after a summer of bliss, not only did I encounter such new
and unfamiliar terms as DHCP, but I also missed any discussion of
how tagged hash came to be, and why that name was chosen.

Yes, I know about the traditional dbz (I wasn't around for dbm),
and I also know how its performance with larger text files was
improved by the technique I know as fuzzy offset, where precision
of location in the reference text file is sacrificed for a lower
incidence of false positive hash collisions.  That is something
like v3.3 or 3.2 or both, I do no remember exactly.

And I know how Clayton O'Neill developed the v6 history based on
MD5 hashing, that can be identified by use of two tables in separate
history.index and history.hash files, as opposed to the older .pag
file, in addition to the common history textfile and .dir file with
the glue that holds everything together or something.

And I know how the format has changed with the gradual replacement
of readable plaintext entries with hashed or similar tokens that are
either unreadable or require careful interpretation, although I did
not really follow development of that closely.

But I was somehow under the impression that what is called tagged
hash was basically old v3 dbz plus the fuzzy offset `cheating', and
the tokens, but the basic idea of the .pag table containing the same
text file offsets at positions corresponding to hashes of the text
message ID wasn't much changed.

So, what really would set my mind at ease is to explain just what
`tagged' means, and why it is called `tagged hash' in a way that
actually gives a clue to its functionality.  The way it seems to me
is that `tagged hash' sounds way too much like some management
buzzword that sounds real kewl but is devoid of meaning when you
look at the actual words.

Sure, `fuzzy offset' sounds all cute and cuddly-like, but ugh, `tagged',
sounds like vandalism or else the jingle-jangle of some rabies tags
like you'd find on a DOG, certainly not cute and cuddly-sounding.
Unless I'm somehow biased, not that anything would lead one to suspect
that, oh no, meow

So.  Um, is there something I'm missing that can be explained simply?
Re: Has anyone built INN-2.3.1 on Open BSD?
#50286
Author: Russ Allbery
Date: Mon, 29 Jan 2001 16:22
30 lines
2918 bytes
Charlie Crunchy <autocyberretributionmeowbot@ploonk.invalid> writes:

> Yes, I know about the traditional dbz (I wasn't around for dbm), and I
> also know how its performance with larger text files was improved by the
> technique I know as fuzzy offset, where precision of location in the
> reference text file is sacrificed for a lower incidence of false
> positive hash collisions.  That is something like v3.3 or 3.2 or both, I
> do no remember exactly.

Okay, tagged hash is basically what you're remembering as fuzzy offset,
using the v3 history algorithm (.pag).  v6 doesn't do the fuzzy offset
thing and uses .hash and .index.  Provided *I'm* understanding all this
correctly.

I think it's actually the fuzzy offset bits that are causing the problems,
and not the basic v3 algorithm, but in order to really do any work on
this, one would want to untangle the #ifdef maze in dbz.c, which sort of
requires that history API thingie.

> But I was somehow under the impression that what is called tagged hash
> was basically old v3 dbz plus the fuzzy offset `cheating', and the
> tokens, but the basic idea of the .pag table containing the same text
> file offsets at positions corresponding to hashes of the text message ID
> wasn't much changed.

That's right, yeah.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>
Re: Has anyone built INN-2.3.1 on Open BSD?
#50302
Author: Andrew Gierth
Date: Tue, 30 Jan 2001 01:34
14 lines
2184 bytes
>>>>> "Charlie" == Charlie Crunchy <autocyberretributionmeowbot@ploonk.invalid> writes:

 Charlie> So, what really would set my mind at ease is to explain just
 Charlie> what `tagged' means, and why it is called `tagged hash' in a
 Charlie> way that actually gives a clue to its functionality.

the .pag entries for tagged-hash contain, in addition to the fuzzy
pointer, a few extra bits stolen from the original hash value, this is
called the "tag". Hence the name. This is stuff that has been in dbz
for many years, nothing new.

-- 
Andrew.
Re: Has anyone built INN-2.3.1 on Open BSD?
#50304
Author: Charlie Ka-CHING
Date: Tue, 30 Jan 2001 02:13
35 lines
3660 bytes
::  Charlie> what `tagged' means, and why it is called `tagged hash' in a

:: the .pag entries for tagged-hash contain, in addition to the fuzzy
:: pointer, a few extra bits stolen from the original hash value, this is
:: called the "tag". Hence the name. This is stuff that has been in dbz
:: for many years, nothing new.

Ah, I think the problem is totally in my head then, as the result of
a mistaken assumption I made when encountering the term for the first
time.  As it was a new name, I ASSumed that it was referring to the
new history format (based on md5 hashes), but I still referred to the
different history formats the way that I had when the default was v3.
You know, hey, new name, must refer to the new format.  I went for
quite some time like this before getting any uneasy feeling that what
I was assuming didn't quite match what people were saying, because I
wasn't paying very close attention.

Obviously, when one learns a new language by learning all the wrong
words, that's a lot of damage to be undone.  I'm still damaged.  So,
in a nutshell, that's probably the biggest reason I have a difficult
time with this, that every time I hear it when I'm not consciously
thinking about it, I subconsciously attach the name to the wrong type
of history, with half a year of Real Life missing, during which I might
have been able to learn things right, a couple years back.  Not helped
much by the fact that Clayton's MD5 work introduced a new history.HASH
file, kinda like the `hash' in `tagged hash', plus the .index file that
I assumed bore some relation to the `tagged' part.

Truly an unfortunate sequence of events that has traumatized me and left
me scarred for life, I'd say.  Made worse by the fact that nobody else
understands the terms I use instead.  Rather much like ordinary daily
communication for me, I'd say...

Thanks for the clarification.
Re: Has anyone built INN-2.3.1 on Open BSD?
#50314
Author: greg andruk
Date: Tue, 30 Jan 2001 09:40
30 lines
3011 bytes
Russ Allbery <rra@stanford.edu> wrote:

> Okay, tagged hash is basically what you're remembering as fuzzy offset,
> using the v3 history algorithm (.pag).  v6 doesn't do the fuzzy offset
> thing and uses .hash and .index.  Provided *I'm* understanding all this
> correctly.

You are.  The tagged-hash in INN 2.x is pretty much the same as the
dbz 3.3.2 that appeared in the 1.7-insync series, with the casemapping
and various flush options removed.  Sort of, anyway.  The fuzzy stuff
as it appears in INN 2.x was added later, but contributed by the same
programmer.

Anyway, a diff between the insync and older dbz should help would-be
debuggers to see what's (supposed to be) going on in there.

> I think it's actually the fuzzy offset bits that are causing the problems,
> and not the basic v3 algorithm,

ISTR that there were version skew problems when the patch appeared, so
there may be something as simple as a missing or extra line hiding in
there.

> but in order to really do any work on this, one would want to
> untangle the #ifdef maze in dbz.c, which sort of requires that
> history API thingie.

Waiting for that might be the best bet for anyone wanting to restore
tagged-hash to working condition.
Re: Has anyone built INN-2.3.1 on Open BSD?
#50320
Author: Andrew Gierth
Date: Wed, 31 Jan 2001 06:31
18 lines
2064 bytes
>>>>> "Russ" == Russ Allbery <rra@stanford.edu> writes:

 Russ> Sometimes I really wish that *I* would see some of these
 Russ> duplicate article problems so that I could actually track them
 Russ> down

well, I've just nuked the history and spool on news-in.riddles and
started it from scratch; if it behaves the same way it did when I
first set it up, it should start getting dups sometime tomorrow.

 Russ> I've never used tagged hash, though.

as I said before, I also got tons of dups on some (now-defunct) work
servers, running v6 dbz (on Solaris x86).

-- 
Andrew.
Re: Has anyone built INN-2.3.1 on Open BSD?
#50321
Author: Charlie Creativeblock
Date: Wed, 31 Jan 2001 08:01
49 lines
3810 bytes
:: well, I've just nuked the history and spool on news-in.riddles and

This is just big-8 + uk, right?  And using the defaults, something
like 330k message database size, when initializing?  Just wanna check


::  Russ> I've never used tagged hash, though.
:: 
:: as I said before, I also got tons of dups on some (now-defunct) work
:: servers, running v6 dbz (on Solaris x86).

Okay, you talked me into it.  I had one (1) duplicate on the test
swerver I'm running in more than a month, and that happened cuz I
weren't paying attention and the /news/db directory filled up cuz
of old inodes held open.  After expire ran once yesterday once I
rebuilt dbz *before* restarting the crashed swerver, today's expire
reported none.

If for some reason the database files are not consistent with the
content of the text file, for whatever reason (crashes not followed
by a proper recovery/rebuild would be my guess for most common cause
for most people), then of course there will be duplicates accepted,
for the database files are used to decide if there are dupes, not
the text file at first.

And I grepped through the last three or four months of daily logs
on our full-feed fascist filterbox, which is running FreeBSD, and
tagged hash, no changes made to the dbz k0de in INN-CURRENT from
september, except to add two mmap()/madvise() options that are
available for FreeBSD but not necessarily other systems, that may
improve performance.  This machine has three days history plus one
day, and never has had a duplicate message ID or any other problems
with the size of the database.

I've made minor dbz v3 fuzzy offset tweaks to give more accuracy
with the larger files that usually result in decreased performance,
but not in this case.

This machine in question has also basically run for, um, a couple
months now, and I don't recall it ever crashing.

Naturally, improvements in performance by delaying the synchronization
of the incore database data with the on-disk data require rebuilds
in case of crashes.  Not that I expect Andrew to be having crashes.

So, well, tagged hash Just Works for me every time I've used it.

*shrug*
Re: Has anyone built INN-2.3.1 on Open BSD?
#50322
Author: Andrew Gierth
Date: Wed, 31 Jan 2001 08:15
11 lines
1890 bytes
>>>>> "Charlie" == Charlie Creativeblock <autocyberretributionmeeowbot@plonk.invalid> writes:

 >> well, I've just nuked the history and spool on news-in.riddles and

 Charlie> This is just big-8 + uk, right?

no, news-in is a cancel feeder

-- 
Andrew.
History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50346
Author: Andrew Gierth
Date: Thu, 01 Feb 2001 20:15
22 lines
2365 bytes
>>>>> "AG" == Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:

 AG> well, I've just nuked the history and spool on news-in.riddles
 AG> and started it from scratch; if it behaves the same way it did
 AG> when I first set it up, it should start getting dups sometime
 AG> tomorrow.

OK. No actual dups yet, but there is currently one history entry in
the text file that grephistory can't find, so it would be duplicated
if someone happened to offer it again.

Everything ran OK, including through the point at which the 'can't tag'
error occurs as the text file gets too big, up until the point at which
the .pag started to overflow. So my suspicions of a problem in the
overflow code seem to be confirmed....

now have to dig more deeply and try and find out why that entry isn't
findable.

-- 
Andrew.
Re: History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50349
Author: Andrew Gierth
Date: Thu, 01 Feb 2001 21:31
27 lines
2767 bytes
>>>>> "AG" == Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:

 AG> OK. No actual dups yet, but there is currently one history entry in
 AG> the text file that grephistory can't find, so it would be duplicated
 AG> if someone happened to offer it again.

 AG> Everything ran OK, including through the point at which the 'can't tag'
 AG> error occurs as the text file gets too big, up until the point at which
 AG> the .pag started to overflow. So my suspicions of a problem in the
 AG> overflow code seem to be confirmed....

 AG> now have to dig more deeply and try and find out why that entry isn't
 AG> findable.

ok, here's what's happening. In this .pag file I'm now looking at,
there are currently 8 overflow entries; 3 of them in the first overflow
table (where they should be) and 5 of them in the _SECOND_ overflow table
(which should not be being used). Those last 5 entries are not findable,
the first 3 are.

So it looks like sometimes, but not always, sp->tabno is being incremented
incorrectly. I can't currently see where the problem is, and I'm not sure I
want to devote the time to tracking it down.

-- 
Andrew.
Re: History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50354
Author: Charlie Cryptoworks
Date: Thu, 01 Feb 2001 21:47
27 lines
2752 bytes
:: Everything ran OK, including through the point at which the 'can't tag'
:: error occurs as the text file gets too big, up until the point at which

Hmmm, since I've never seen this, you're seeing something that's new
to me.  (Not sure where you'd be seeing that error either.)


:: the .pag started to overflow. So my suspicions of a problem in the

If your .pag table is overflowing, that means you probably didn't
properly size your database in advance and the defaults weren't
right for you.

Do you have periodic `cat history.dir' contents, along with the
`ls -l history*' outputs of the same time, to show if you're seeing
the expected overflow from an undersized database (which I've been
able to avoid by predicting in advance how large my history files
will end up being), or if you're somehow getting far too many hash
collisions?


:: overflow code seem to be confirmed....

Could be, since I rarely have overflows except for that I note with
far too many history entries, not as a result of terribly-undersized
hash tables...
Re: History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50357
Author: Andrew Gierth
Date: Thu, 01 Feb 2001 22:35
42 lines
3388 bytes
>>>>> "Charlie" == Charlie Cryptoworks <autocyberretributionmeowbot@plink.invalid> writes:

 >> Everything ran OK, including through the point at which the 'can't
 >> tag' error occurs as the text file gets too big, up until the
 >> point at which

 Charlie> Hmmm, since I've never seen this, you're seeing something
 Charlie> that's new to me.  (Not sure where you'd be seeing that
 Charlie> error either.)

The "can't tag" error goes to the error log (rather than syslog) for
some reason, and winds up in the daily report. (In some older versions
it used to spam the error log with one error per incoming article, but
that got fixed; now it only does it once per history open.)

It happens because the text file offsets get sufficiently big that
they no longer fit in the number of bits available. The fuzzyness
can't be increased until the table is rebuilt on the next expire, so
the offsets have to be stored without tags in the meantime.

 >> the .pag started to overflow. So my suspicions of a problem in the

 Charlie> If your .pag table is overflowing, that means you probably
 Charlie> didn't properly size your database in advance and the
 Charlie> defaults weren't right for you.

That was deliberate in this case, because I was trying to reproduce this
problem, but in normal operation it can also happen due to variations in
traffic levels.

 Charlie> Do you have periodic `cat history.dir' contents, along with
 Charlie> the `ls -l history*' outputs of the same time, to show if
 Charlie> you're seeing the expected overflow from an undersized
 Charlie> database

that is exactly what was happening, yes - there were about 349890
history entries in a default (500009) sized pag file, which is about
the right point to start seeing occasional overflows.

-- 
Andrew.
Re: History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50359
Author: Charlie Concatenated
Date: Fri, 02 Feb 2001 03:52
96 lines
6772 bytes
:: The "can't tag" error goes to the error log (rather than syslog) for
:: some reason, and winds up in the daily report. (In some older versions

Okay, makes sense to me (and I still should have seen it), but another
grep of the last four months or however long of daily reports shows
no hits for `tag' other than `*ll*dv*ntage', so I still haven't seen it.


:: It happens because the text file offsets get sufficiently big that
:: they no longer fit in the number of bits available. The fuzzyness

This sounds wrong to me unless I'm misunderstanding fuzzy offset, or
your text file has reached the point where one would see problems no
matter what one does.  (My pained brane is trying to remember if that
would be at 2GB or if people were actually seeing problems at the 1GB
point which I fixed for myself by changing a `long' to an `unsigned
long', but this was years ago, and I'm positive those haX0red k0deZ
are long gone)

It was my understanding that the table entry was composed of the most
significant bits of the offset, and that increasing the bytes available
for the tag decreased the precision of the offset, rather than putting
a limit on the value and therefore file size.  But there is often a
great divergence between what I think, and what I would think if I were
to look at k0de, and the last time I remember actually being able to
look at k0deZ and make sense of them was back in november -- today my
eyes just defocus and wander.


::  Charlie> If your .pag table is overflowing, that means you probably
::  Charlie> didn't properly size your database in advance and the

:: That was deliberate in this case, because I was trying to reproduce this
:: problem, but in normal operation it can also happen due to variations in
:: traffic levels.

Well yeah, but unless you're taking in close to a full feed or not
expiring regularly, I would expect to see your overflow requiring no
more than a single overflow table.  It's when I've done silly things
like run for a week without expiring on a full feed that I see database
files massively larger than the numbers stored in the history.dir file
would lead me to expect.  This can also happen if someone has problems
in expiry and fails to heed them.

Of course, with your particular feed, the normal variations in traffic
seem to be by a factor of five or so...

Now, when I am taking in close to a full feed, I almost universally
have used the md5-based v6 history, using the tagged hash only for the
smaller feeds or smaller text files, even though the performance hit
is not supposed to be as great as before.  Today, with the choice of
not mmap()ing one of the two md5 files and probably other design
decisions I haven't investigated, the performance of the newer history
is actually worse, but I can reach the levels I expect by breaking
these design choices.  So I've never put myself in the situation where
I'd see the same things others see, sorry to say.


:: that is exactly what was happening, yes - there were about 349890
:: history entries in a default (500009) sized pag file, which is about
:: the right point to start seeing occasional overflows.

Right.  Of course, that is, what, 1/4 or 1/5 of a daily full feed at
today's traffic levels, so that anyone who doesn't adjust for this
will see massive overflows after the first few hours.  I think it
should be stressed what the default table size is and what sort of
feed it is appropriate for, and that if you have an extremely small
feed of The Other Places or local hierarchies you will be wasting a
good deal of space, but if you're coming close to a full feed, you
will absolutely want to tune this without exception, for at least a
2 million default if you want expire to be responsible for resizing
the tables, or maybe 10 million or more if you want to avoid as many
overflows as possible before things stabilize.

But what disturbs me is that at such a normal case (unlike, say, when
you have 2 million entries in a table set for two, er, a third of a
million, your overflow entries aren't limited to a single table, and
with a handful of them you already need a second table.  I thought
(not from understanding the k0de, mind you, but from discussion I'd
seen somewhere) that you would need at least ten collisions of the
very same table entry before you'd start needing another overflow
table, and half a dozen entries should certainly be randomly enough
scattered in the first overflow table that you shouldn't even need
to think about a second for quite some time.

I could be gravely mistaken, since I've made no real effort to have
a full understanding of this, but a number of things seem Just Wrong.
Your text file is nowhere near a gigabyte, is it?

I'd be happy to have my misunderstandings pointed out, knowing that
it will require at least a week or more of sleep before there could
be any connection from my eyeballs back into my brane, to know if
the k0deZ actually do what I think, or if what I think is logical.

Of course, I could be sleep-deprived.
Re: History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50360
Author: Andrew Gierth
Date: Fri, 02 Feb 2001 04:28
63 lines
4439 bytes
>>>>> "Charlie" == Charlie Concatenated <autocyberretributionmeowbot@plonk.invalid> writes:

 [can't tag]
 >> It happens because the text file offsets get sufficiently big that
 >> they no longer fit in the number of bits available. The fuzzyness

 Charlie> This sounds wrong to me unless I'm misunderstanding fuzzy
 Charlie> offset, or your text file has reached the point where one
 Charlie> would see problems no matter what one does.

the server I've been testing this on is quite small - when starting
from scratch, the first 'can't tag' happens when the text file gets
to 16M

 Charlie> It was my understanding that the table entry was composed of
 Charlie> the most significant bits of the offset, and that increasing
 Charlie> the bytes available for the tag decreased the precision of
 Charlie> the offset, rather than putting a limit on the value and
 Charlie> therefore file size.

this is not quite how it works

When a new .pag file is built, either initially or during expire, the
dbz code chooses how many bits to allocate to the tag, and how many
bits to drop from the offset. For example, the default (with the 2.2
code that I use) is to allocate 8 bits of tag (one of which is used
for the "tag present" bit) and 24 bits of offset, with no bits dropped.
When your text file reaches 16M, the offsets no longer fit, and so the
subsequent entries are not tagged; the next expire will then adjust
the number of dropped bits, and possibly the number of tag bits, to
try and avoid it happening again. Once the history size stabilises,
the error should no longer occur (and if you correctly predict the
size at initialisation time, it may never occur)

 [overflows]

 Charlie> Well yeah, but unless you're taking in close to a full feed
 Charlie> or not expiring regularly, I would expect to see your
 Charlie> overflow requiring no more than a single overflow table.

only a single overflow table was required - but the code had put
entries into a second overflow table regardless. i.e. the use of the
second overflow table is clearly a bug.

BTW, I'm pretty sure that the dbz in 1.7.2+insync does not display
this problem.

 [...]

 Charlie> But what disturbs me is that at such a normal case (unlike,
 Charlie> say, when you have 2 million entries in a table set for two,
 Charlie> er, a third of a million, your overflow entries aren't
 Charlie> limited to a single table, and with a handful of them you
 Charlie> already need a second table.

It's clearly not possible to need a second table with only 8 overflow
entries in total (especially since MAXRUN seems to be set to 100), and
the fact that the entries in the second table can not be retrieved by
lookups clearly indicates that they should not be there.

-- 
Andrew.
Re: History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50361
Author: Charlie Collision
Date: Fri, 02 Feb 2001 05:21
91 lines
6140 bytes
::  Charlie> It was my understanding that the table entry was composed of
::  Charlie> the most significant bits of the offset, and that increasing

:: this is not quite how it works

I, um, see.   Maybe.

Is it too early to start drinking?  What were they thinking.  Rrrg.
Please tell me this is all a dream, though I was hoping for a rather
better one to actually make catching a few winks worth the while.


:: bits to drop from the offset. For example, the default (with the 2.2
:: code that I use) is to allocate 8 bits of tag (one of which is used
:: for the "tag present" bit) and 24 bits of offset, with no bits dropped.
:: When your text file reaches 16M, the offsets no longer fit, and so the

And, um, there is no fuzziness.  So basically tagged hash is rather
a different animal than fuzzy offset v3 dbz, or else I'm misunderstanding
more than I think.

You see, what I would expect is for those 24 bits dedicated to the
offset to be created by taking the 32 bit offset, dropping the last
eight bits (I think fuzzy offset used something like 4 or 5 default
fuzzy bits, tunable in source k0de), and then grabbing a chunk of
text file in size equal to the fuzziness (8 bits here) since the
text record, while not precisely at the offset, should be somewhere
within 2^fuzz bytes of it, or else it's not there at all (as the v3
dbz must refer to the authoritative text file as the definitive
references).

As the v3.whatever fuzzy offset patches were the last I looked in
detail at the source k0deZ, it's quite obvious there has been a big
change that doesn't seem to be well-thought-out or well-implemented
or both.  I need to tenderize my brane a bit to decide whether this
tagged hash is a Good Thing or not, at the moment I can only see it
is Different, Very Different.


:: subsequent entries are not tagged; the next expire will then adjust
:: the number of dropped bits, and possibly the number of tag bits, to
:: try and avoid it happening again. Once the history size stabilises,

Hmmm.  So it seems you have either more hash precision than fuzzy offset,
or offset precision.  No middle ground that the fuzzy offset seemed to
be trying to take.  Tell y'all what -- I'll soak in as much of this
as I can.  Then I'll go out and try to destroy those brane cells with
some breakfast Limfjordsporter and then decide if it's possible for
me to follow this and/or the reasoning behind it.  Now I'm still in
boggle mode and expect to be for a while.


:: only a single overflow table was required - but the code had put
:: entries into a second overflow table regardless. i.e. the use of the
:: second overflow table is clearly a bug.

Definitely b0rken.  IT could be that tagged hash is a sound design
(I'm more concerned by the inefficiency, which will take some sitting
on a park bench contemplating how it does things and why) and it's
only this bug that causes problems.


:: BTW, I'm pretty sure that the dbz in 1.7.2+insync does not display
:: this problem.

Our old reader machine (up until a couple years ago) used this, and
I never saw any problems.  But I'm pretty sure that was pure fuzzy
offset, and none of this tagged hash stuff.  The fuzzy offset is
what I describe, where you have a full 32 (31?) bits of offset, but
only the first x significant bits of that, reflected in the last
numbers in the first line of history.dir.  The remaining y bits are
used for a hint as to whether this might be a false positive hash
collision or not, rather than relying on the filesystem text file
to give that authoritative answer for false positive hits.  If that
makes sense.


:: It's clearly not possible to need a second table with only 8 overflow
:: entries in total (especially since MAXRUN seems to be set to 100), and

Thanks for finding this out.  I might take a stab at the k0dez later
to see if I can make sense of this, but no promises, since I'm not
sure if I had any sleep in the last 30 hours...

Or I could shrug off responsibility to someone else.  Your explanation
of tagged hash is greatly appreciated, and I hope my understanding of
fuzzy offset is right.  I think the big question is what are the
theoretical efficiencies of both, and why one is a better choice.

The brane may be willing, but the eyeballs are weakened.
Re: History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50362
Author: Andrew Gierth
Date: Fri, 02 Feb 2001 05:31
42 lines
2891 bytes
>>>>> "AG" == Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:

 AG> So it looks like sometimes, but not always, sp->tabno is being
 AG> incremented incorrectly. I can't currently see where the problem
 AG> is, 

found it.

At the beginning of search() is this:

    unsigned long taboffset = 0;

which should be

    unsigned long taboffset = sp->tabno * conf.tsize;

Also, further down in search() there's a read() call to read a .pag
entry; if the call fails to read the expected number of bytes,
pagtab.pos is still updated as though that many bytes _were_ read.
The fix is to do something like:

            /* read it */
            errno = 0;
            if (read(pagtab.fd, (POINTER)&value, sizeof(value)) != sizeof(value)) {
                if (errno != 0) {
                    DEBUG(("search: read failed\n"));
                    pagtab.pos = -1;
                    sp->aborted = 1;
                    return(NOTFOUND);
                } else
                    value = VACANT;
                pagtab.pos = -1;
            }
            else
                pagtab.pos += sizeof(value);

I don't know if this second bug is actually causing a problem, I
suspect it is not.

-- 
Andrew.
Re: History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50363
Author: Andrew Gierth
Date: Fri, 02 Feb 2001 05:41
44 lines
3589 bytes
>>>>> "Charlie" == Charlie Collision <autocyberretributionmeowbot@pl0nQ.invalid> writes:

 >> bits to drop from the offset. For example, the default (with the
 >> 2.2 code that I use) is to allocate 8 bits of tag (one of which is
 >> used for the "tag present" bit) and 24 bits of offset, with no
 >> bits dropped.  When your text file reaches 16M, the offsets no
 >> longer fit, and so the

 Charlie> And, um, there is no fuzziness.  So basically tagged hash is
 Charlie> rather a different animal than fuzzy offset v3 dbz, or else
 Charlie> I'm misunderstanding more than I think.

you're definitely misunderstanding. The fuzziness only starts when
your pag file has been built based on a large enough text file. It
starts by assuming no fuzziness is needed, and adds more as required
to make things fit.

The version in 1.7.2+insync1.1d does exactly the same thing AFAICT.

 >> BTW, I'm pretty sure that the dbz in 1.7.2+insync does not display
 >> this problem.

 Charlie> Our old reader machine (up until a couple years ago) used
 Charlie> this, and I never saw any problems.  But I'm pretty sure
 Charlie> that was pure fuzzy offset, and none of this tagged hash
 Charlie> stuff.

The dbz in 2.2, compiled for tagged-hash, is not quite the same code
as the 1.7.2+insync version (it lacks the overflow bug which I've just
found and stomped on, see other post), but it works in more or less
exactly the same way.

 Charlie> The fuzzy offset is what I describe, where you have a full
 Charlie> 32 (31?) bits of offset, but only the first x significant
 Charlie> bits of that, reflected in the last numbers in the first
 Charlie> line of history.dir.  The remaining y bits are used for a
 Charlie> hint as to whether this might be a false positive hash
 Charlie> collision or not,

this hint is the "tag" in "tagged-hash"...

-- 
Andrew.
Re: History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50364
Author: Charlie C0debase
Date: Fri, 02 Feb 2001 07:02
86 lines
6238 bytes
::  Charlie> I'm misunderstanding more than I think.

:: you're definitely misunderstanding. The fuzziness only starts when
:: your pag file has been built based on a large enough text file. It

I believe you.  I wanted to check this out by actually looking at
sysuh's patches, but it appears that apart from the 1.5+CNFS INN
that I'm using, all INN source prior to 2.x has been deleted from
all the production machines here.  I thought we had an archive
somewhere but I can't remember where it is.

And a casual web search revealed two things -- the only link to
the source I found is dead, I have been mistaken in my references
to the dbz version numbers, and I probably should shut up and become
a philosopher instead of trying to do anything technical.

I have often referred to dbz v3.2 when I really meant the newer
dbz versions.  v3.2 is what was provided by default with the INN
1.4-upwards series.

The fuzzy offset k0de appears to actually be v3.3.1, that I've
probably called a number of different things over the last month.
There is a v3.3.2 as well, that apparently fixed problems I wasn't
seeing with v3.3.1.  And a v3.3.3.  And a v6.1.1.  Yay, I have been
able to find these source k0dez, so I'm going to look at them now
and see if your explanation matches the k0dez better.  I'm not a
programmer and never have been...

Anyway, I think I see where my misunderstanding has arisen -- I've
keyed into the default 4 MAXDROPBITS that are the fuzz of the fuzzy
offset.  Later come the definitions of 24 for TAGSHIFT, and related
defines, but at the time I was looking at the k0deZ, I couldn't
comprehend what this did and therefore I ignored this part.  I also
may have used `NOTAGS' when building, I do no remember.  In any case,
16MB is well undersized for any swerver I've had my hands on, so I've
probably never had much to do with this.

It's amazing how much I've managed to forget in three years.

There are quite a few changes from the default v3.2 dbz definitions
that the v3.3.3 source I'm looking at have, that for some reason
that boggles me appear to have been rolled back in the current
source.  For example, your text file size was built for 1/3 of a
million entries; this source has a define that would have given
you 1/2 million entries in a default table, and that was three
years back and usenet hasn't shrunk much since then.

Secondly, this code adjusts the size of the database tables upwards
from the old 3/2 (or your 500009 count -> 1/3 million entries) up to
4/2 or 2/1.  This means it uses more memory, but, as I've been griping
without much response so far aside from a few new killfile entries,
should make hash collisions less likely with larger tables.  I believe
that in the v3+fuzzy-offset k0deZ I played with, that I experimented
with adjusting this value to somewhere between 3/2 and 4/2, to try to
find a tradeoff between memory efficiency and lack of overflows.  But
this was years ago and I've forgotten most of my sordid past.

Is is worth revisiting the default hash table sizes to start out
with better-suited files (better incore performance without overflows)
or at least to guide the user towards a wiser `makedbz -s ###' choice
for initializing history, perhaps by several pre-defined defaults one
can choose from the commandline for full-feed transit, or tiny hobby
swerver?  And what about table overflows that happen with larger files?
Hmmm.


:: The version in 1.7.2+insync1.1d does exactly the same thing AFAICT.

So I see, I just never grasped the tagged part of things.  I'm bad at
reading source.  It greatly helps if I have some overview explanation
to guide me and at least point me in the right direction.  No wonder
that they fired me as a bumbling incompetent boob.


I still maintain that history needs work, even now that you've stomped
on the fatal bug, for which we are grateful.  If only to optimize
things a bit better for performance, since it seems the greatest source
of gripes I'm seeing these days are about poor performance, and you
really need to know in advance what you need to do to solve this, or
else do the usual wait for ten days that people believe is needed for
things to stabilize (three weeks if you make config choices like I have)


That doesn't negate my need to find a park bench and wax philosophical
over a couple pints of stiff double stout.
Re: History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50365
Author: greg andruk
Date: Fri, 02 Feb 2001 07:36
19 lines
2541 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote:

>     unsigned long taboffset = 0;
> which should be
>     unsigned long taboffset = sp->tabno * conf.tsize;

This one was already stomped in the 2.4 tree, so there must still
be something else :/

(There is something about how sp->place gets assigned that bothers me.
It looks like something is being left out there.  But it's also 2:30
am, so....)

> Also, further down in search() there's a read() call to read a .pag
> entry; if the call fails to read the expected number of bytes,
> pagtab.pos is still updated as though that many bytes _were_ read.

This one is, however, still unfixed in the current k0dez.
Re: History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50368
Author: greg andruk
Date: Fri, 02 Feb 2001 08:22
10 lines
2055 bytes
greg andruk <gja@meowing.net> wrote:

> This one was already stomped in the 2.4 tree, so there must still
> be something else :/

Never mind, actually that one was still outstanding.  Staring at the
wrong line, sorry 'bout that.

Now to go play and see what happens.
Re: History dups (was: Re: Has anyone built INN-2.3.1 on Open BSD?)
#50388
Author: Russ Allbery
Date: Sat, 03 Feb 2001 20:28
26 lines
2380 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:
>>>>>> "AG" == Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:

>  AG> So it looks like sometimes, but not always, sp->tabno is being
>  AG> incremented incorrectly. I can't currently see where the problem
>  AG> is, 

> found it.

> At the beginning of search() is this:

>     unsigned long taboffset = 0;

> which should be

>     unsigned long taboffset = sp->tabno * conf.tsize;

> Also, further down in search() there's a read() call to read a .pag
> entry; if the call fails to read the expected number of bytes,
> pagtab.pos is still updated as though that many bytes _were_ read.

Thanks!  These have both been fixed in CURRENT and STABLE.

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