🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.free.newsservers
Article #116385

Re: Tor forcing servers to fall off the top of the world?

#116385
From: Curt Welch
Date: Mon, 29 Jun 2009 19:42
256 lines
14771 bytes
VanguardLH <V@nguard.LH> wrote:
> Whiskers wrote:
>
> > VanguardLH wrote:
> >>
> >> Would there be a problem if the NNTP server *did* overwrite the MID
> >> header with one that it generates?
> >
> > Yes.

I think some servers have done that in the past even if it is a problem.
It only creates minor problems if you do it.

> And why?

Because it's been a standard in NNTP to allow clients to generate there own
Message-IDs for a very long time and as result, some clients take advantage
of that fact in different ways.  You would break any client which did so.
Such as checking to see if the message shows up on the server by trying to
fetch it with the Message-ID the client put on the Article.  Some people
put unique personal markers in the message-ids which makes it easier to
find followups to their articles.  Some binary posting systems put id
information in the message id.  Some ideas have been proposed to put binary
file hash values in the message-ids.

> How is uniqueness guaranteed by multiple clients who are generating
> their own MIDs and who use the same FQDN but are submitting their posts
> to different NNTP servers?  For users of the same NNTP client software
> that can generate its own MIDs, all those users are posting with the
> same FQDN.  These clients are not in a mesh network amongst themselves
> or sharing a database where they check that the MID they generate has
> not been used by another client using the same FQDN.  Those clients
> can't determine their generated MIDs are globally unique.  Seems like
> MID collisions are inevitable, so who handles them?

Uniqueness can never be guaranteed.  That's just a fact of distributed
systems.  If two people posted with the same ID nothing really bad happens.
It just means that no server will get  both messages.  Every server has
one, or the other, but not both.  Whichever they receive first, is the one
they get a copy of.  So it just means the articles fail to correctly
propagate to all servers, and if anyone started to reference the article by
Message-ID they might not get the article they thought they were getting.

This is Usenet.  There is no expectation of perfect propagation of all
articles.  Articles get dropped, or rejected, all the time.  1000's of
articles get rejected and dropped on a typical server every day.  But they
are dropped because they are invalid or odd in some way, so the "good
stuff" never gets dropped.

The trick is not to assume we MUST create uniqueness in Message-IDs because
we can't.  The truth is that the real goal is to reduce the probability of
a duplicate to such a small number, that it no longer becomes significant.
That is, we have so few collisions, that no one even notices when they do
happen.

That as it turns out, is very easy to do, and that's exactly what the
clients that share the same FQDN do.

You make that work by first adding bits to the message-id to indicate the
current time (as best you know it), then you simply add random bits.  The
more random bits you add, the more you reduce the expected time between
collisions.  It's easy to reduce the expected time between collisions to
over 100 years at which point the error rate is no longer significant
because other forms of erros that prevent proper propagation become larger
(like hardware failures).

> Since peering is not instantaneous across all peered NNTP servers, and
> because clients could generate the same MID but post to different NNTP
> servers, how is the collision handled when an NNTP server does get
> around to peering with the other NNTP servers?

It's not handled.  It doesn't need to be handled.

> RFC 3977:
> If the server does not have any way to determine a message-id from the
> article itself, it MUST synthesize one.
>
> Sure seems like the NNTP server is allowed to generate its own MID even
> if one was included by the client (but which the NNTP server couldn't
> determine what it was).

That's a silly argument. :)

The headers are exactly defined.  Either the article is valid, and it
includes a message-id, it valid, but doesn't include a message-id, or it's
invalid.  There is no way possible for it to be valid and "the server not
know if the message-id is there".  That's just silly.

> So why can't the NNTP server be made blind to
> client-generated MIDs so they generate their own?

As I said, some have in the past. It's just not the standard however.  It
works without causing major issues, but some features of some clients that
worked on other servers, would not work on a server which replaced the
Message-Id with it's own.

> It wouldn't be blind
> to the NNTP servers to which it peers but it seems it could be blind to
> MIDs in messages from clients (which would include users running their
> own leeching servers, like Hamster).  It seems obvious that an NNTP
> server would know with who it peers versus clients submitting posts to
> it (which would include users running their own servers).

People have, in the past, made the error of trying to feed articles to a
peer using the POST command.  That's wrong on many levels for many reasons
(mostly subtle - but all very important).  It happens when someone tries to
use a user account to act like a peer where they fetch articles from one
place (like an email list) and inject them into Usenet with a Post
command).  These techniques are dangerous and have caused nasty problems
multiple times on Usenet in the past when they end up creating loops.  If
one person feeds from an email list to Usenet, and some other idiot then
tries to feed from Usenet, back to the email list, and they assume
duplication will be prevented by Message-ID, then the minute some system in
the path decided to change the message-id (as you are suggesting) it
creates a loop which causes the same article to keep getting reposted to
Usenet over and over and over - each time getting a new Message-Id.

Not overriding the Message-ID supplied helps reduce that nasty problem (but
the people setting up the cross feeds should be shot first).

> Do collisions always result in a rejection of the message?  If so, which
> message gets rejected: the one on the NNTP server which is peering
> elsewhere or the article from other NNTP server to which it is peering?
> I saw mention that mail2news gateway might have to invent a new MID when
> they detect a collision.  That isn't something an NNTP server (as a
> non-peered client) can do, too?

Peering is fairly simple in theory (though the implementation actually gets
very tricky).  The sending side offers the article by sending the
message-id.  The receiving side then checks to see if it already has that
message-id.  If it does, it sends back a response saying it doesn't what
the article.  If it doesn't, then it sends back a response saying it does
want the article, and then the sending side sends it.

If two articles were posted with the same Message-Id, it would simply be a
race to see which article gets to which servers first.  Whichever article
gets there first, is the one that server gets a copy of.  So we would just
end up with a situation that ever server has one aritlce or the other, but
none have both.

> How does a server get notified there is a collision?

The servers never notice there was a collision.  Nobody gets notified there
is a collision.  For the most part, no one would notice it happened.  To
notice it, you would have to check every article on one server, against
every article on another, to see if you had two with the same Message-Id.
Nobody normally does anything like that because for the most part, it's a
total waste of time.

Only if someone had access to many servers, and took the time to carefully
compare articles, would they notice it.

> Is that when it
> attempts to post to another server?

We don't call it "post" when we are feeding articles to a peer.  We call it
feeding an article. It's done the NNTP command IHAVE or with CHECK and
TAKETHIS.  Those commands are configured to only work on a server which is
talking to a peer.  They don't work for normal end user connections.

New articles get added to Usenet by end users with the POST command.

If a user provides a message-id, it is checked to see if the message-id
already exists on the server.  If it does, the post is rejected and the
user that sees an error message.  Servers only keep track of the
message-ids they have seen recently (what's in their spools and sometimes
for a bit longer).  How long that is depends on teh server.  It might be
only hours, or might be a year.

Small articles like text articles move though the major server very
quickly, (bounces around the world a few times in less than a second).
Large binary posts move much slower.  None the less, most servers get
copies very quickly.  This means that if you try to create a dup by posting
to two servers with the same Message-Id, you have to do it within a second
or two most the time or else the slower message gets rejected before it's
even posted to the first server.

It's hard to even intentionally create a dup that way.

However, it's easy to find a message-id from a very old article, and then
post a new message with the same message-id as the old one.  That in
general works just fine, but now we don't have historical uniqueness which
creates issues for archives.  It's just not nice. :)

> Is it just a rejection error or is
> a specific error returned to notify the sending server that their
> article has been rejected due to a MID collision?

MID collision is the norm.  It's not an error.  You expect to be offered
messages you already have copy of from another peer.

The return status is just "I already have it, you don't need to send it to
me."

The server has no clue (and no way of knowing) that the article being
offered is actually a different article with the same message-id.

> In either case, why
> can't the sender generate a new MID to workaround the rejection?  A
> server might but I can see clients (like Forte Agent) might not be able
> to do this (but then the cure for those clients would be to NOT generate
> their own MIDs).

The server must never generate a new MID on a reject. That would cause the
same article to be duplicated over and over and over.

See how that works?  Server A gets the article from a POST command and
offeres it to peers B and C, who both take a copy of it.  Peer B offers it
to C who says "I alrady have the MID".  Peer C offers it to B who also says
"I already have it".  Now peer B assigns a new MID and sends it to C.   C
takes it.  But now it's got two copies of the same article, with different
message ids.  So now the article shows up twice in the newsgroup it was
posted to.

Peer C also assigns a new Message-ID to it, and sends it to B.  Now B has
two copies of.

B and C send their new copies to A.  A takes it because it's never seen
those MIDs.  Now A has three copies of the article with 3 different MIDs.
A offers those to B and C.  They reject them because they already have
them.  A makes up new MIDS and sends to the B and C, ...

Within seconds, the servers are flooded with 1000s of copies of the same
article all with different message-ids.  And it's just getting worse and
worse as each server keeps making more and more copies of the articles as
their peers reject them based on the old MID.

Servers should never change the MID of an article or else all chose breaks
out.  And that's part of why they also shouldn't do it for what should be
new articles given with a POST command.

> NNTP servers can always place restrictions or requirements on clients,
> like using SSL to connect, which port to use, max connects per day
> (Motzy allows 1200), max posts per day (AIOE allows 25), or other setup.
> So why can't an NNTP server stipulate that it will ignore MIDs generated
> by its clients and use its own?

NNTP serves can do anything the guy who owns the server want's it to do.  I
can make my server spot all of your articles, and add a line to the bottom
that says "I just wanted to add this line here to show I could do it".  But
if my server causes problems on Usenet for other admins, and for users,
then great pressure will be placed on my by the community to fix it.

If you want to run a server and have it add it's own message-ids you can do
that.  But expect that some users won't want to use your server because of
the fact you do that.  And you run the risk of some user trying to do a
feed from some other place to Usenet though your server, and if you change
MIDs it might cause a flood problem.  But as long as you are quick to spot
such a problem and put an end it, you can do it.

But it's not the standard, and it's not the standard for fairly reasonable
reasons.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Technical Details
Message-ID: <20090629154035.486$SQ@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.freenet.de!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!transit3.readnews.com!textspool2.readnews.com!textspool1.readnews.com!news-out.readnews.com!postnews3.readnews.com!nr5-q1.newsreader.com.POSTED!not-for-mail
References: <007fb4b5$0$5751$c3e8da3@news.astraweb.com> <h27shk$303$1@news.eternal-september.org> <80d48omo3d.fsf@banana.shacknet.nu> <h297vn$4h6$1@news.eternal-september.org> <slrnh4he5q.hoe.catwheezel@ID-107770.user.individual.net> <h2aumc$7nh$1@news.eternal-september.org>

Show Full Headers
Complete Article Headers
Message-ID: <20090629154035.486$SQ@newsreader.com>
Subject: Re: Tor forcing servers to fall off the top of the world?
Date: Mon, 29 Jun 2009 19:42:46 +0000
From: curt@kcwc.com (Curt Welch)
References: <007fb4b5$0$5751$c3e8da3@news.astraweb.com> <h27shk$303$1@news.eternal-september.org> <80d48omo3d.fsf@banana.shacknet.nu> <h297vn$4h6$1@news.eternal-september.org> <slrnh4he5q.hoe.catwheezel@ID-107770.user.individual.net> <h2aumc$7nh$1@news.eternal-september.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.freenet.de!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!transit3.readnews.com!textspool2.readnews.com!textspool1.readnews.com!news-out.readnews.com!postnews3.readnews.com!nr5-q1.newsreader.com.POSTED!not-for-mail
Organization: NewsReader.Com
Newsgroups: alt.usenet.news-server-comparison,alt.free.newsservers
X-NRC-Trace: NewsReader.Com HOJr-BNBfy@Vk/2_pxpxgoQtHq3+U3HP9Fa25DCbFuwz+xLt
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,
 ?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 256
NNTP-Posting-Host: a14baf4c.nr5-q1.newsreader.com
X-Trace: DXC=j9Bd<2CQLL\D^Z59l5AO@ZbgZaH`e<A[YZ?:i9<JJBS^Z=]<hU`DWlYiJ;
 iV2YAoGU`EjQ?h??bmSiBDhdN<<4g\
X-Complaints-To: abuse@newsreader.com