Thread View: news.software.nntp
23 messages
23 total messages
Started by Mateusz Viste
Mon, 06 May 2019 10:52
LIST ACTIVE low & high water limits and wraparound
Author: Mateusz Viste
Date: Mon, 06 May 2019 10:52
Date: Mon, 06 May 2019 10:52
30 lines
2101 bytes
2101 bytes
Hello all, I am playing a little with the NNTP protocol these days, and I have some doubts about the 'LIST ACTIVE' command. RFC 3977 describes LIST ACTIVE as follows: > LIST ACTIVE returns a list of valid newsgroups and associated > information. If no wildmat is specified, the server MUST include > every group that the client is permitted to select with the GROUP > command (Section 6.1.1). Each line of this list consists of four > fields separated from each other by one or more spaces: > > o The name of the newsgroup. > o The reported high water mark for the group. > o The reported low water mark for the group. > o The current status of the group on this server. Unfortunately I was unable to find any description of the low water and high water values - how high are they allowed to grow? Could they wrap over time? From an implementation point of view, this makes me wondering about the numeric type that these marks should be stored... a 16-bit integer is certainly too small, but would an unsigned 32-bit integer be okay? Surely this problem has been tackled many times in the past. Any advice? Mateusz
Re: LIST ACTIVE low & high water limits and wraparound
Author: Urs JanĂźen
Date: Mon, 06 May 2019 14:44
Date: Mon, 06 May 2019 14:44
25 lines
1870 bytes
1870 bytes
In <5cd011d5$0$15174$426a74cc@news.free.fr>, Mateusz Viste wrote: > Unfortunately I was unable to find any description of the low water and > high water values - how high are they allowed to grow? Could they wrap RFC 3977 9.8. | article-number = 1*16DIGIT > over time? From an implementation point of view, this makes me wondering > about the numeric type that these marks should be stored... a 16-bit > integer is certainly too small, but would an unsigned 32-bit integer be > okay? nope, that limit was hit ~10 years ago [<http://www.newsbin.com/motd_archive_2009.php>] | March 31, 2009, 7:30 a.m. | | Newsgroup Article Numbers Pass 32 Bit Threshold... | | We are starting to get reports that the article numbers on some | servers are larger than a 32 bit number can represent. Of course | alt.binaries.boneless is the first one to hit the threshold.
Re: LIST ACTIVE low & high water limits and wraparound
Author: Mateusz Viste
Date: Mon, 06 May 2019 15:18
Date: Mon, 06 May 2019 15:18
31 lines
1990 bytes
1990 bytes
On Mon, 06 May 2019 14:44:37 +0000, Urs JanĂźen wrote: > In <5cd011d5$0$15174$426a74cc@news.free.fr>, Mateusz Viste wrote: >> Unfortunately I was unable to find any description of the low water and >> high water values - how high are they allowed to grow? Could they wrap > > RFC 3977 9.8. > > | article-number = 1*16DIGIT I missed that one, and it is indeed a strong hint. The (strange) limit would be 54-bits then. This will make it hard to implement proper NNTP on limited (16-bit) platforms I guess. > nope, that limit was hit ~10 years ago > > [<http://www.newsbin.com/motd_archive_2009.php>] > | March 31, 2009, 7:30 a.m. > | > | Newsgroup Article Numbers Pass 32 Bit Threshold... > | > | We are starting to get reports that the article numbers on some > | servers are larger than a 32 bit number can represent. Of course > | alt.binaries.boneless is the first one to hit the threshold. Awesome :) Thank you for your pointers! Mateusz
Re: LIST ACTIVE low & high water limits and wraparound
Author: Russ Allbery
Date: Mon, 06 May 2019 16:56
Date: Mon, 06 May 2019 16:56
18 lines
1692 bytes
1692 bytes
Mateusz Viste <mateusz@wont.tell> writes:
> I missed that one, and it is indeed a strong hint. The (strange) limit
> would be 54-bits then. This will make it hard to implement proper NNTP
> on limited (16-bit) platforms I guess.
In practice, I suspect a substantial number of NNTP implementations use a
native int for article numbers and thus will have problems on 32-bit
platforms (although 32-bit platforms are getting scarcer, so the problem
is solving itself that way).
--
Russ Allbery (eagle@eyrie.org) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: LIST ACTIVE low & high water limits and wraparound
Author: news
Date: Sat, 20 Jul 2019 23:22
Date: Sat, 20 Jul 2019 23:22
49 lines
3256 bytes
3256 bytes
Mateusz Viste <mateusz@wont.tell> wrote: > > I am playing a little with the NNTP protocol these days, and I have some > doubts about the 'LIST ACTIVE' command. > > RFC 3977 describes LIST ACTIVE as follows: > > [...] > > Unfortunately I was unable to find any description of the low water and > high water values - how high are they allowed to grow? Could they wrap > over time? From an implementation point of view, this makes me wondering > about the numeric type that these marks should be stored... a 16-bit > integer is certainly too small, but would an unsigned 32-bit integer be > okay? As far as I understand, the RFC requires that an article number is never reused and that new articles have higher numbers than older articles (according to the time the articles are first received on the server). Section 6 requires 31-bit integers to be used for article numbers (and zero is not a valid article number). It would seem to require that they never wrap. (In the case where it is going to wrap because the server has been replaced and the old data has been lost, or whatever other reason it may be, then perhaps, you may wish to notify the users of such a case.) (My bystand program assumes that they never wrap or are reused, and that new articles always have higher numbers than older ones (according to the time the articles are received, not the time they are send), unless the NewNews option is enabled, but the user can alter the data in the client's database if necessary.) My own "sqlnetnews" (server) software and "bystand" (client) software both use 64-bit integers for article numbers, despite what the RFC says. (It won't use zero or negative numbers though.) (However, bystand does not use article numbers at all if the NewNews option is enabled.) Probably I do not expect there will be so many messages that it will exceed the range required by RFC 3977, anyways. In terms of SQL (or at least, SQLite), it would seem to require that AUTOINCREMENT is used in order to meet the requirement specified by the RFC, although my own server instance doesn't use it (but since I do not delete messages, or at least not the newest message, this doesn't matter). (If you configure your own instance, you can configure the database schema however you want, so you can use AUTOINCREMENT if you want to.) -- Note: I am not always able to read/post messages during Monday-Friday.
Why should an RFC be so concerned with implementation details?
Author: J.B. Nicholson
Date: Sun, 21 Jul 2019 04:25
Date: Sun, 21 Jul 2019 04:25
21 lines
1934 bytes
1934 bytes
news@zzo38computer.org wrote: > As far as I understand, the RFC requires that an article number is never > reused and that new articles have higher numbers than older articles > (according to the time the articles are first received on the server). > Section 6 requires 31-bit integers to be used for article numbers (and > zero is not a valid article number). Out of curiosity, why should an RFC be so concerned with implementation details that the RFC specifies how many bits to use for storing an article number? Put differently, is there a practical problem of an RFC explicitly leaving it up to the implementor to decide how to go about using article numbers 1, 2, 3, and so on with no predetermined upper bound if possible? What if a server programmer decided to ignore this bit limit and use a bignum library for numbers exceeding whatever could be handled by the server's CPU natively?
Re: Why should an RFC be so concerned with implementation details?
Author: Russ Allbery
Date: Sun, 21 Jul 2019 04:52
Date: Sun, 21 Jul 2019 04:52
55 lines
3538 bytes
3538 bytes
"J.B. Nicholson" <jbn@forestfield.org> writes:
> news@zzo38computer.org wrote:
>> As far as I understand, the RFC requires that an article number is never
>> reused and that new articles have higher numbers than older articles
>> (according to the time the articles are first received on the server).
That's correct. We talked about it in the working group but ran out of
steam before we came up with any good solution to running out of article
number space.
>> Section 6 requires 31-bit integers to be used for article numbers (and
>> zero is not a valid article number).
> Out of curiosity, why should an RFC be so concerned with implementation
> details that the RFC specifies how many bits to use for storing an
> article number?
I know we talked about this a great deal in the working group, but it's
been a long time, and I don't remember all the details. My recollection
is that it's for compatibility; I think we did some experiments with
widely-used news software and found that interoperability starts to suffer
with articles larger than 2^31 due to the number of clients that used a
signed 32-bit int internally to represent the article number. If the
server returns a larger number, clients may treat it as a negative number
and all sorts of weird things happen.
> Put differently, is there a practical problem of an RFC explicitly
> leaving it up to the implementor to decide how to go about using article
> numbers 1, 2, 3, and so on with no predetermined upper bound if
> possible?
The purpose of an RFC is to describe an interoperable protocol, which
inherently means that it tries to prevent the server from sending
something a client will not understand (and vice versa).
Obviously this is a crappy limit, and we were hoping to do something
better, but doing better probably requires defining a server extension
that warns that larger article numbers are in play, and then thinking hard
about what the backward-compatibility story looks like. It's not a
trivial bit of protocol design.
> What if a server programmer decided to ignore this bit limit and use a
> bignum library for numbers exceeding whatever could be handled by the
> server's CPU natively?
You should expect standard clients to not work with your NNTP server.
--
Russ Allbery (eagle@eyrie.org) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: LIST ACTIVE low & high water limits and wraparound
Author: Doc O'Leary
Date: Sun, 21 Jul 2019 15:32
Date: Sun, 21 Jul 2019 15:32
47 lines
3246 bytes
3246 bytes
For your reference, records indicate that news@zzo38computer.org.invalid wrote: > Mateusz Viste <mateusz@wont.tell> wrote: > > > > Unfortunately I was unable to find any description of the low water and > > high water values - how high are they allowed to grow? Could they wrap > > over time? From an implementation point of view, this makes me wondering > > about the numeric type that these marks should be stored... a 16-bit > > integer is certainly too small, but would an unsigned 32-bit integer be > > okay? > > As far as I understand, the RFC requires that an article number is never > reused and that new articles have higher numbers than older articles > (according to the time the articles are first received on the server). > Section 6 requires 31-bit integers to be used for article numbers (and > zero is not a valid article number). I don’t know what you people are reading, but the version of RFC3977 I have says this in Section 6: Article numbers MUST lie between 1 and 2,147,483,647, inclusive. The client and server MAY use leading zeroes in specifying article numbers but MUST NOT use more than 16 digits. In some situations, the value zero replaces an article number to show some special situation. Note that it is likely that the article number limit of 2,147,483,647 will be increased by a future revision or extension to this specification. While servers MUST NOT send article numbers greater than this current limit, client and server developers are advised to use internal structures and datatypes capable of handling larger values in anticipation of such a change. No mention of bit lengths, and explicit advice to implement a way that handles numbers larger than the current spec supports. Best practice is probably to go with a 64-bit value and accept that any large server/group might be operating out of spec. Either an RFC update is issued, or Usenet continues to fade away as an open standard. -- "Also . . . I can kill you with my brain." River Tam, Trash, Firefly
Re: LIST ACTIVE low & high water limits and wraparound
Author: Michael Bäuerle
Date: Sun, 21 Jul 2019 16:09
Date: Sun, 21 Jul 2019 16:09
42 lines
3013 bytes
3013 bytes
Doc O'Leary wrote: > news@zzo38computer.org.invalid wrote: > > > > [...] > > As far as I understand, the RFC requires that an article number is never > > reused and that new articles have higher numbers than older articles > > (according to the time the articles are first received on the server). > > Section 6 requires 31-bit integers to be used for article numbers (and > > zero is not a valid article number). > > I don’t know what you people are reading, but the version of RFC3977 I > have says this in Section 6: > > Article numbers MUST lie between 1 and 2,147,483,647, inclusive. The > client and server MAY use leading zeroes in specifying article > numbers but MUST NOT use more than 16 digits. In some situations, > the value zero replaces an article number to show some special > situation. > > Note that it is likely that the article number limit of 2,147,483,647 > will be increased by a future revision or extension to this > specification. While servers MUST NOT send article numbers greater > than this current limit, client and server developers are advised to > use internal structures and datatypes capable of handling larger > values in anticipation of such a change. > > No mention of bit lengths, The above number 2,147,483,647 is the value of 2^31 - 1 (31-bit, or the positive range of a signed 32-bit integer). > and explicit advice to implement a way that > handles numbers larger than the current spec supports. Best practice > is probably to go with a 64-bit value and accept that any large > server/group might be operating out of spec. Either an RFC update is > issued, or Usenet continues to fade away as an open standard. But this is for future standards. If a NNTP server reports VERSION 2 protocol, a client is allowed to expect that it gets no larger numbers (as defined above).
Re: LIST ACTIVE low & high water limits and wraparound
Author: Doc O'Leary
Date: Tue, 23 Jul 2019 03:37
Date: Tue, 23 Jul 2019 03:37
31 lines
2506 bytes
2506 bytes
For your reference, records indicate that Michael =?ISO-8859-1?Q?B=E4uerle?= <michael.baeuerle@gmx.net> wrote: > The above number 2,147,483,647 is the value of 2^31 - 1 > (31-bit, or the positive range of a signed 32-bit integer). Like most tech savvy people, I’m well aware of that. It doesn’t change the fact the RFC itself *does not mention that*. The internal representation is rightly left as an implementation detail. I mean, hey, more power to you if you can make a working client/server that just leaves everything in strings. > But this is for future standards. If a NNTP server reports VERSION 2 > protocol, a client is allowed to expect that it gets no larger numbers > (as defined above). But in lieu of that future standard, there should be an agreed upon behavior and/or workaround for the case of a group that grows to exceed the article limit. You’re welcome to propose and implement solutions that remain strictly within the current spec. I maintain Usenet would be better off following the spirit of the spec and allowing the larger numbers. At least up to 16 digits, and then we’ll discuss *that* crisis when we get to it. -- "Also . . . I can kill you with my brain." River Tam, Trash, Firefly
Re: LIST ACTIVE low & high water limits and wraparound
Author: Julien ÉLIE
Date: Tue, 23 Jul 2019 17:21
Date: Tue, 23 Jul 2019 17:21
54 lines
3375 bytes
3375 bytes
Hi Doc O'Leary,
>> But this is for future standards. If a NNTP server reports VERSION 2
>> protocol, a client is allowed to expect that it gets no larger numbers
>> (as defined above).
>
> But in lieu of that future standard, there should be an agreed upon
> behavior and/or workaround for the case of a group that grows to exceed
> the article limit. You’re welcome to propose and implement solutions
> that remain strictly within the current spec. I maintain Usenet would
> be better off following the spirit of the spec and allowing the larger
> numbers. At least up to 16 digits, and then we’ll discuss *that*
> crisis when we get to it.
For what is worth, INN 2.6.3 is currently replying like this:
ARTICLE 1234567890123456
423 No such article number 1234567890123456
ARTICLE 12345678901234567
501 Syntax error in article number
It checks the number of digits when an article is requested, according
to NNTP Version 2 described in RFC 3977:
Article numbers MUST lie between 1 and 2,147,483,647, inclusive. The
client and server MAY use leading zeroes in specifying article
numbers but MUST NOT use more than 16 digits. In some situations,
the value zero replaces an article number to show some special
situation.
article-number = 1*16DIGIT
16 digits corresponds to nearly 2^53.
In August 2008, I tested the injection and relaying of articles with
article numbers above 2^31.
https://lists.isc.org/pipermail/inn-workers/2008-August/016051.html
It fails with an error like "436 Can't store article".
That's how INN behaves (for at least tradspool). Everything works like
expected until article number 2 147 483 647 is reached. Beyond that,
you'll start getting compliant NNTP error responses.
No more articles are accepted in the newsgroup.
--
Julien ÉLIE
« La grippe, ça dure huit jours si on la soigne et une semaine si on
ne fait rien. » (Raymond Devos)
Re: LIST ACTIVE low & high water limits and wraparound
Author: Michael Bäuerle
Date: Tue, 23 Jul 2019 20:57
Date: Tue, 23 Jul 2019 20:57
39 lines
2775 bytes
2775 bytes
Doc O'Leary wrote: > Michael Bäuerle wrote: > > > > The above number 2,147,483,647 is the value of 2^31 - 1 > > (31-bit, or the positive range of a signed 32-bit integer). > > Like most tech savvy people, I’m well aware of that. It doesn’t change > the fact the RFC itself *does not mention that*. Yes, not literally. > The internal > representation is rightly left as an implementation detail. I mean, > hey, more power to you if you can make a working client/server that > just leaves everything in strings. And it's good that the RFC doesn't forbid exotic implementations. > > But this is for future standards. If a NNTP server reports VERSION 2 > > protocol, a client is allowed to expect that it gets no larger numbers > > (as defined above). > > But in lieu of that future standard, there should be an agreed upon > behavior and/or workaround for the case of a group that grows to exceed > the article limit. You’re welcome to propose and implement solutions > that remain strictly within the current spec. To avoid a protocol VERSION 3, maybe as extension: If a server advertises something to define like BIGNUM via CAPABILITIES, a client that can handle large article numbers can negotiate the limit with a corresponding command BIGNUM (client limit as parameter). The server will then clamp to this limit, or its own limit, whichever is smaller. The NNTP protocol driver in my client is written in C90 and uses "unsigned long int" as data type. It would therefore be possible to offer ULONG_MAX for negotiation.
Re: LIST ACTIVE low & high water limits and wraparound
Author: Doc O'Leary
Date: Wed, 24 Jul 2019 03:40
Date: Wed, 24 Jul 2019 03:40
22 lines
2152 bytes
2152 bytes
For your reference, records indicate that =?UTF-8?Q?Julien_=c3=89LIE?= <iulius@nom-de-mon-site.com.invalid> wrote: > It fails with an error like "436 Can't store article". > That's how INN behaves (for at least tradspool). Everything works like > expected until article number 2 147 483 647 is reached. Beyond that, > you'll start getting compliant NNTP error responses. > No more articles are accepted in the newsgroup. That’s good to know. So the de facto workaround seems like it would only be starting a new empty newsgroup. Is there any convention for doing that? Something like appending a .more suffix to expand the hierarchy, perhaps allowing the whole process to be automated and seamlessly hiding the inner workings from most users. -- "Also . . . I can kill you with my brain." River Tam, Trash, Firefly
Re: LIST ACTIVE low & high water limits and wraparound
Author: Doc O'Leary
Date: Wed, 24 Jul 2019 04:13
Date: Wed, 24 Jul 2019 04:13
24 lines
2282 bytes
2282 bytes
For your reference, records indicate that Michael =?ISO-8859-1?Q?B=E4uerle?= <michael.baeuerle@gmx.net> wrote: > To avoid a protocol VERSION 3, maybe as extension: > If a server advertises something to define like BIGNUM via CAPABILITIES, > a client that can handle large article numbers can negotiate the limit > with a corresponding command BIGNUM (client limit as parameter). > The server will then clamp to this limit, or its own limit, whichever is > smaller. I like that idea. It’d probably be cleaner just to allow switching from the 2,147,483,647 limit to the larger 16 digit limit. I’m not sure why the spec gives the two different limits, though. Realistically, most software will either be using a signed or unsigned 32-bit integer to store the article number, or jump up to a 64-bit integer and thereby exceed 16 digits without much fuss. -- "Also . . . I can kill you with my brain." River Tam, Trash, Firefly
Re: LIST ACTIVE low & high water limits and wraparound
Author: Michael Bäuerle
Date: Wed, 24 Jul 2019 08:56
Date: Wed, 24 Jul 2019 08:56
28 lines
2687 bytes
2687 bytes
Doc O'Leary wrote: > Michael Bäuerle wrote: > > > > To avoid a protocol VERSION 3, maybe as extension: > > If a server advertises something to define like BIGNUM via CAPABILITIES, > > a client that can handle large article numbers can negotiate the limit > > with a corresponding command BIGNUM (client limit as parameter). > > The server will then clamp to this limit, or its own limit, whichever is > > smaller. > > I like that idea. It’d probably be cleaner just to allow switching from > the 2,147,483,647 limit to the larger 16 digit limit. I’m not sure why > the spec gives the two different limits, though. Realistically, most > software will either be using a signed or unsigned 32-bit integer to store > the article number, or jump up to a 64-bit integer and thereby exceed 16 > digits without much fuss. The 16-digit limit maybe was intended for the parser. I think Russ can explain the reasons. The potential extension, as described above from the client view, should work for propagation through the network too. Articles with numbers beyond 31-bit may not propagate via current servers. But if (at an arbitrary place in the network) at least one path exists via servers with that extension, the floodfill algorithm can deliver articles to that place.
Re: LIST ACTIVE low & high water limits and wraparound
Author: Julien ÉLIE
Date: Wed, 24 Jul 2019 18:53
Date: Wed, 24 Jul 2019 18:53
23 lines
2266 bytes
2266 bytes
Hi Doc O'Leary, >> It fails with an error like "436 Can't store article". >> That's how INN behaves (for at least tradspool). Everything works like >> expected until article number 2 147 483 647 is reached. Beyond that, >> you'll start getting compliant NNTP error responses. >> No more articles are accepted in the newsgroup. > > That’s good to know. So the de facto workaround seems like it would only > be starting a new empty newsgroup. > Is there any convention for doing that? Not that I know. You could also keep the n latest articles of the newsgroup, renumber them from 1 to n, regenerate overview data, and set the high water mark to n. -- Julien ÉLIE « La grippe, ça dure huit jours si on la soigne et une semaine si on ne fait rien. » (Raymond Devos)
Re: LIST ACTIVE low & high water limits and wraparound
Author: Frank Slootweg
Date: Wed, 24 Jul 2019 19:01
Date: Wed, 24 Jul 2019 19:01
30 lines
2551 bytes
2551 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote: > Hi Doc O'Leary, > >> It fails with an error like "436 Can't store article". > >> That's how INN behaves (for at least tradspool). Everything works like > >> expected until article number 2 147 483 647 is reached. Beyond that, > >> you'll start getting compliant NNTP error responses. > >> No more articles are accepted in the newsgroup. > > > > That?s good to know. So the de facto workaround seems like it would only > > be starting a new empty newsgroup. > > Is there any convention for doing that? > > Not that I know. > You could also keep the n latest articles of the newsgroup, renumber > them from 1 to n, regenerate overview data, and set the high water mark > to n. But doing so would confuse most newsreaders, because they keep the article numbers (or ranges) in their .newsrc (like) files. Renumbering would cause newsreaders to see already read articles again, or, worse, not see new articles, because their article numbers are in the newsreader's already-read range/list. AFAIK, renumbering is Just Not Done, at least not on any decent (text) newsserver. -- Frank Slootweg, News admin in a previous life.
Re: LIST ACTIVE low & high water limits and wraparound
Author: news
Date: Fri, 26 Jul 2019 01:27
Date: Fri, 26 Jul 2019 01:27
32 lines
2444 bytes
2444 bytes
Michael <michael.baeuerle@gmx.net> wrote: > > To avoid a protocol VERSION 3, maybe as extension: > If a server advertises something to define like BIGNUM via CAPABILITIES, > a client that can handle large article numbers can negotiate the limit > with a corresponding command BIGNUM (client limit as parameter). > The server will then clamp to this limit, or its own limit, whichever is > smaller. My own opinion is that is more complicated than it needs to be. My own opinion is, even though it does not strictly follow the specification, to just allow 63-bit numbers, but to not use numbers larger than 31-bits until it is necessary to do so. (If you never reach the 31-bit limit, then there is no need to do anything.) My solution may cause problems with existing clients, but so will your solution or any other possibility, anyways, if there are more articles than there are expected to be. > The NNTP protocol driver in my client is written in C90 and uses > "unsigned long int" as data type. It would therefore be possible to > offer ULONG_MAX for negotiation. My own client and server program both use SQLite, so the "sqlite3_int64" type is used to store the article numbers. The server assigns article numbers consecutively, so until the 31-bit limit is reached, it is not expected to cause a problem. -- Note: I am not always able to read/post messages during Monday-Friday.
Re: LIST ACTIVE low & high water limits and wraparound
Author: Michael Bäuerle
Date: Fri, 26 Jul 2019 08:46
Date: Fri, 26 Jul 2019 08:46
39 lines
2982 bytes
2982 bytes
news@zzo38computer.org.invalid wrote: > Michael <michael.baeuerle@gmx.net> wrote: > > > > To avoid a protocol VERSION 3, maybe as extension: > > If a server advertises something to define like BIGNUM via CAPABILITIES, > > a client that can handle large article numbers can negotiate the limit > > with a corresponding command BIGNUM (client limit as parameter). > > The server will then clamp to this limit, or its own limit, whichever is > > smaller. > > My own opinion is that is more complicated than it needs to be. My own > opinion is, even though it does not strictly follow the specification, to > just allow 63-bit numbers, but to not use numbers larger than 31-bits > until it is necessary to do so. (If you never reach the 31-bit limit, then > there is no need to do anything.) Formally there ist no room for interpretation in the requirement [1][2]: | | Article numbers MUST lie between 1 and 2,147,483,647, inclusive. Using numbers outside this range is not an option for implementations aiming for RFC 3977 conformance. > My solution may cause problems with existing clients, but so will your > solution or any other possibility, anyways, if there are more articles > than there are expected to be. The extension proposed above at least avoids that any existing client will see an article number beyond 2,147,483,647 (and the potential corresponding misbehaviour). If an existing client e.g. crashes with invalid article numbers, this ensures that at least the articles with valid numbers stay usable. ____________ [1] <https://tools.ietf.org/html/rfc3977#section-6> [2] <https://tools.ietf.org/html/rfc2119#section-1>
Re: LIST ACTIVE low & high water limits and wraparound
Author: Michael Bäuerle
Date: Fri, 26 Jul 2019 08:51
Date: Fri, 26 Jul 2019 08:51
14 lines
1951 bytes
1951 bytes
Michael Bäuerle wrote: > > [...] > The potential extension, as described above from the client view, > should work for propagation through the network too. Articles with > numbers beyond 31-bit may not propagate via current servers. But if > (at an arbitrary place in the network) at least one path exists via > servers with that extension, the floodfill algorithm can deliver > articles to that place. This was nonsense, because the article numbers are local to each server (not used for propagation).
Re: LIST ACTIVE low & high water limits and wraparound
Author: Julien ÉLIE
Date: Fri, 26 Jul 2019 18:08
Date: Fri, 26 Jul 2019 18:08
169 lines
7750 bytes
7750 bytes
Hi Frank,
>> You could also keep the n latest articles of the newsgroup, renumber
>> them from 1 to n, regenerate overview data, and set the high water mark
>> to n.
>
> But doing so would confuse most newsreaders, because they keep the
> article numbers (or ranges) in their .newsrc (like) files. Renumbering
> would cause newsreaders to see already read articles again, or, worse,
> not see new articles, because their article numbers are in the
> newsreader's already-read range/list.
>
> AFAIK, renumbering is Just Not Done, at least not on any decent (text)
> newsserver.
Sure. It would be only when you have no other choice (impossibility to go beyond 2^31 as article number, and rename the newsgroup).
FWIW, Ken Murchison once suggested a LARGEGROUP extension:
https://lists.eyrie.org/pipermail/ietf-nntp/2005-July/005720.html
*************************************************
- Servers which support 64-bit (large) article counters advertise a
capability such as 'LARGEGROUP' (or some better named capability).
- Servers always hide (411 response for [LIST]GROUP, ommission from LIST
ACTIVE response) groups which have exceeded the 32-bit article count
from clients until the client tells the server that it can support such
groups.
- A client tells the server that it supports large groups by using the
new keyword 'LARGEGROUP' as an argument to the CAPABILITY command.
- The server can then use the existing response codes for the
[LIST]GROUP and LIST ACTIVE commands.
*************************************************
And Clive Feather a BIGNUM extension:
https://lists.eyrie.org/pipermail/ietf-nntp/2005-July/005802.html
*************************************************
Firstly, let us learn from the past and *not* call this - or make it - a
"64 bit" facility. Hence the new subject line.
For the purposes of this message, I call the proposed extension BIGNUM.
Let's start by defining a bit of notation: {MC} is the largest article
number that the client can cope with, {MS} is the largest article number
that the server can cope with, and {MA} is the largest article number
currently in use in the server. Draft 27 requires that {MC} and {MS} both
be no less than, and that {MA} be no greater than, 4294967295. {MU} is the
minimum of {MC} and {MS}.
Clients normally get article numbers from the server, rather than making
them up out of whole cloth, so that direction is less of a problem. If it
does send a number greater than {MS}, it has violated a MUST and the server
can respond appropriately (probably a 501 or 400).
So, as I see it, we have three problems to address:
(1) How does a server tell a client that it has article numbers greater
than 2^32-1 (or 2^31-1) sitting around?
(2) How does a client tell a server that it can cope with article numbers
greater than 2^32-1?
(3) What does a server do if it has an article number greater than the
client can cope with?
Question 1 is the easiest. In the CAPABILITIES output, the server includes
the label BIGNUM with argument {MS}:
[C] CAPABILITIES
[S] 101 Capability list:
[S] VERSION 2
[S] READER
[S] NEWNEWS
[S] LIST ACTIVE NEWSGROUPS
[S] BIGNUM 9876543210987654321
[S] .
In the absence of this capability, the client assumes {MS} is 4294967295.
Question 2 is also pretty easy. {MC} is sent as a command and {MU} returned
in the response:
[C] BIGNUM 314159265358979323
[S] 202 314159265358979323 is our mutual minimum
[C] BIGNUM 31415926535897932386468
[S] 202 9876543210987654321 is our mutual minimum
Until this command is used, the server assumes {MC} is 4294967295.
We're now left with question 3. The server provides article numbers in the
following places:
211 response from GROUP/LISTGROUP
LIST ACTIVE 215 response content
NEWGROUPS 231 response content
22x response from ARTICLE/HEAD/BODY/STAT/LAST/NEXT
HDR 225 response content
LISTGROUP 211 response content
OVER 224 response content
The division is for a reason. The first three cases report the high water
mark of a newsgroup, and are therefore the first place the problem will
appear. The other four cases are less problematic because a number greater
than {MC} can only appear in four situations I can think of:
- GROUP or LISTGROUP was used with a group whose high water mark is greater
than {MC};
- the high water mark on entry was {MC} but a further article appeared
later;
- the server is sending an article number, rather than 0, when the client
specified a message-ID;
- the client used an article number greater than {MC} as an argument.
The third of these can simply be forbidden, and the fourth is already a
MUST NOT. The other two can be addressed simply by using the generic
response
401 BIGNUM
(possibly with a second argument giving the maximum article number in the
group).
So now we're down to one basic situation: how to report a group with large
article numbers in GROUP, LISTGROUP, LIST ACTIVE, and NEWGROUPS. Here is
what I would propose:
* If the client has not used the BIGNUM command, the server acts as if
the high water mark is 4294967295, except that NEXT fails with 401 BIGNUM
instead of 421 ("no next article").
* If the client *has* used the BIGNUM command, article numbers greater than
the current {MC} are prefixed with a tag (e.g. a plus sign) to indicate
that they are too big.
Thoughts?
----
A couple of bits of syntactic sugar.
I could live with the BIGNUM command *also* being permitted as an argument
to CAPABILITIES:
[C] CAPABILITIES BIGNUM 314159265358979323
though I don't see it as a significant need.
I could also live with a notation like "^31" being allowed, in both
directions, as a synonym for 2 to that power minus 1; that is:
BIGNUM ^40
is equivalent (if my calculator isn't lying) to:
BIGNUM 1099511627775
though, again, it isn't a major issue.
*************************************************
--
Julien ÉLIE
« Tout est dans tout, et réciproquement. » (Pierre Dac)
Re: LIST ACTIVE low & high water limits and wraparound
Author: news
Date: Fri, 26 Jul 2019 20:54
Date: Fri, 26 Jul 2019 20:54
33 lines
2506 bytes
2506 bytes
Michael <michael.baeuerle@stz-e.de> wrote: > > Formally there ist no room for interpretation in the requirement [1][2]: > | > | Article numbers MUST lie between 1 and 2,147,483,647, inclusive. > > Using numbers outside this range is not an option for implementations > aiming for RFC 3977 conformance. That is true. But in any case, article numbers larger than 2147483647 should not be in use until all of the smaller numbers are used. > The extension proposed above at least avoids that any existing client > will see an article number beyond 2,147,483,647 (and the potential > corresponding misbehaviour). > > If an existing client e.g. crashes with invalid article numbers, this > ensures that at least the articles with valid numbers stay usable. Yes, although you may then fail to notice the existence of new articles (unless NEWNEWS is available and is used). So, you may fail to notice that there is even a problem. I also asked on the IRC; I only got one response, which agrees with me. I still think the alternatives such as BIGNUM are more complicated than it should be, and I also think the problems with BIGNUM are even worse (in my own opinion at least) than just using large numbers. There just seem no other way, since otherwise you will necessarily reach a limit. -- Note: I am not always able to read/post messages during Monday-Friday.
Re: LIST ACTIVE low & high water limits and wraparound
Author: Russ Allbery
Date: Fri, 26 Jul 2019 21:01
Date: Fri, 26 Jul 2019 21:01
17 lines
1886 bytes
1886 bytes
news@zzo38computer.org.invalid writes:
> Yes, although you may then fail to notice the existence of new articles
> (unless NEWNEWS is available and is used). So, you may fail to notice
> that there is even a problem.
I think this is the advantage of hiding the group entirely if the numbers
are too large and the client doesn't declare the relevant extension. That
makes the problem obvious.
--
Russ Allbery (eagle@eyrie.org) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
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