🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
5 messages
5 total messages Started by bill davidsen Tue, 26 Jan 1999 00:00
History botch in INN 2.2
#34997
Author: bill davidsen
Date: Tue, 26 Jan 1999 00:00
24 lines
1669 bytes
I have the release 2.2 installed on a small machine, and I'm getting  a
botch in history lookup. If I start with a Message-ID, call it MID_1,
and do a grephistory I get a token, call that TOK_1. If I then feed that
token to sm and grep for Message-ID, I find another, diferent, id call
it MID_2. If I then grephistory on that, I get another token, call that
one TOK_2. If I do sm using that, I once again get MID_2.

so:
  grephistory MID_1 => TOK_1
  sm TOK_1 | grep Message-ID => MID_2
  grephistory MID_@ => TOK_2
  sm TOK_2 | grep Message_ID => MID_2

I totally rebuilt history and overview from the cycbuffs after
installing 2.2, and I was on 2.2-STABLE on this machine before. Like all
AIX machines I have mmap off on everything.

Any clues, suggestions, patches, whatever?
-- 
  bill davidsen <davidsen@tmr.com>  CTO, TMR Associates, Inc
"Too soon we grow old, and too late we grow smart" -Arthur Godfrey


Re: History botch in INN 2.2
#35056
Author: Fluffy
Date: Thu, 28 Jan 1999 00:00
12 lines
1235 bytes
bill davidsen <davidsen@tmr.com> wrote:
>   grephistory MID_1 => TOK_1
>   sm TOK_1 | grep Message-ID => MID_2
>   grephistory MID_@ => TOK_2
>   sm TOK_2 | grep Message_ID => MID_2

Have you checked to see whether the two IDs yield an MD5 collision? 
How both would have sneaked into history is another story, but...
-- 
"Meow."  --me

Re: History botch in INN 2.2
#35057
Author: Fluffy
Date: Thu, 28 Jan 1999 00:00
15 lines
1407 bytes
Fluffy <meowing@banet.net> wrote:
> bill davidsen <davidsen@tmr.com> wrote:
> >   grephistory MID_1 => TOK_1
> >   sm TOK_1 | grep Message-ID => MID_2
> >   grephistory MID_@ => TOK_2
> >   sm TOK_2 | grep Message_ID => MID_2
> 
> Have you checked to see whether the two IDs yield an MD5 collision? 
> How both would have sneaked into history is another story, but...

Oh waitaminute, this is sort of an anti-collision =)  My, that's sick.
-- 
"Meow."  --me

Re: History botch in INN 2.2
#35082
Author: Oezguer Kesim
Date: Fri, 29 Jan 1999 00:00
45 lines
2328 bytes
bill davidsen <davidsen@tmr.com> wrote:

>   grephistory MID_1 => TOK_1
>   sm TOK_1 | grep Message-ID => MID_2
>   grephistory MID_@ => TOK_2
>   sm TOK_2 | grep Message_ID => MID_2

Oh, finally someone else has the same problem!  It's uggly, hum?

Here my analysis 'til now:
	- The message corresponding to TOK_1 has been ovewritten by the
	  message given by TOK_2 -- if the later would be smaller than the
	  older one, you could see same tail of the older.
	
	- Both Tokens only differ in the overview-data part, i.e.  you'll
	  get the appropriate Header lines of each messages, but on a read
	  attempt of the older one, you'll get the later.
	  
	* The very strange thing here is, that both articles belong the
	* same _cyclenumber_.  This should be impossible!

I still do not (fully) understand
	- who is actually writing the history lines
	- whether the token belonging to the older message has been changed
	- whether this has to do with metacyclebuffers, i.e. the problem
	  arises, when you use more than one file for a buffer.

> I totally rebuilt history and overview from the cycbuffs after
> installing 2.2, and I was on 2.2-STABLE on this machine before.

Well, rebuilding doesn't help here, since at the next incoming feed,
articles will be overwritten.


> Any clues, suggestions, patches, whatever?

Not yet.  But hopefully very soon...

-- 
~
~
~
".signature" 4 lines, 50 characters written

Re: History botch in INN 2.2
#35148
Author: bill davidsen
Date: Tue, 02 Feb 1999 00:00
50 lines
3083 bytes
In article <78l1lv$3ta0$1@newssvr03-int.news.prodigy.com>,
bill davidsen <davidsen@tmr.com> wrote:
| I have the release 2.2 installed on a small machine, and I'm getting  a
| botch in history lookup. If I start with a Message-ID, call it MID_1,
| and do a grephistory I get a token, call that TOK_1. If I then feed that
| token to sm and grep for Message-ID, I find another, diferent, id call
| it MID_2. If I then grephistory on that, I get another token, call that
| one TOK_2. If I do sm using that, I once again get MID_2.

The following patch to 2.2 seems to solve the problem. Note that this
does not solve the other 2.2 nnrpd in daemon mode problem I posted
earlier today.


From: thomasm@csl33.csl-gmbh.net

I guess I've found the reason for this behaviour (it happened to me too...):

When rebuilding, makehistory calls repeatedly cnfs_next(), which uses the
current cyclenum of the cycbuff to generate tokens for the history.
But for articles with offset values beyond the cycbuff->free pointer,
this should be cyclenum-1 . If such an article is later overwritten,
the new article gets the same token (it can't be differented by cyclenum),
so the storage manager returns the new article when requesting the old token...

The following one line patch (based on the current httpsync'ed source)
fixes this. Someone on the inn-workers list could please check if it
does this correctly ;-)

*** cnfs.c.orig Tue Jan 12 15:25:07 1999
--- cnfs.c  Tue Jan 26 14:11:43 1999
***************
*** 1628,1634 ****
      tonextblock = CNFS_BLOCKSIZE - (private->offset & (CNFS_BLOCKSIZE - 1));
      private->offset += (CYCBUFF_OFF_T) tonextblock;
      art->arrived = ntohl(cah.arrived);
!     token = CNFSMakeToken(cycbuff->name, offset, cycbuff->cyclenum, ntohl(cah.class), (TOKEN *)NULL);
      art->token = &token;
      if (innconf->articlemmap) {
    offset += sizeof(cah);
--- 1628,1634 ----
      tonextblock = CNFS_BLOCKSIZE - (private->offset & (CNFS_BLOCKSIZE - 1));
      private->offset += (CYCBUFF_OFF_T) tonextblock;
      art->arrived = ntohl(cah.arrived);
!     token = CNFSMakeToken(cycbuff->name, offset, (offset > cycbuff->free) ? cycbuff->cyclenum - 1 : cycbuff->cyclenum, cah.class, (TOKEN *)NULL);
      art->token = &token;
      if (innconf->articlemmap) {
    offset += sizeof(cah);

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