🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #91025

Re: INN makehistory oddities

#91025
From: Julien ÉLIE
Date: Sat, 28 Oct 2023 20:52
100 lines
5381 bytes
Hi Jesse,

> I performed manual manipulation of a spool by deleting lots of articles from
> tradspool directories and deleted a CNFS buffer containing binaries and junk).
> I removed the history files and overview directory contents, and have been
> running makehistory since 10/12/2023 and it is *still* running...

It takes a bloody long time...  I unfortunately do not have any advice 
to make it run faster except for using the "-s" flag.  I'll respond on 
another message you sent about makehistory and dbz operations.


> The previous overview directory was 67GB and the new one is at 107GB, which
> seems odd because I did not add articles

Maybe the first run of expireover (news.daily) will shrink it a bit, and 
expire articles which should no longer be in the overview data 
(cancelled or removed by a NoCeM notice).


> While watching lsof output against the makehistory PID, I am finding that it
> is scanning the same tradspool folders more than once, but I am not sure if
> that is expected?

When dealing with tradspool, it should indeed treat directories in order 
(tradspool_next() method).  Maybe the behaviour you see comes from 
crossposted articles?  makehistory opens the (hard-linked) file present 
in each directory an article has been crossposted to, and looks at its 
Xref header field to seek the first newsgroup mentioned (considered to 
be the master, and only treats the article when dealing with that first 
newsgroup).


> I also have a couple of "Bad article handle" messages that don't make sense:
> 
> makehistory: tradspool: can't determine class of
> @0500000087B5000000000001390000000000@: Bad article handle

I don't think the "Bad article handle" error is related to this article.
This error is set when SMgetsub() in storage/interface.c is called with 
an article length of 0, whereas the "can't determine class of" error 
occurs only with articles whose length is > 0 in 
storage/tradspool/tradspool.c.

So I bet the "Bad article handle" error corresponds to a previous error, 
and not the one for this article.  Which implies that SMgetsub() did not 
return NULL and therefore that the type of the token does not correspond 
to tradspool.
I am very unsure why it would happen during a rebuild of the history 
file.  Looking at a comment, a modification of the storage.conf file is 
mentioned.  Would it happen that the article stored in tradspool 
according to the rules of your initial storage.conf file has now a 
different rule?


[storage/tradspool/tradspool.c]

     if ((sub = SMgetsub(*art)) == NULL || sub->type != TOKEN_TRADSPOOL) {
         /* maybe storage.conf is modified, after receiving article */
         token = MakeToken(priv.ngtp->ngname, artnum, 0);

         if (art->len > 0)
             warn("tradspool: can't determine class of %s: %s",
                  TokenToText(token), SMerrorstr);
     }



FWIW, I think the code could be improved this way so that it does not 
display an unappropriated error.

-        if (art->len > 0)
+        if (art->len > 0 && sub == NULL)
              warn("tradspool: can't determine class of %s: %s",
                   TokenToText(token), SMerrorstr);



> It seems okay though?
> 
> $ sm -c '@0500000087B5000000000001390000000000@'
> @0500000087B5000000000001390000000000@ method=tradspool class=0 ngnum=34741
> artnum=0 file=/usr/local/news/spool/articles/misc/health/alternative/80128

When the discussed error occurs, the token is computed on the fly with a 
forced class of 0, and belonging to tradspool.  Decoding it with "sm -c" 
will naturally work (and give you the tradspool method, class 0).

The good news is that the token is properly computed, and integrated 
into your history file.
The error of "can't determine class of" should not be displayed in your 
case (if I am right in my understanding of what happened).  It should be 
displayed only when there's a real error, that is to say when SMgetsub() 
returns NULL.  Otherwise, I don't think it matters much.

-- 
Julien ÉLIE

« Dans toute statistique, l'inexactitude du nombre est compensée par la
   précision des décimales. » (Alfred Sauvy)
Technical Details
Message-ID: <uhjsb9$156ko$2@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <uh9s2d$en6m$1@dont-email.me>

Show Full Headers
Complete Article Headers
Message-ID: <uhjsb9$156ko$2@news.trigofacile.com>
Subject: Re: INN makehistory oddities
Date: Sat, 28 Oct 2023 22:52:57 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <uh9s2d$en6m$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: Groupes francophones par TrigoFACILE
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 28 Oct 2023 20:52:57 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="176-143-2-105.abo.bbox.fr:176.143.2.105"; logging-data="1219224"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:7mP5nL0smeE0TvBVLP09k2eLIS4= sha256:sYRkV+KcgECZiPnX/XIX52VmBbRcsPKF6FEH6mhXlIo= sha1:2fxU6UgRU1/gArabks4SminXa6M= sha256:30+k5kSHyUjoNCqHAU8jkzgwOqdKdnjxiuGsbI4i7QU=
In-Reply-To: <uh9s2d$en6m$1@dont-email.me>