🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #5413

inn vs overchan race condition

#5413
From: Rahul Dhesi
Date: Thu, 29 Feb 1996 00:00
45 lines
2657 bytes
I have noticed a slight race condition as described below.  This is
mentioned here because I don't recall this observation being made
before or mentioned in the inn FAQ postings.

1. inn receives an article, installs it, updates max field in active file,
   and feeds article headers to overchan
2. user's News reader sees updated max field in active file but no
   matching entry in .overview file;  assumes article has expired
   and marks it as read
3. overchan now appends line for said article to .overview file
4. the next time the same user reads the same newsgroup, he will not see
   said article, because it is marked read

I have experienced this race condition when using nn (installed to read
News directly from the spool, not via nntp).

Four possible solutions:

1.  Modify all News readers such that the last consecutive n missing
articles in any newsgroup's numeric sequence will not be marked read,
so they will be looked up again the next time around.

2. Or modify News readers so the last consecutive n missing articles in
a newsgroup's numeric sequence will be remembered as 'not found' rather
than 'read', until a second subsequent attempt still fails to find
them, and then they will be moved into the 'read' category.

3. Or have News readers use .overview files as the authoritative list
and ignore the min and max fields in the active file.  When using an
nntp client for News reading, one might have to make the nntp server
ignore the active file too and refer solely to the .overview file to
get the article number range.  Just read the first and last lines.

4. Or have inn append article headers to .overview files directly, and
then update the max field in the active file.  I am not sure how this
would impact performance -- some concurrency would be lost, but some
system calls (inn writes to pipe, overchan reads from pipe) would be
saved.

Implementation of these is left as an exercise for the reader. :-)
-- 
Rahul Dhesi <dhesi@rahul.net>
"please ignore Dhesi" -- Mark Crispin <mrc@CAC.Washington.EDU>

Technical Details
Message-ID: <4h3bqt$dm7@hustle.rahul.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <4h3bqt$dm7@hustle.rahul.net>
Subject: inn vs overchan race condition
Date: Thu, 29 Feb 1996 00:00:00 +0000
From: Rahul Dhesi <dhesi@rahul.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 141548784
Organization: a2i network
Followup-to: news.software.nntp
Nntp-posting-user: dhesi
Newsgroups: news.software.nntp,news.software.b