🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
4 messages
4 total messages Started by Aioe Sun, 29 Mar 2020 12:53
Wrong output for XPAT command
#88280
Author: Aioe
Date: Sun, 29 Mar 2020 12:53
73 lines
2997 bytes
After tree days spent trying to understand why some of my scripts run into 
some strange errors i've probably found an INN bug.
With INN 2.5.4 *and* 2.6 INN, when a message is posted, XPAT database is 
*not* updated with data about new messages sent by the client until it 
doesn't close the connection used to post articles

-----
$ telnet localhost 119
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
200 control.aioe.org InterNetNews NNRP server INN 2.5.4 ready (posting ok)
group local.test
211 25 1064 1088 local.test
post
340 Ok, recommended message-ID <r5q4sg$has$1@control.aioe.org>
Newsgroups: local.test
From: a@b.c
Subject: TEST 12

amma
.
240 Article received <r5q4sg$has$1@control.aioe.org>
post
340 Ok, recommended message-ID <r5q4t4$has$2@control.aioe.org>
References: <r5q4sg$has$1@control.aioe.org>
Newsgroups: local.test
From: a@b.c
Subject: Re: test

nann
.
240 Article received <r5q4t4$has$2@control.aioe.org>
xpat References 1- <r5q4sg$has$1@control.aioe.org>
221 Header or metadata information for References follows (from overview)
.
head 1090
221 1090 <r5q4t4$has$2@control.aioe.org> head
Path: control.aioe.org!.POSTED!not-for-mail
From: a@b.c
Newsgroups: local.test
Subject: Re: test
Date: Sun, 29 Mar 2020 12:39:32 +0000 (UTC)
Organization: Aioe.org NNTP Server
Lines: 1
Message-ID: <r5q4t4$has$2@control.aioe.org>
References: <r5q4sg$has$1@control.aioe.org>
X-Trace: control.aioe.org 1585485572 17756 127.0.0.1 (29 Mar 2020 
12:39:32 GMT)
X-Complaints-To: abuse@aioe.org
Xref: control.aioe.org local.test:1090
.
xpat References 1- <r5q4sg$has$1@control.aioe.org>
221 Header or metadata information for References follows (from overview)
.
quit
205 Bye!
Connection closed by foreign host.
aioe@gioia:~$ telnet localhost 119
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
200 control.aioe.org InterNetNews NNRP server INN 2.5.4 ready (posting ok)
group local.test
211 27 1064 1090 local.test
xpat References 1- <r5q4sg$has$1@control.aioe.org>
221 Header or metadata information for References follows (from overview)
1090 <r5q4sg$has$1@control.aioe.org>
.
quit
205 Bye!
Re: Wrong output for XPAT command
#88281
Author: Julien ÉLIE
Date: Sun, 29 Mar 2020 13:34
70 lines
3164 bytes
Hi Paolo,

> After tree days spent trying to understand why some of my scripts run into
> some strange errors i've probably found an INN bug.
> With INN 2.5.4 *and* 2.6 INN, when a message is posted, XPAT database is
> *not* updated with data about new messages sent by the client until it
> doesn't close the connection used to post articles

In fact, until you re-enter the group.
I've just tested your scenario, and I confirm the bug.  Thanks for 
having spotted it!

HDR and OVER are also affected.
When giving a range to these commands, INN searches in article numbers 
below its cached high watermark for the selected newsgroup.  When 
posting, it does not update this cached high watermark.  Re-entering the 
newsgoup enters it.
I bet we should add an update to this high watermark after posting. 
I'll have a look.


POST
340 Ok, recommended message-ID <r5q7bg$evo$3@news.trigofacile.com>
Newsgroups: trigofacile.test
From: a@b.c
Subject: Test 2

xpat
.
240 Article received <r5q7bg$evo$3@news.trigofacile.com>

POST
340 Ok, recommended message-ID <r5q7c1$evo$4@news.trigofacile.com>
References: <r5q7bg$evo$3@news.trigofacile.com>
Newsgroups: trigofacile.test
From: a@b.c
Subject: Re: Test 2

xpat2
.
240 Article received <r5q7c1$evo$4@news.trigofacile.com>

XPAT References 1- <r5q7bg$evo$3@news.trigofacile.com>
221 Header or metadata information for References follows (from overview)
.

XPAT References 580- *
221 Header or metadata information for References follows (from overview)
580
581 <r5q765$evo$1@news.trigofacile.com>
.

GROUP trigofacile.test
211 505 7 583 trigofacile.test

XPAT References 580- *
221 Header or metadata information for References follows (from overview)
580
581 <r5q765$evo$1@news.trigofacile.com>
582
583 <r5q7bg$evo$3@news.trigofacile.com>
.


-- 
Julien ÉLIE

« Pourquoi apprendre à calculer la surface d'un losange ? Au cours
   de ma vie, je n'ai jamais compté aucun losange parmi mes
   relations. » (Jacques Sternberg)
Re: Wrong output for XPAT command
#88287
Author: Aioe
Date: Sun, 29 Mar 2020 13:48
5 lines
950 bytes
Il Sun, 29 Mar 2020 15:34:11 +0200, Julien ÉLIE ha scritto:

> In fact, until you re-enter the group.

thank you :-)
Re: Wrong output for XPAT command
#88283
Author: Julien ÉLIE
Date: Sun, 29 Mar 2020 14:11
64 lines
2538 bytes
Hi Paolo,

>> In fact, until you re-enter the group.
> 
> thank you :-)

:-)
Glad that this solution helps to "solve" your issue.
I'll have a look to properly fix it, so that sending GROUP is not necessary.

I've checked the code, and seen another bug when using NEWNEWS.  The 
previously low and high watermarks of a selected newsgroup, if any, are 
lost during a use of NEWNEWS.  INN still knows a newsgroup is selected 
but no longer has article watermarks.



GROUP fr.test
211 18637 4089 43976 fr.test

STAT
223 4089 <flb5i9.2n48.1@fefe4969.163218> status

NEWNEWS trigofacile.test 20200314 000000
230 New news follows
<r5q765$evo$1@news.trigofacile.com>
<r5q78g$evo$2@news.trigofacile.com>
<r5q7bg$evo$3@news.trigofacile.com>
<r5q7c1$evo$4@news.trigofacile.com>
.

STAT
420 Current article number 4089 is invalid

HDR Subject 4000-5000
423 No articles in 4000-5000

LISTGROUP
211 18637 4089 43976 fr.test
4089
8228
11838
23428
[...]
43976
.

STAT
223 4089 <flb5i9.2n48.1@fefe4969.163218> status

HDR Subject 4000-5000
225 Header or metadata information for Subject follows (from overview)
4089   test
.



I'll fix that too, and check other uses of global variables containing 
current low and high watermarks.

-- 
Julien ÉLIE

« Les trois journées de 1830 ont renversé 89. »
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