🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
17 messages
17 total messages Started by Mike Schwager Thu, 24 Oct 1991 17:27
XRN exits with Caught signal 11, Sun 4, OS 4.1.1
#777
Author: Mike Schwager
Date: Thu, 24 Oct 1991 17:27
10 lines
1214 bytes
Howdy,
I've compiled xrn6-15 on a Sun 4 machine, with the Motif widgets on.  When
I try to run the xrn, it complains thusly:
	"Caught Signal 11, exiting"
(or something close to that).  So it's not very happy with Motif.  But
if I compile with Motif off, no problem.  Any ideas?  Are my Motif
libraries broken, perhaps?  We have the latest, greatest versions of X11
and Motif- so I'm told (our machines were just upgraded early this
month).
-Mike Schwager
Re: XRN exits with Caught signal 11, Sun 4, OS 4.1.1
#778
Author: Douglas Acker
Date: Fri, 25 Oct 1991 13:53
20 lines
1618 bytes
In article <schwager.688325271@mike.cs.uiuc.edu>, schwager@cs.uiuc.edu (Mike Schwager) writes:
|> Howdy,
|> I've compiled xrn6-15 on a Sun 4 machine, with the Motif widgets on.  When
|> I try to run the xrn, it complains thusly:
|> 	"Caught Signal 11, exiting"
|> (or something close to that).  So it's not very happy with Motif.  But
|> if I compile with Motif off, no problem.  Any ideas?  Are my Motif
|> libraries broken, perhaps?  We have the latest, greatest versions of X11
|> and Motif- so I'm told (our machines were just upgraded early this
|> month).
I see this without Motif Widgets every now and then to .... apply some
memory leak patches helped.
-- 
Douglas L. Acker

Western Geophysical Exploration Products
Systems Engineer

Email (internal):  acker                Phone:  713-964-6128
      (Internet):  dla@se05.wg2.waii.com
Re: XRN exits with Caught signal 11, Sun 4, OS 4.1.1
#803
Author: Mike Schwager
Date: Wed, 30 Oct 1991 18:08
32 lines
2324 bytes
dla@se05.wg2.waii.com (Douglas Acker) writes:

>In article <schwager.688325271@mike.cs.uiuc.edu>, schwager@cs.uiuc.edu (Mike Schwager) writes:
>|> Howdy,
>|> I've compiled xrn6-15 on a Sun 4 machine, with the Motif widgets on.  When
>|> I try to run the xrn, it complains thusly:
>|> 	"Caught Signal 11, exiting"
>|> (or something close to that).  So it's not very happy with Motif.  But
>|> if I compile with Motif off, no problem.  Any ideas?  Are my Motif
>|> libraries broken, perhaps?  We have the latest, greatest versions of X11
>|> and Motif- so I'm told (our machines were just upgraded early this
>|> month).
>I see this without Motif Widgets every now and then to .... apply some
>memory leak patches helped.
>-- 
>Douglas L. Acker

Ok, it gets nuttier and nuttier.  Here's the actual error I am getting,
btw:

xrn: Caught signal (11), cleaned up .newsrc and removed temp files

Now it so happens that one of our professors is using the very same xrn
quite happily.  So I copied his 1622-line .newsrc over to my home dir
and have tried it under my account; it works fine, Motif widgets and all!  
I tried it with my 1516-line .newsrc file- it bombs!  So there's something
about the .newsrc file that is adding to the weirdness.
-Mike
-Mike Schwager                | In the shambles of love they kill only the
Address: schwager@cs.uiuc.edu | best-  Don't run away from this dying.
Band: Poi Dog Pondering       | Whoever is not killed for love is 
DoD: #0301                    | dead meat.    -Rumi
Re: XRN exits with Caught signal 11, Sun 4, OS 4.1.1
#806
Author: Rick L. Spickelmier
Date: Wed, 30 Oct 1991 18:55
17 lines
1284 bytes
You should grab the latest XRN, 6.17beta, which fixes a number of
problems (core dumps, memory leaks, etc).  Once I get some time to
figure out why XRN 6-17beta works just fine on R4 but core dumps
on R5, I'll incorporate a number of new features and bug fixes
and release XRN 6.17...

You can get XRN sources via anonymous ftp from ic.berkeley.edu, in
the directory pub/xrn.

			Rick
-- 
	    Rick L. Spickelmier
	    Objectivity, Inc.
	    800 El Camino Real
	    Menlo Park, CA   94025

	    ricks@objy.com, ricks@berkeley.edu
Re: XRN exits with Caught signal 11, Sun 4, OS 4.1.1
#808
Author: edm Ed Mitchell
Date: Thu, 31 Oct 1991 15:15
16 lines
1454 bytes
	I just finished porting the xrn6-5 to our hp 9000/400 &700's 
	running hpux 8.0 and 8.05. Both died with a signal 11. 
	I traced the problem to a small "feature" in buttons.c line 
	2492 (function adjustNewsgroupWidget() ). In the original code
  	v was declared as a short which made the XtSetArg and XtGetValues
	get very upset. The linking order of the code also made big 
	difference.
		The code seems to work fine now .

  2491          Arg args[1];
  2492          XtArgVal v; /*<<<< was declared as a short */
  2493
  2494          XtSetArg(args[0], XmNvisibleItemCount, &v);
  2495          XtGetValues(Text, args, 1);
  2496          count = v;
Re: XRN exits with Caught signal 11, Sun 4, OS 4.1.1
#809
Author: Lance Speelmon
Date: Thu, 31 Oct 1991 16:41
28 lines
2103 bytes
I still get a signall 11 error when trying to run xrn.  I am trying to
compile on a Sparc 2 / SunOs4.1.1B.

Lance

In article <1991Oct31.151520.20393@news.mentorg.com> edm@mgedmhp. (Ed Mitchell ) writes:
>
>	I just finished porting the xrn6-5 to our hp 9000/400 &700's 
>	running hpux 8.0 and 8.05. Both died with a signal 11. 
>	I traced the problem to a small "feature" in buttons.c line 
>	2492 (function adjustNewsgroupWidget() ). In the original code
>  	v was declared as a short which made the XtSetArg and XtGetValues
>	get very upset. The linking order of the code also made big 
>	difference.
>		The code seems to work fine now .
>
>  2491          Arg args[1];
>  2492          XtArgVal v; /*<<<< was declared as a short */
>  2493
>  2494          XtSetArg(args[0], XmNvisibleItemCount, &v);
>  2495          XtGetValues(Text, args, 1);
>  2496          count = v;

-- 
==============================================================================
| Lance Speelmon                      |  University Computing Services       | 
| lance@caesar.ucs.indiana.edu        |  Network Operations Center           |
==============================================================================
Re: XRN exits with Caught signal 11, Sun 4, OS 4.1.1
#810
Author: Mike Schwager
Date: Thu, 31 Oct 1991 18:18
24 lines
1816 bytes
edm@mgedmhp. (Ed Mitchell ) writes:


>	I just finished porting the xrn6-5 to our hp 9000/400 &700's 
>	running hpux 8.0 and 8.05. Both died with a signal 11. 
>	I traced the problem to a small "feature" in buttons.c line 
>	2492 (function adjustNewsgroupWidget() ). In the original code
>  	v was declared as a short which made the XtSetArg and XtGetValues
>	get very upset. The linking order of the code also made big 
>	difference.
>		The code seems to work fine now .

>  2491          Arg args[1];
>  2492          XtArgVal v; /*<<<< was declared as a short */
>  2493
>  2494          XtSetArg(args[0], XmNvisibleItemCount, &v);
>  2495          XtGetValues(Text, args, 1);
>  2496          count = v;

Nope.  Didn't help.  What I ended up doing was: find out the newsgroups
that are in the .newsrc file of the user that has a working xrn, but are
not in my .newsrc .  Copy those names into my .newsrc, unsubscribed.
Fire up xrn... it works!
-Mike
Re: XRN exits with Caught signal 11, Sun 4, OS 4.1.1
#831
Author: Charlie Dennett
Date: Mon, 04 Nov 1991 18:25
17 lines
1695 bytes
I was running xrn 6.15 under SunOS 4.1.1 and OpenWindows 2.0 with no
problems.  It never core dumped on me.  Earlier I obtained a beta
version of OpenWindows 3.0 and tried using it.  Xrn 6.15, even after
recompilation, was unusable because it dumped core with a signal 11
much too often.  We recently got the official Openwindows 3.0.  I
recompiled xrn 6-15 again and the problem still exists to the same
degree.

I don't have the answer to this.  This is just another point of
reference.  I'll be watching this group to see what happens.
Meanwhile, I'll see if I can get the next version of xrn to see if the
problem still exists.

Charlie Dennett          | Rochester Distributed Computer Services
Mail Stop 01816          | Customer Technical Site Services
Eastman Kodak Company    |
Rochester, NY 14650-1816 | Internet: dennett@Kodak.COM 
xrn taking up lots of memory (was Re: XRN exits with Caught signal 11, Sun 4, OS 4.1.1)
#836
Author: Jonathan I. Kamens
Date: Tue, 05 Nov 1991 02:45
29 lines
2435 bytes
In article <sherman.689246642@foster>, sherman@unx.sas.com (Chris Sherman) writes:
|> *************************************************************************
|> Can anyone tell me why xrn needs so much memory?
|> *************************************************************************

Someone asked me about this in E-mail over the summer (Was it you, Chris?  I
can't find the message in my archives now....), and I couldn't come up with an
answer then, but I was gifted with a bit of inspiration about twenty minutes
ago which might account for the problem :-).

Xrn allocates an array of structures for storing message headers and such in
newsgroups that you read.  The array is (end - start + 1) structures large,
where "end" is the highest number for the newsgroup in your active file and
"start" is the lowest number.

My guess is that you're not running updatemin or whatever it is that updates
the active file, and therefore the low numbers in it do not correspond to the
lowest article numbers in the various newsgroups, so every time xrn allocates
an array of header information structures, it has to allocate some number of
structures that is significantly larger than the actual number of articles
available in the newsgroup.

You need to start running something to update the active file.

-- 
Jonathan Kamens						jik@MIT.Edu
MIT Information Systems/Athena		    Moderator, news.answers
	      (Send news.answers-related correspondence
		  to news-answers-request@MIT.Edu.)
patch for xrn 6.17beta coredumps (Re: XRN exits with Caught signal 11, Sun 4, OS 4.1.1)
#837
Author: Jonathan I. Kamens
Date: Tue, 05 Nov 1991 02:48
128 lines
4198 bytes
The patches below fix two bugs that corrupt the malloc arena and therefore
(potentially) cause coredumps.  I, too, had problems with xrn 6.17beta dumping
core when linked against the R5 libraries, but it has not happened to me since
I applied these patches.

These have both been submitted to the maintainers of xrn, and will presumably
be included in some form or another when xrn is released for real.

*** /tmp/,RCSt1001914	Tue Oct 22 16:10:39 1991
--- buttons.c	Tue Oct 22 16:09:48 1991
***************
*** 2912,2919 ****
      Arg args[5];
      int fildes;
      struct stat buf;
!     static char *olddata = 0;
!     char *data;
  
      if (filename != LastArticle) {
  	LastArticle = filename;
--- 2912,2919 ----
      Arg args[5];
      int fildes;
      struct stat buf;
!     char *olddata;
!     char *data = 0;
  
      if (filename != LastArticle) {
  	LastArticle = filename;
***************
*** 2939,2961 ****
  		XawTextSetSource(ArticleText, ArtSource, (XawTextPosition) 0);
  		XawTextSetSelectionArray(ArticleText, allSelectArray);
  	    } else {
- #ifdef notdef
  		XtVaGetValues(ArtSource,
  			      XtNstring, &olddata,
  			      NULL);
! #endif /* notdef */
! 		if (olddata) XtFree(olddata);
  		XtSetValues(ArtSource, args, XtNumber(args));
  	    }
  #else
  	    /* destroy the old text file window */
  	    if (ArtSource != 0) {
- #ifdef notdef
  		XtVaGetValues(ArtSource,
  			      XtNstring, &olddata,
  			      NULL);
! #endif /* notdef */
! 		if (olddata) XtFree(olddata);
  		XtDestroyWidget(ArtSource);
  	    }
  
--- 2939,2957 ----
  		XawTextSetSource(ArticleText, ArtSource, (XawTextPosition) 0);
  		XawTextSetSelectionArray(ArticleText, allSelectArray);
  	    } else {
  		XtVaGetValues(ArtSource,
  			      XtNstring, &olddata,
  			      NULL);
! 		XtFree(olddata);
  		XtSetValues(ArtSource, args, XtNumber(args));
  	    }
  #else
  	    /* destroy the old text file window */
  	    if (ArtSource != 0) {
  		XtVaGetValues(ArtSource,
  			      XtNstring, &olddata,
  			      NULL);
! 		XtFree(olddata);
  		XtDestroyWidget(ArtSource);
  	    }
  
***************
*** 2981,2987 ****
  	prefetchNextArticle();
  	
  #endif /* XRN_PREFETCH */
- 	olddata = data;
      }
      return;
  }
--- 2977,2982 ----
*** /tmp/,RCSt1001914	Tue Oct 22 16:11:04 1991
--- server.c	Tue Oct 22 15:54:36 1991
***************
*** 973,987 ****
  sendLine(str)
  char *str;
  {
-     int i;
- 
      if (*str == '.') {
! 	for (i = utStrlen(str); i >= 0; i--) {
! 	    str[i+1] = str[i];
! 	}
! 	str[0] = '.';
      }
!     put_server(str);
      return;
  }
  #endif
--- 973,990 ----
  sendLine(str)
  char *str;
  {
      if (*str == '.') {
! 	char *str2 = XtMalloc(utStrlen(str) + 2); /* one for the extra period,
! 						   * and one for the null at
! 						   * the end */
! 	str2[0] = '.';
! 	strcpy(str2 + 1, str);
! 	put_server(str2);
! 	XtFree(str2);
      }
!     else {
! 	put_server(str);
!     }
      return;
  }
  #endif

-- 
Jonathan Kamens						jik@MIT.Edu
MIT Information Systems/Athena		    Moderator, news.answers
	      (Send news.answers-related correspondence
		  to news-answers-request@MIT.Edu.)
Re: xrn taking up lots of memory (was Re: XRN exi
#851
Author: Terry Poot
Date: Wed, 06 Nov 1991 19:24
94 lines
6260 bytes
In article <wGd_ar-@engin.umich.edu>, stealth@engin.umich.edu (Mike Pelletier)
writes:
>>Xrn allocates an array of structures for storing message headers and such in
>>newsgroups that you read.  The array is (end - start + 1) structures large,
>>where "end" is the highest number for the newsgroup in your active file and
>>"start" is the lowest number.
>
>Great idea, let's make the client's efficiency totally dependant on whether
>or not the minimum field of a server's file is updated or not...  Jeez.

If the field is there and is documented as containing the minimum article
number, why should one not assume that it does indeed contain the minimum
article number? Can we assume that the subject line contains the subject of the
message, or might that be elsewhere?

>From my high school computer science class, I know that linked lists are
>more efficient than arrays for large values, and binary trees and hash
>tables are even more efficient -- why in the world was xrn written
>that way?  

Resisting the temptation to provide a very snide answer, let me just say that
the above statement, as far as it goes, is false. The proper data structure to
represent a sequence of objects is dependent on how those objects are acquired,
how they are accessed, whether the number of objects is known in advance, etc. 

Arrays are the most efficient data structure to use for a sequence of objects
whose number and size are known in advance if those objects are to be accessed
randomly. A subscript calculation is much more efficient than chasing list or
tree pointers, or even negotiating a hash table. Those other structures are
better when you need to insert or delete, or search for a key or the number of
objects is not known in advance. None of these is the case with this
application.

>Memory ought to be allocated on an as-needed basis!  Why allocate
>40 megs if someone's going to read five articles in three groups?  An even
>better question is why allocate 40 megs AT ALL?

Most news readers want to show you the list of articles with subjects and
generally a little more info, so you can select the article to read. To do this,
it must have headers of all the articles. Since NNTP purports to supply the
minimum and maximum article numbers, the most logical and efficient way to do it
is allocate an array of headers and then get them from NNTP. 

The bug here is that NNTP lied about the minimum article number. If xrn thinks
it is going to have to display 5000 subject lines in the subject window, it has
no choice but to allocate room for that many headers. You don't really want to
wait for it to get them from NNTP every time the user scrolls the subject
window. Granted, it could keep some maximum number of headers and get a new set
only when the user scrolled over that boundary. I suspect this wasn't done
because most people don't commonly bring up a group with an incredible number of
headers.

>>You need to start running something to update the active file.
>
>That's an assumption that the client *should not* make.

The client should be allowed to assume that the data provided by NNTP is
correct. After all, what choice does it really have? If the minimum field in the
active file is not going to be correct, NNTP should use some other method to get
that data. The whole purpose of a separate interface layer such as NNTP is to
insulate the client from quirks in the server. (My NNTP server doesn't even HAVE
an active file!)

The easy fix, in this case, is to periodically run the program the corrects the
active file. I believe Henry Spencer recently stated this was going to be the
default in future versions of C news. The hard fix is for the NNTP server to
realize that it can't rely on the active file for this piece of information, and
actually go out and check the directory to see what the lowest article is. 

Arguments about whether this is a C news or NNTP problem are beyond the scope of
what an NNTP client should have to worry about. All it sees is NNTP, and the
interface for NNTP should have absolutely nothing to do with underlying
implementations. The numbers it gets from NNTP are all it can see, so they
should be right. Whoever is at fault in them being wrong, it is clearly not
xrn.

>I don't mean this to sound like a personal attack or anything like that,
>and I have no beef with the person who made this design decision, and I'd
>be willing to consider an explanation of why it operates this way.  It
>just seems stupid to me.

It seems perfectly logical and correct to me. It could maybe be better by
keeping a rolling buffer of a maximum number of headers, and getting ranges of
headers when the user scrolls out of the buffer. Of course, if you've got the
memory, you wouldn't want to wait for the buffer change, so it'd need to be a
user controllable parameter. Also, I don't know if NNTP provides a way to get a
specific range of headers. While there may be room for improvement in how memory
is handled for large groups, the current xrn processing is the obvious
straightforward implementation.
--
Terry Poot <tp@mccall.com>                   The McCall Pattern Company
(uucp: ...!rutgers!ksuvax1!deimos!mccall!tp) 615 McCall Road
(800)255-2762, in KS (913)776-4041           Manhattan, KS 66502, USA
Re: XRN exits with Caught signal 11, Sun 4, OS 4.1.1
#852
Author: Jim Rees
Date: Wed, 06 Nov 1991 19:58
110 lines
4278 bytes
In article <sherman.689246642@foster>, sherman@unx.sas.com (Chris Sherman) writes:

  *************************************************************************
  Can anyone tell me why xrn needs so much memory?
  *************************************************************************

xrn 6.15 and before had a bug in the xref code.  It was allocating an
article array for every group, not just those you subscribe to.  Since
fixing this bug, my xrn starts out at 5 Mb and stays there.  It used to grow
to about 25 Mb.

There is also another bug, apparently in the Athena text widget, that
sometimes makes space allocated to articles stick around.

I sent fixes for both of these to the xrn folks.  I've just examined the
6.17 beta release, and they seem to have been fixed, but I haven't tried
running the new release yet.

Here are patches to xrn 6.15 for both of these bugs.  There's also a patch
to make subject searches much faster.  I've posted all these patches before,
but here they are again.

Note to xrn maintainers -- you forgot to credit me in the CHANGES file with
the subject search speedup.

% diff -cb internals.c.08.29 internals.c 
*** internals.c.08.29	Thu Aug 29 19:46:32 1991
--- internals.c	Thu Aug 29 19:48:11 1991
***************
*** 1708,1723 ****
  	
  	newsgroup = (struct newsgroup *) gptr;
  
- #ifndef STUPIDMMU	/* defer until we have to do this */
- 	SETARTICLES(newsgroup);
- #endif
- 
  	if (IS_SUBSCRIBED(newsgroup) &&
  	    (number >= newsgroup->first) && (number <= newsgroup->last)) {
  
- #ifdef STUPIDMMU
  	    SETARTICLES(newsgroup);
- #endif
  
  	    SET_READ(newsgroup->articles[INDEX(number)]);
  
--- 1708,1717 ----
% diff -cb buttons.c.08.26 buttons.c 
*** buttons.c.08.26	Mon Aug 26 17:04:56 1991
--- buttons.c	Wed Sep 18 10:24:18 1991
***************
*** 2344,2350 ****
  	    cancelButton();
  	}
  
! 	if (abortP()) {
  	    failedSearch();
  	    ArtPosition = save;
  	    cancelDestroy();
--- 2344,2350 ----
  	    cancelButton();
  	}
  
! 	if (count >= app_resources.cancelCount && count % 10 == 0 && abortP()) {
  	    failedSearch();
  	    ArtPosition = save;
  	    cancelDestroy();
***************
*** 2824,2830 ****
      Arg args[5];
      int fildes;
      struct stat buf;
!     char *olddata, *data;
  
      if (filename != LastArticle) {
  	LastArticle = filename;
--- 2824,2831 ----
      Arg args[5];
      int fildes;
      struct stat buf;
!     char *data;
!     static char *olddata;
  
      if (filename != LastArticle) {
  	LastArticle = filename;
***************
*** 2850,2861 ****
  		XawTextSetSource(ArticleText, ArtSource, (XawTextPosition) 0);
  		XawTextSetSelectionArray(ArticleText, allSelectArray);
  	    } else {
- 		XtVaGetValues(ArtSource,
- 			      XtNstring, &olddata,
- 			      NULL);
- 		XtFree(olddata);
  		XtSetValues(ArtSource, args, XtNumber(args));
  	    }
  #else
  	    /* destroy the old text file window */
  	    if (ArtSource != 0) {
--- 2851,2860 ----
  		XawTextSetSource(ArticleText, ArtSource, (XawTextPosition) 0);
  		XawTextSetSelectionArray(ArticleText, allSelectArray);
  	    } else {
  		XtSetValues(ArtSource, args, XtNumber(args));
+ 		XtFree(olddata);
  	    }
+ 	    olddata = data;
  #else
  	    /* destroy the old text file window */
  	    if (ArtSource != 0) {
Re: XRN exits with Caught signal 11, Sun 4, OS 4.1.1
#854
Author: Jonathan I. Kamens
Date: Wed, 06 Nov 1991 21:12
21 lines
1871 bytes
In article <55053c3b.15b0a@paris.citi.umich.edu>, rees@paris.citi.umich.edu (Jim Rees) writes:
|> *** buttons.c.08.26	Mon Aug 26 17:04:56 1991
|> --- buttons.c	Wed Sep 18 10:24:18 1991
|> ***************
|> *** 2824,2830 ****

Do NOT apply this portion of the patch from the article I'm quoting.  It is,
in fact, one of the reasons why xrn 6.17beta coredumps when compiled against
the X11R5 libraries.

The patch makes the assumption that redrawArticleWidget is the only function
that frees the string from the ArtSource widget.  That's wrong.  The
exitArticleMode function also frees the string from the ArtSource widget, and
the result is that if you apply this patch, you will end up trying to free the
same block of memory multiple times, which is a Bad Thing.

-- 
Jonathan Kamens						jik@MIT.Edu
MIT Information Systems/Athena		    Moderator, news.answers
	      (Send news.answers-related correspondence
		  to news-answers-request@MIT.Edu.)
Re: xrn taking up lots of memory (was Re: XRN exi
#855
Author: Jonathan I. Kamens
Date: Wed, 06 Nov 1991 22:24
20 lines
1803 bytes
In article <1991Nov6.132447@mccall.com>, tp@mccall.com (Terry Poot) writes:
|> It seems perfectly logical and correct to me. It could maybe be better by
|> keeping a rolling buffer of a maximum number of headers, and getting ranges of
|> headers when the user scrolls out of the buffer.

Such a feature would significantly complicate the code that does subject line
displaying and retrieval in several different respects.  As you've already
pointed out, very few people actually view newsgroups with huge numbers of
unread postings in them, so it almost certainly isn't worth the effort.

|> Also, I don't know if NNTP provides a way to get a
|> specific range of headers.

It does.

-- 
Jonathan Kamens						jik@MIT.Edu
MIT Information Systems/Athena		    Moderator, news.answers
	      (Send news.answers-related correspondence
		  to news-answers-request@MIT.Edu.)
Re: xrn taking up lots of memory (was Re: XRN exi
#866
Author: Per Hedeland
Date: Thu, 07 Nov 1991 11:22
43 lines
3136 bytes
In article <1991Nov6.132447@mccall.com>, tp@mccall.com (Terry Poot) writes:
|> Arguments about whether this is a C news or NNTP problem are beyond the scope of
|> what an NNTP client should have to worry about. All it sees is NNTP, and the
|> interface for NNTP should have absolutely nothing to do with underlying
|> implementations. The numbers it gets from NNTP are all it can see, so they
|> should be right. Whoever is at fault in them being wrong, it is clearly not
|> xrn.

While this is probably the way things should be, life isn't always that
clear-cut - here are what I believe to be some relevant facts:

1) The problem with the unreliable min numbers given by the NNTP LIST
command if the server is running C news was "fixed" in version 6.12 of
xrn, by issuing the GROUP command before entering a newsgroup - the
current released (more than six months ago) version is 6.15, with 6.17
in beta, but since people often post about ancient versions like 6.3 or
6.5, this may very well be the reason for the huge memory problem that
some people see.

(Xrn unfortunately doesn't have a very good distribution, and missing
the X11R5 contrib deadline certainly didn't help - posting 6.17 to a
sources newsgroup once it is stable would probably be a good idea.)

2) Version 6.13 of xrn introduced a #define (FIXED_C_NEWS_ACTIVE_FILE)
that can be used by those that know that they will only be talking to a
server that *does* keep the min numbers in the active file updated, thus
avoiding the expensive GROUP command.

3) Requiring that (the Unix implementation of) the NNTP server provide
accurate min numbers in the LIST command even if the news system doesn't
do it would be incredibly costly (and wasteful, since most people are
only interested in a fraction of the groups anyway) - essentially the
equivalent of doing a 'find' on the entire news spool tree - a cost
incurred on startup and every rescan that xrn does - please don't do
this.

If you infer from the above that I think this is neither an xrn nor an
NNTP problem, I won't argue with you...

--Per Hedeland
per@erix.ericsson.se  or
per%erix.ericsson.se@sunic.sunet.se  or
..uunet!erix.ericsson.se!per
Re: xrn taking up lots of memory (was Re: XRN exi
#867
Author: Terry Poot
Date: Thu, 07 Nov 1991 12:44
44 lines
3082 bytes
In article <1991Nov6.222442.20560@athena.mit.edu>, jik@athena.mit.edu (Jonathan
I. Kamens) writes:
>In article <1991Nov6.132447@mccall.com>, tp@mccall.com (Terry Poot) writes:
>|> It seems perfectly logical and correct to me. It could maybe be better by
>|> keeping a rolling buffer of a maximum number of headers, and getting ranges
>of
>|> headers when the user scrolls out of the buffer.
>
>Such a feature would significantly complicate the code that does subject line
>displaying and retrieval in several different respects.

Absolutely, and probably introduce many subtle bugs. But done properly it might
be more robust for systems with less memory. (That's why I said "maybe".)

>As you've already
>pointed out, very few people actually view newsgroups with huge numbers of
>unread postings in them, so it almost certainly isn't worth the effort.

Actually, after I posted that, I thought of one complication (which should be of
special interest to you! :-) ), FAQ's. Since they tend to have long expirations,
there may be a significant "hole" between the FAQ posting and the first current
article. There is not a simple, obvious (to me) solution to this. 

One would have to do some analysis (how big is that hole for typical high-volume
groups at various times in the FAQ posting cycle, for instance). It might
actually tip the efficiency balance towards a different data structure. I've got
a dynamic sequence (sort of like an expandable array) package that might be a
good fit if anyone wants it (I'll probably regret saying that). It tries to be
efficient about memory allocation, while hiding all that from the user. Of
course, the changes to the code would likely be massive (I haven't actually
looked at the code in question).

>|> Also, I don't know if NNTP provides a way to get a
>|> specific range of headers.
>
>It does.

Now if it could only provide the number of actual articles, rather than just the
range of article numbers. :-)
--
Terry Poot <tp@mccall.com>                   The McCall Pattern Company
(uucp: ...!rutgers!ksuvax1!deimos!mccall!tp) 615 McCall Road
(800)255-2762, in KS (913)776-4041           Manhattan, KS 66502, USA
min field newsgroup size prediction (Re: xrn taking up lots of memory)
#871
Author: Felix Lee
Date: Fri, 08 Nov 1991 13:55
45 lines
2671 bytes
On the reliability of the min article number as an indication of
newsgroup size, here's some data from the local news host.

   size as predicted by min
   |    actual size
   |    |    gap in size
1977  214 1763 comp.sys.mac.programmer
1866  194 1672 comp.windows.x
2100  448 1652 alt.folklore.urban
1725  200 1525 rec.travel
1822  354 1468 rec.autos
1586  200 1386 comp.sys.mac.hardware
1560  359 1201 rec.arts.tv
1296  275 1021 misc.forsale

These are the 8 groups with gaps greater than 1000.  There are 64
groups with gaps greater than 100.  90% of the groups have gaps less
than 10.

The current expire policy here is to keep moderated groups 10 days,
most groups 5 days, and soc,talk 3 days.  Expires headers are honored
up to 60 days, except soc,talk gets cut off at 5 days.

If Expires: were honored for a year, which is not unreasonable for
seminar and conference announcements, the size of large gaps might
quadruple.

Given that memory is cheap, a gap of 10000 or so in a bit array is no
big deal.  Keeping an array of more substantial information will be
more expensive, but if you use an array of pointers rather than an
array of structures, you're only wasting 40K.  This is insignificant
given that the working-set for gooey programs these days hovers around
a megabyte or so.

Updating the min field at least once a month should be enough to keep
the gaps manageable.  By the time gaps reach 1 000 000, kilobytes
should be cheaper than potato chips, and no one will think twice about
wasting 4M of space in arrays.

And in any case, on a paging vm system the cost of a huge unused array
is merely swap space.  None of it should be resident in ram.

If you're on a PDP-11, well...
--
Felix Lee	flee@cs.psu.edu
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