🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #5362

Re: [INN 1.4unoff3] Small bug in nntpsend + patch

#5362
From: Michael Hucka
Date: Wed, 28 Feb 1996 00:00
61 lines
3540 bytes
>>>>> On 27 Feb 1996, barr@math.psu.edu (Dave Barr) wrote:

  >> The default nntpsend script supplied with INN 1.4unoff3 has a small bug:
  >> it doesn't handle entries in nntpsend.ctl for identical hostnames but
  >> different site names.

  barr> This code is unchanged from 1.4, so this behavior is there too.  I
  barr> don't agree that this is a bug.

  barr> I probably won't integrate this change, as it appears to alter the
  barr> behavior of nntpsend in an incompatible way.

?!? Please elaborate.  I don't understand how this changes the behavior
of nntpsend in an incompatible way -- it changes nothing except the ability
to disambiguate sites that receive multiple innxmit connections.

I also don't understand how you can *not* consider the current behavior a
bug, unless I'm missing something really obvious.  (If I am, I'm sorry.)
Here is my reasoning.  In the stock nntpsend, if a newsfeeds file contains
(e.g.) the following,

  newsxfer.itd.umich.edu/caen\
	:clari.*,!umich.*\
        :Tf,Wnm:

  newsxfer-umich/caen,newsxfer.itd.umich.edu\
	:!*,umich.*\
        :Tf,Wnm:

then the entries for nntpsend.ctl should, logically, be the following, 

  newsxfer.itd.umich.edu:newsxfer.itd.umich.edu::
  newsxfer-umich:newsxfer.itd.umich.edu::

But nntpsend will not do the right thing here.  Why?  Because the lock file
it uses is based on the *hostname* (the second field), not the *site* name.
When nntpsend goes to check if an innxmit process is already running for an
entry in nntpsend.ctl, it checks the file ${LOCKS}/LOCK.${HOST}.  If there
are two entries in nntpsend.ctl to the same hostname, then nntpsend will
always find a lock file for the first entry, and erroneously conclude that
there is already an innxmit process running for the second entry.  Thus, no
innxmit will ever get started for the second entry.

All I'm proposing is that nntpsend be made to use ${LOCKS}/LOCK.${SITE}
instead of ${LOCKS}/LOCK.${HOST}.  That will avoid the problem.  The other
mods that I posted in the patch are simply a logical consequence of this
small change.  

I've been informed via private email by Joe St Sauver (joe@decoy.uoregon.edu)
of one technique (which he attributes to John Milburn) for avoiding the
problem in the current version of nntpsend.  To wit, one can change the case
of the site name in one of the entries.  However, that's a hack.  Doesn't it
make more sense to modify nntpsend to handle this situation cleanly?

I assure you these modifications work fine.  We implemented them over a week
ago, without any ill effects, and without having to change *anything* else.
-- 
Mike Hucka     hucka@umich.edu     http://ai.eecs.umich.edu/people/hucka
University of Michigan AI Lab & EECS Departmental Computing Organization

Technical Details
Message-ID: <82lolo2eoq.fsf@hawk.eecs.umich.edu>
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
References: <82spfwa96l.fsf@robin.eecs.umich.edu>

Show Full Headers
Complete Article Headers
Message-ID: <82lolo2eoq.fsf@hawk.eecs.umich.edu>
Subject: Re: [INN 1.4unoff3] Small bug in nntpsend + patch
Date: Wed, 28 Feb 1996 00:00:00 +0000
From: hucka@eecs.umich.edu (Michael Hucka)
References: <82spfwa96l.fsf@robin.eecs.umich.edu>
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: 141441899
Sender: hucka@hawk.eecs.umich.edu
To: barr@math.psu.edu (Dave Barr)
Organization: University of Michigan EECS, Ann Arbor, Mich., USA
X-attribution: Mike Hucka
Reply-to: hucka@eecs.umich.edu
Newsgroups: news.software.nntp