🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
11 messages
11 total messages Started by Howard Leadmon Sun, 19 May 1996 00:00
INN 1.4unoff4, SharedActive Patch & BSDi 2.1??
#7741
Author: Howard Leadmon
Date: Sun, 19 May 1996 00:00
28 lines
2011 bytes

   I was wondering if anyone here has tried to get the INN 1.4unoff4
nnrpd working with the shared-active patches??  From what I can see 
this works fine on SysV platforms, and BSDi 2.1 seems to have the 
required shared memory calls if I include the -lipc library during the
compile process.  

I thought things were looking good as the code compiled and linked 
OK, but when I try and run it with the shared active patch installed
when you connect to port 119 it just complains that the NNTP server is
not available.  So needless to say something isn't quite right..

If anyone has this working, or has any clues please let me know.  We have
a lot of online readers at any given time (like most ISP's), and it
appears we could save a lot of RAM with this patch installed...


-------------------------------------------------------------------------------
Internet  : howardl@abs.net             |          Howard D. Leadmon
UUCP      : wb3ffv!howardl              |       ABSnet Internet Services
PHONE     : (410)-361-8160              |       200 E. Lexington Street
FAX       : (410)-361-8162              |             Suite-1602
PACKET    : WB3FFV @ WB3FFV.MD.USA.NA   |        Baltimore, MD  21202
WWW       : http://www.abs.net          |


Re: INN 1.4unoff4, SharedActive Patch & BSDi 2.1??
#7777
Author: Anthony D'Atri
Date: Mon, 20 May 1996 00:00
14 lines
1117 bytes

>I thought things were looking good as the code compiled and linked 
>OK, but when I try and run it with the shared active patch installed
>when you connect to port 119 it just complains that the NNTP server is
>not available.

I found that some versions of the patch caused nnrpd to dump core immediately
upon invocation, and others corrupted the active file. I gave up.




Re: INN 1.4unoff4, SharedActive Patch & BSDi 2.1??
#7849
Author: Erik R. Leo
Date: Wed, 22 May 1996 00:00
638 lines
18399 bytes
Howard Leadmon (howardl@u1.abs.net) wrote:
: 
:    I was wondering if anyone here has tried to get the INN 1.4unoff4
: nnrpd working with the shared-active patches??  From what I can see 
: this works fine on SysV platforms, and BSDi 2.1 seems to have the 
: required shared memory calls if I include the -lipc library during the
: compile process.  

	I'm running this configuration.  My config is in part 9 of the 
INN FAQ.  An additional piece of info that might help (I kinda' thought 
it was obvious, after reading the shmat(3) manpage) is that BSD/OS's 
implementation of the "System V compatible IPC functions" uses files in 
/tmp, so if you aren't using an mfs(8)-based /tmp, you aren't getting 
what you think you want.

	The version of the sharedactive patch I'm using was snarfed from:

ftp://ftp.math.psu.edu/pub/INN/patches/sharedactive.patch

and modified locally (as per various recommendations in this newsfroup :).
I've appended it below.

-Erik
-- 
=====================================================================
Erik R. Leo, Net Worker       SoVerNet
Tel:    +1(802)463-2111       Vermont's Sovereign Internet Connection
Fax:    +1(802)463-2110       5 Rockingham Street
Email:  erikl@sover.net       Bellows Falls, Vermont 05101
=====================================================================
*** nnrpd/group.c.orig	Fri Jan 29 18:51:57 1993
--- nnrpd/group.c	Sat Jan 27 19:33:38 1996
***************
*** 1,4 ****
! /*  $Revision: 1.13 $
  **
  **  Newsgroups and the active file.
  */
--- 1,4 ----
! /*  $Revision: 1.32 $
  **
  **  Newsgroups and the active file.
  */
***************
*** 5,11 ****
--- 5,45 ----
  #include "nnrpd.h"
  #include "mydir.h"
  
+ /*
+  * [++doug] Configuration for using shared memory.  If GROUP_SHARED
+  * is left undefined, the rest can be ignored.
+  *
+  * When using shared memory, we statically allocate the GRPentries
+  * array and the GRPactive array.  Otherwise, need a storage allocator
+  * to manage space in shared memory.  This means putting a fixed limit
+  * on the number of groups and things.
+  *
+  * Define XSEM_UNDO to be SEM_UNDO if you want to use the kernel
+  * semaphore undo feature which fixes up a semaphore if a process dies
+  * while holding it.  However, the default system-wide limit on undo
+  * structs is 30 under HPUX 8.0.  Since the fwpnews server often has
+  * over 200 nnrpds running, would need to increase semmnu in dfile to
+  * a few hundred.  If XSEM_UNDO is set to 0, then killing an nnrpd process
+  * while it holds the semaphore will block all other nnrpds from running
+  * until reboot.  Or until some other process removes or resets the semaphore.
+  * The idea is to not kill nnrpds.
+  *
+  * [++russell Jan 27 1996 <vincent@ucthpx.uct.ac.za>]
+  * Found a problem under Solaris 2.4 whereby the shm ptr returned wasn't
+  * always constant, so I had to removed the shared mem version of GRPentries,
+  * GRPnextentry and GRPtable.
+  * (Seems to have stopped core dumps)
+  */
+ #define GROUP_SHARED		/* Use shared memory */
  
+ #ifdef GROUP_SHARED
+ #  define MAX_ACTIVE_SIZE	1000000	/* Max size of active file           */
+ #  define MAX_GROUPS		30000	/* Max number of groups in active    */
+ #  define RELOAD_DELAY	60	/* min #secs before reloading active */
+ #  define XSEM_UNDO		0	/* Don't use kernel undo             */
+ #endif
+ 
+ 
  /*
  **  Newsgroup hashing stuff.  See comments in innd/ng.c.
  */
***************
*** 15,34 ****
  #define GRP_SIZE	512
  #define GRP_BUCKET(j)	&GRPtable[j & (GRP_SIZE - 1)]
  
! typedef struct _GRPHASH {
!     int		Size;
!     int		Used;
!     GROUPENTRY	**Groups;
! } GRPHASH;
  
  
! STATIC GRPHASH		GRPtable[GRP_SIZE];
! STATIC GROUPENTRY	*GRPentries;
! STATIC int		GRPbuckets;
  STATIC int		GRPsize;
  
  
  /*
  **  See if a given newsgroup exists.
  */
  GROUPENTRY *
--- 49,170 ----
  #define GRP_SIZE	512
  #define GRP_BUCKET(j)	&GRPtable[j & (GRP_SIZE - 1)]
  
! #define NEXTGROUP(g)	GRPnextentry[(g) - GRPentries]
  
+ #ifdef GROUP_SHARED
  
! GROUPENTRY	*_GRPtable[GRP_SIZE];		/* 2k   */
! GROUPENTRY	*_GRPnextentry[MAX_GROUPS];	/* 40k  */
! GROUPENTRY	*_GRPentries;
! time_t		GRPtimehash;			/* time last loaded */
! 
! static struct shared {
! 	BOOL		_GRPvalid;			/* loaded ok */
! 	time_t		_GRPtimestamp;			/* time last loaded */
! 	int		_GRPsize;			/* number of groups */
! 	char		_GRPactive[MAX_ACTIVE_SIZE];	/* 500k */
! } *shm;
! 
! #define GRPsize		shm->_GRPsize
! #define GRPactive	shm->_GRPactive
! #define GRPtimestamp	shm->_GRPtimestamp
! #define GRPvalid	shm->_GRPvalid
! #define GRPtable	_GRPtable
! #define GRPentries	_GRPentries
! #define GRPnextentry	_GRPnextentry
! 
! #include <sys/ipc.h>
! #include <sys/sem.h>
! #include <sys/shm.h>
! 
! #define SHMKEY	((key_t)12347)
! #define SEMKEY	((key_t)12348)
! 
! static int	SemId;
! static int	ShmId;
! 
! /*
!  * Routines to enforce mutual exclusion on shared memory.  Any
!  * nnrpd process can update and must make sure that nobody is
!  * reading it at the time.
!  */
! static int shm_alloc()
! {
!     if ((SemId = semget(SEMKEY, 1, 0666 | IPC_CREAT)) < 0) {
! 	syslog(L_ERROR, "%s Can't create semaphore %m", ClientHost);
! 	return (FALSE);
!     }
!     if ((ShmId = shmget(SHMKEY, sizeof(*shm), 0666 | IPC_CREAT)) < 0) {
! 	syslog(L_ERROR, "%s Can't create shared mem segment %m", ClientHost);
! 	return (FALSE);
!     }
!     shm = (struct shared *)shmat(ShmId, (void *)0, 0);
!     if (shm == (struct shared *)-1) {
! 	syslog(L_ERROR, "%s Can't attach shared memory %m", ClientHost);
! 	return (FALSE);
!     }
!     return (TRUE);
! }
! 
! /*
!  * lock and unlock borrowed from Stevens.
!  */
! static struct sembuf op_lock[2] = {
! 	0, 0, 0,			/* Wait for sem0 to become 0 */
! 	0, 1, XSEM_UNDO			/* Then increment by 1 */
! };
! 
! static struct sembuf op_unlock[1] = {
! 	0, -1, (IPC_NOWAIT|XSEM_UNDO)	/* Decrement by 1 (to 0) */
! };
! 
! static int shm_lock()
! {
!     static int shm_allocated;
! 
!     if (! shm_allocated) {
! 	if (! shm_alloc())
! 		return (FALSE);
! 	shm_allocated = TRUE;
!     }
!     if (semop(SemId, op_lock, 2) < 0) {
! 	syslog(L_ERROR, "%s acquiring semaphore %m", ClientHost);
! 	return (FALSE);
!     }
!     return (TRUE);
! }
! 
! static void shm_unlock()
! {
!     if (semop(SemId, op_unlock, 1) < 0)
! 	syslog(L_ERROR, "%s unlocking semaphore %m", ClientHost);
! }
! 
! #else
! 
  STATIC int		GRPsize;
+ STATIC GROUPENTRY	*GRPtable[GRP_SIZE];
+ STATIC GROUPENTRY	*GRPentries;
+ STATIC GROUPENTRY	*GRPnextentry;
+ STATIC char		*GRPactive;
  
+ #define shm_lock()	TRUE
+ #define shm_unlock()
  
+ #endif
+ 
  /*
+ **  [++doug]
+ **  GRPfind called from:   newgroups command -- once for each new group
+ **                         group command     -- once
+ **                         validnewsgroups   -- once for each newsgroup in
+ **                                              Newsgroups: line.
+ **
+ **  The group command is by far the most used.  During peak time with
+ **  ~200 readers, called about once every two seconds.
+ */
+ 
+ /*
  **  See if a given newsgroup exists.
  */
  GROUPENTRY *
***************
*** 37,53 ****
  {
      register char		*p;
      register unsigned int	j;
!     register int		i;
!     register GROUPENTRY		**gpp;
!     GRPHASH			*htp;
      char			c;
  
      /* SUPPRESS 6 *//* Over/underflow from plus expression */
      GRP_HASH(group, p, j);
!     htp = GRP_BUCKET(j);
!     for (c = *group, gpp = htp->Groups, i = htp->Used; --i >= 0; gpp++)
! 	if (c == gpp[0]->Name[0] && EQ(group, gpp[0]->Name))
! 	    return gpp[0];
      return NULL;
  }
  
--- 173,224 ----
  {
      register char		*p;
      register unsigned int	j;
!     register GROUPENTRY		*gp;
      char			c;
  
+     if (! shm_lock()) {
+ 	return (NULL);
+    }
+ #ifdef GROUP_SHARED
+     if (! GRPvalid) {
+ 	shm_unlock();
+ 	if (! GetGroupList())
+ 	    return (NULL);
+ 	if (! shm_lock())
+ 	    return (NULL);
+ 	if (! GRPvalid)
+ 	    return (NULL);
+     }
+ #endif
      /* SUPPRESS 6 *//* Over/underflow from plus expression */
+     if (GRPtimehash <= GRPtimestamp) ReHashGroupList();
      GRP_HASH(group, p, j);
!     c = *group;
!     for (gp = *GRP_BUCKET(j); gp != NULL; gp = NEXTGROUP(gp)) {
! 	if (c == gp->Name[0] && EQ(group, gp->Name)) {
! #ifdef GROUP_SHARED
! 	    static GROUPENTRY		grp;
! 	    static char			groupname[256];
! 	    static char			groupalias[256];
! 
! 	    strncpy(groupname, gp->Name, sizeof(groupname) - 1);
! 	    grp.Name = groupname;
! 	    grp.High = gp->High;
! 	    grp.Low = gp->Low;
! 	    grp.Flag = gp->Flag;
! 	    if (gp->Alias != NULL)
! 		strncpy(groupalias, gp->Alias, sizeof(groupalias) - 1);
! 	    else
! 		groupalias[0] = '\0';
! 	    grp.Alias = groupalias;
! 	    shm_unlock();
! 	    return (&grp);
! #else
! 	    return gp;
! #endif
! 	}
!     }
!     shm_unlock();
      return NULL;
  }
  
***************
*** 55,79 ****
  STATIC void
  GRPhash()
  {
-     register char		*p;
      register int		i;
      register GROUPENTRY		*gp;
      register unsigned int	j;
!     register GRPHASH		*htp;
  
!     /* Set up the default hash buckets. */
!     GRPbuckets = GRPsize / GRP_SIZE;
!     if (GRPbuckets == 0)
! 	GRPbuckets = 1;
!     if (GRPtable[0].Groups)
! 	for (i = GRP_SIZE, htp = GRPtable; --i >= 0; htp++)
! 	    htp->Used = 0;
!     else
! 	for (i = GRP_SIZE, htp = GRPtable; --i >= 0; htp++) {
! 	    htp->Size = GRPbuckets;
! 	    htp->Groups = NEW(GROUPENTRY*, htp->Size);
! 	    htp->Used = 0;
! 	}
  
      /* Now put all groups into the hash table. */
      for (i = GRPsize, gp = GRPentries; --i >= 0; gp++) {
--- 226,240 ----
  STATIC void
  GRPhash()
  {
      register int		i;
      register GROUPENTRY		*gp;
      register unsigned int	j;
!     register GROUPENTRY		**htp;
!     register char		*p;
  
!     /* Clear out the hash table. */
!     for (i = GRP_SIZE, htp = GRPtable; --i >= 0; htp++)
! 	*htp = NULL;
  
      /* Now put all groups into the hash table. */
      for (i = GRPsize, gp = GRPentries; --i >= 0; gp++) {
***************
*** 80,96 ****
  	/* SUPPRESS 6 *//* Over/underflow from plus expression */
  	GRP_HASH(gp->Name, p, j);
  	htp = GRP_BUCKET(j);
! 	if (htp->Used >= htp->Size) {
! 	    htp->Size += GRPbuckets;
! 	    RENEW(htp->Groups, GROUPENTRY*, htp->Size);
! 	}
! 	htp->Groups[htp->Used++] = gp;
      }
  
      /* Note that we don't sort the buckets. */
  }
  
  
  /*
  **  Read the active file into memory, sort it, and set the number of
  **  newsgroups read in.  Return TRUE if okay, FALSE on error.
--- 241,288 ----
  	/* SUPPRESS 6 *//* Over/underflow from plus expression */
  	GRP_HASH(gp->Name, p, j);
  	htp = GRP_BUCKET(j);
! 	NEXTGROUP(gp) = *htp;
! 	*htp = gp;
      }
  
      /* Note that we don't sort the buckets. */
  }
  
+ /*
+ ** [+++russell]
+ ** Reload the Active file shared mem variables because the shared mem
+ ** copy changed while we weren't looking
+ */
+ BOOL
+ ReHashGroupList()
+ {
+     register char		*p;
+     register GROUPENTRY		*gp;
+     register int		i;
+     time_t			tt;
  
+     if (GRPentries != NULL) DISPOSE(GRPentries);
+     GRPentries = NEW(GROUPENTRY, GRPsize);
+     for (i = 0, gp = GRPentries, p = GRPactive; i<GRPsize; i++, gp++) {
+ 	gp->Name = p;
+ 	while (*p++ != '\0');
+ 
+ 	/* Get the high mark. */
+ 	gp->High = atol(p);
+ 	while (*p++ != '\0');
+ 
+ 	/* Get the low mark. */
+ 	gp->Low = atol(p);
+ 	while (*p++ != '\0');
+ 
+ 	gp->Flag = *p;
+ 	gp->Alias = gp->Flag == NF_FLAG_ALIAS ? p + 1 : NULL;
+ 	while (*p++ != '\0');
+     }
+ 
+     GRPhash();
+     GRPtimehash = time((time_t *)&tt);
+ }
  /*
  **  Read the active file into memory, sort it, and set the number of
  **  newsgroups read in.  Return TRUE if okay, FALSE on error.
***************
*** 98,133 ****
  BOOL
  GetGroupList()
  {
-     static char			*active;
      register char		*p;
      register char		*q;
      register GROUPENTRY		*gp;
      register int		i;
  
      /* If re-scanning, free previous groups. */
!     if (active != NULL) {
! 	DISPOSE(active);
  	DISPOSE(GRPentries);
      }
  
      /* Get the new file. */
!     active = ReadInFile(ACTIVE, (struct stat *)NULL);
!     if (active == NULL) {
  	syslog(L_ERROR, "%s cant read %s %m", ClientHost, ACTIVE);
  	return FALSE;
      }
  
      /* Count lines. */
!     for (p = active, i = 0; (p = strchr(p, '\n')) != NULL; p++, i++)
  	continue;
  
      /* Fill in the group array. */
      GRPentries = NEW(GROUPENTRY, i);
!     for (i = 0, gp = GRPentries, p = active; *p; i++, gp++, p = q + 1) {
  	gp->Name = p;
  	if ((p = strchr(p, ' ')) == NULL) {
  	    syslog(L_ERROR, "%s internal no_space1 \"%.20s...\"",
  		ClientHost, gp->Name);
  	    return FALSE;
  	}
  	*p++ = '\0';
--- 290,371 ----
  BOOL
  GetGroupList()
  {
      register char		*p;
      register char		*q;
      register GROUPENTRY		*gp;
      register int		i;
+     time_t			tt;
  
+     if (! shm_lock())
+ 	return (FALSE);
+ 
+ #ifdef GROUP_SHARED
+     /*
+      * Don't reload the active file if any nnrpd process has loaded it
+      * within the last RELOAD_DELAY seconds.  Saves a bit of I/O.
+      */
+     if (GRPtimestamp + RELOAD_DELAY > time((time_t *)&tt)) {
+ 	ReHashGroupList();
+ 	shm_unlock();
+ 	return (TRUE);
+     }
+ 
+     /*
+      * Mark data in shared memory invalid.  That way, if one nnrpd
+      * screws up shared memory while attempting to reload active, the
+      * others will notice and also try to reload.
+      */
+     GRPvalid = 0;
+ #endif
+ 
      /* If re-scanning, free previous groups. */
! #ifdef GROUP_SHARED
!     if (GRPentries != NULL) {
  	DISPOSE(GRPentries);
+ 	DISPOSE(GRPnextentry);
      }
+ #else
+     if (GRPactive != NULL) {
+ 	DISPOSE(GRPactive);
+ 	DISPOSE(GRPentries);
+ 	DISPOSE(GRPnextentry);
+     }
+ #endif
  
      /* Get the new file. */
! #ifdef GROUP_SHARED
!     if (! xReadInFile(ACTIVE, GRPactive, MAX_ACTIVE_SIZE)) {
! #else
!     GRPactive = ReadInFile(ACTIVE, (struct stat *)NULL);
!     if (GRPactive == NULL) {
! #endif
! 	shm_unlock();
  	syslog(L_ERROR, "%s cant read %s %m", ClientHost, ACTIVE);
  	return FALSE;
      }
  
      /* Count lines. */
!     for (p = GRPactive, i = 0; (p = strchr(p, '\n')) != NULL; p++, i++)
  	continue;
  
      /* Fill in the group array. */
+ #ifdef GROUP_SHARED
+     if (i > MAX_GROUPS) {
+ 	shm_unlock();
+ 	syslog(L_ERROR, "%s too many groups (%d)", ClientHost, i);
+ 	return (FALSE);
+     }
      GRPentries = NEW(GROUPENTRY, i);
! #else
!     GRPentries = NEW(GROUPENTRY, i);
!     GRPnextentry = NEW(GROUPENTRY *, i);
! #endif
!     for (i = 0, gp = GRPentries, p = GRPactive; *p; i++, gp++, p = q + 1) {
  	gp->Name = p;
  	if ((p = strchr(p, ' ')) == NULL) {
  	    syslog(L_ERROR, "%s internal no_space1 \"%.20s...\"",
  		ClientHost, gp->Name);
+ 	    shm_unlock();
  	    return FALSE;
  	}
  	*p++ = '\0';
***************
*** 136,141 ****
--- 374,380 ----
  	if ((q = strchr(p, ' ')) == NULL) {
  	    syslog(L_ERROR, "%s internal no_space2 \"%.20s...\"",
  		ClientHost, gp->Name);
+ 	    shm_unlock();
  	    return FALSE;
  	}
  	*q++ = '\0';
***************
*** 145,150 ****
--- 384,390 ----
  	if ((p = strchr(q, ' ')) == NULL) {
  	    syslog(L_ERROR, "%s internal no_space3 \"%.20s...\"",
  		ClientHost, gp->Name);
+ 	    shm_unlock();
  	    return FALSE;
  	}
  	*p++ = '\0';
***************
*** 154,159 ****
--- 394,400 ----
  	if ((q = strchr(p, '\n')) == NULL) {
  	    syslog(L_ERROR, "%s internal newline \"%.20s...\"",
  		ClientHost, gp->Name);
+ 	    shm_unlock();
  	    return FALSE;
  	}
  	*q = '\0';
***************
*** 163,171 ****
--- 404,469 ----
  
      GRPsize = i;
      GRPhash();
+ #ifdef GROUP_SHARED
+     GRPtimestamp = time(&tt);
+     GRPvalid = 1;
+ #endif
+     shm_unlock();
      return TRUE;
  }
  
+ 
+ #ifdef GROUP_SHARED
+ 
+ /*
+ **  Used for reading active file into shared memory.
+ **
+ **  [++doug]
+ **
+ **  It isn't clear to me what ensures that nnrpd never attempts to
+ **  open the active while innd is writing it.  Even if the writev
+ **  that innd uses is atomic, there is still a window between where
+ **  it opens (and truncates) the active file, and where it writes the
+ **  current contents.  Anyway, this problem, if it really is a problem,
+ **  existed before my mods.
+ */
+ int xReadInFile(name, buf, bufsize)
+     char *name;
+     char *buf;
+     int  bufsize;
+ {
+     int fd;
+     struct stat	mystat;
+     int		oerrno;
+ 
+     if ((fd = open(name, O_RDONLY)) < 0)
+ 	return FALSE;
+ 
+     if (fstat(fd, &mystat) < 0) {
+ 	oerrno = errno;
+ 	(void)close(fd);
+ 	errno = oerrno;
+ 	return FALSE;
+     }
+     if (mystat.st_size >= bufsize) {
+ 	errno = ENOMEM;
+ 	return (FALSE);
+     }
+ 
+     if (xread(fd, buf, mystat.st_size) < 0) {
+ 	oerrno = errno;
+ 	(void)close(fd);
+ 	errno = oerrno;
+ 	return FALSE;
+     }
+ 
+     /* Terminate the string; terminate the routine. */
+     buf[mystat.st_size] = '\0';
+     (void)close(fd);
+     return (TRUE);
+ }
+ 
+ #endif
  
  /*
  **  Sorting predicate to put newsgroup names into numeric order.

Re: INN 1.4unoff4, SharedActive Patch & BSDi 2.1??
#7867
Author: Evan Champion
Date: Wed, 22 May 1996 00:00
20 lines
1411 bytes
System Administrator a.k.a. The Root of the Problem wrote:
> 
> Question: Is there anyone who is using INN 1.4unoff4 or
> the 'new' dnews any are finding sucess
> replacing the INN out of the  BSDI bov?

What is difficult about it?

Download inn1.4unoff4, make up a config.data which may or may not be 
based on the one distributed by BSDI (it's on the source CD), install 
it, run it, love it :-)

Evan
--
Evan Champion            * Director, Network Operations
mailto:evanc@synapse.net * Directeur, Exploitation du reseau
http://www.synapse.net/  * Synapse Internet

Re: INN 1.4unoff4, SharedActive Patch & BSDi 2.1??
#7892
Author: System Administrator a.k.a. The ...
Date: Wed, 22 May 1996 00:00
9 lines
920 bytes
Question: Is there anyone who is using INN 1.4unoff4 or
the 'new' dnews any are finding sucess 
replacing the INN out of the  BSDI bov?

-- 
Dave Yadallee, System Administrator   NetLine 2000

Re: INN 1.4unoff4, SharedActive Patch & BSDi 2.1??
#7895
Author: Andrew J. Doane
Date: Wed, 22 May 1996 00:00
23 lines
1638 bytes
Anthony D'Atri (aad@nwnet.net) wrote:

: >I thought things were looking good as the code compiled and linked 
: >OK, but when I try and run it with the shared active patch installed
: >when you connect to port 119 it just complains that the NNTP server is
: >not available.

: I found that some versions of the patch caused nnrpd to dump core immediately
: upon invocation, and others corrupted the active file. I gave up.

I too tried and never got it to work.  Didn't dump core, just would't allow
clients to connect .....

/ajd/
--
       _/_/    _/  _/_/_/_/	    Andrew J. Doane
    _/    _/  _/  _/                Vice President
   _/_/_/_/  _/  _/_/_/_/           American Information Systems, Inc.
  _/    _/  _/        _/ 	    Email: adoane@ais.net, http://www.ais.net
 _/    _/  _/  _/_/_/_/             (312) 255-8500 Voice, (312) 255-8501 Fax

Re: INN 1.4unoff4, SharedActive Patch & BSDi 2.1??
#7902
Author: charlie
Date: Thu, 23 May 1996 00:00
18 lines
1398 bytes
>   I was wondering if anyone here has tried to get the INN 1.4unoff4
>nnrpd working with the shared-active patches??  ....
>
>I thought things were looking good as the code compiled and linked 
>OK, but when I try and run it with the shared active patch installed
>when you connect to port 119 it just complains that the NNTP server is
>not available. 

I'd agree with all the replys that unoff4 does run better but nobody has 
replied re: shared active patch working on bsdi.  So I'd like to also ask the 
same question.  I'm running unoff4 w/o the patch but would like to include it 
for the exact same reason.

charlie 


Re: INN 1.4unoff4, SharedActive Patch & BSDi 2.1??
#7907
Author: Adrian Cooper
Date: Thu, 23 May 1996 00:00
41 lines
2290 bytes
In article <4nnqim$9sm@news.abs.net>, howardl@u1.abs.net (Howard Leadmon) wrote:
>
>   I was wondering if anyone here has tried to get the INN 1.4unoff4
>nnrpd working with the shared-active patches??  From what I can see 
>this works fine on SysV platforms, and BSDi 2.1 seems to have the 
>required shared memory calls if I include the -lipc library during the
>compile process.  
>
>I thought things were looking good as the code compiled and linked 
>OK, but when I try and run it with the shared active patch installed
>when you connect to port 119 it just complains that the NNTP server is
>not available.  So needless to say something isn't quite right..
>
>If anyone has this working, or has any clues please let me know.  We have
>a lot of online readers at any given time (like most ISP's), and it
>appears we could save a lot of RAM with this patch installed...


Well the shared active patch definitely does work with BSDI 2.1 and it 
does make a very worthwhile difference in performance and particularly 
resource availability - particularly RAM.  We are using INN 1.4unoff4 on our 
BSDI 2.1 RAID5 news server which is always heavily loaded (we are ISP's) as 
well as the other official INN 1.4unnof4 patches all without problem.

I am not our newsadmin and so cannot assist much further, but I do suggest you 
take a look at Dave Barr's INN Page:

http://www.math.psu.edu/barr/INN.html

Good luck.


--
Adrian.
___________________________________
Adrian Cooper  | apc@enterprise.net
Enterprise PLC | http://www.enterprise.net
Leading Internet Services in the British Isles.

Re: INN 1.4unoff4, SharedActive Patch & BSDi 2.1??
#7925
Author: Paul A Vixie
Date: Thu, 23 May 1996 00:00
9 lines
876 bytes
avoid the shared active patch on any system without a unified buffer cache.
-- 
Paul Vixie
La Honda, CA			"Illegitimibus non carborundum."
<paul@vix.com>
pacbell!vixie!paul

Re: INN 1.4unoff4, SharedActive Patch & BSDi 2.1??
#7927
Author: Howard Leadmon
Date: Thu, 23 May 1996 00:00
40 lines
2589 bytes
Erik R. Leo <erikl@sover.net> wrote:
: Howard Leadmon (howardl@u1.abs.net) wrote:
: : 
: :    I was wondering if anyone here has tried to get the INN 1.4unoff4
: : nnrpd working with the shared-active patches??  From what I can see 
: : this works fine on SysV platforms, and BSDi 2.1 seems to have the 
: : required shared memory calls if I include the -lipc library during the
: : compile process.  
: 
: 	I'm running this configuration.  My config is in part 9 of the 
: INN FAQ.  An additional piece of info that might help (I kinda' thought 
: it was obvious, after reading the shmat(3) manpage) is that BSD/OS's 
: implementation of the "System V compatible IPC functions" uses files in 
: /tmp, so if you aren't using an mfs(8)-based /tmp, you aren't getting 
: what you think you want.


Well I actually have it running now, but not sure why.  I rebuilt the 
kernel and took out all the GENERIC stuff, basically just tunned it to
my specific configuration and away it went (strange).

Also I agree with you on the BSD/OS implementation of the IPC functions
through files in /tmp.  I have even verified that this is in fact the
case.  I don't have a mem-fs setup, but that will be my next project
as I expect it will have quite an impact.

Again, many thanks for your input...


-------------------------------------------------------------------------------
Internet  : howardl@abs.net             |          Howard D. Leadmon
UUCP      : wb3ffv!howardl              |       ABSnet Internet Services
PHONE     : (410)-361-8160              |       200 E. Lexington Street
FAX       : (410)-361-8162              |             Suite-1602
PACKET    : WB3FFV @ WB3FFV.MD.USA.NA   |        Baltimore, MD  21202
WWW       : http://www.abs.net          |


Re: INN 1.4unoff4, SharedActive Patch & BSDi 2.1??
#7945
Author: Ron Bickers
Date: Fri, 24 May 1996 00:00
31 lines
2034 bytes
charlie (charlie@delta.net) wrote:
: >   I was wondering if anyone here has tried to get the INN 1.4unoff4
: >nnrpd working with the shared-active patches??  ....
: >
: >I thought things were looking good as the code compiled and linked 
: >OK, but when I try and run it with the shared active patch installed
: >when you connect to port 119 it just complains that the NNTP server is
: >not available. 

: I'd agree with all the replys that unoff4 does run better but nobody has 
: replied re: shared active patch working on bsdi.  So I'd like to also ask the 
: same question.  I'm running unoff4 w/o the patch but would like to include it 
: for the exact same reason.

: charlie 

I'm running unoff4 w/ the shared active patch on BSDI2.1 without
any problems.  Actually, I had exactly the same thing you mention above.
I went through the code to try to figure out what was going on.
For it to compile, I'm sure you know you need to set LIBS -lipc but I think
in the end, the only thing I did was use gcc instead of cc.

Unfortunately, I have no idea why this would've made a difference, but
I'm not one to question it much when everything's working like it should.

Let me know if anyone has any luck.

Ron

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