[news.software.b] Installing C News on System V/AT

rd@tarpit.uucp (Bob Thrush) (07/16/89)

  I have been running C News since July 5.  I am extremely
impressed with the increase in performance and *much* easier
administration.  With B News 2.11.14 and dbz, this system was
processing about 12 articles/minute.  It is now achieving about
28 articles/minute.  Many thanks to Henry and Geoff for an
important improvement to news software!

  I made several changes to C News to get it to run under
Microport System V/AT Release 2.4.  These changes were made
before Henry's July 7th patches which (after a quick scan) fix
some of the V/AT problems.  Rather than integrating and testing
the July 7th changes, I thought I would post what I have found
so far.  Once I have integrated the current patches, I will post
a detailed patch to comp.unix.microport.

  I have one small problem remaining.  It is appropriately
named `superkludge'.  Some details appear later in this posting.
(In the meantime, I have been forcing comp.mail.maps expiry via
the explist mechanism.)

  Here are my installation notes.  Many of the problems are
specific to V/AT 2.4.

 1. Fixed relay/hdrdefs.c per postings from Henry Spencer and
    Rick Richardson.  See <1989Jul15.150556.2080@tarpit.uucp>
    for details.

 2. Fixed several Makefiles to add `;' after `test' commands per
    postings from bill@twwells.com.  (The July 7th patch includes
    the details.)

 3. Added the contributed (by Jon Zeeff) dbz module to the
    /lib/small and /lib/large system libraries.

 4. Changed rna/lib/makefile to make "RANLIB = echo" per the comment
    during doit.bin execution.

 5. Added getpwent(3C) function declarations to /usr/include/pwd.h.
    (It seems like BSD derived systems have some of these functions
     declared, while System V.{2,3} don't have any declared.
     Is there a generally accepted portable way to avoid this
     problem?)

 6. V/AT was not able to use the supplied stdio library although
    the libstdio test was happy.  The expire regression test
    showed up several cases of truncated strings.  Instead of
    pursuing the problem I used the V/AT stdio.  (I have not
    tried the July 7th stdio patch.)

 7. I used compiler options "-Ml -g" (large model).  expire
    (small model with optimization) generates (in nemalloc() ) a
    "newsbin/expire/expire: out of memory" message and terminates.
    With "expire -t -v" the message occurred after printing
    91 article remove messages.  The large model expire seems
    to work correctly.

 8. relaynews needs setnewsids since the Microport setuid, setgid
    don't seem to do the job.

 9. spacefor had to be altered since the V/AT `df' doesn't take a 
    directory argument.

10. h/news.h had to be changed to work correctly under the V/AT
    large model.  The small model seemed to work correctly.
    Compiling `libbig/active.fast.c' results in:
    "active.fast.c", line 58: compiler error: register allocation error
    I expanded the nnafree macro as a work around, as follows:

*** h/news.h	Sun Jul  2 13:35:22 1989
--- /tmp/news.h	Sat Jul 15 12:59:28 1989
***************
*** 84,90 ****
--- 84,96 ----
  
  /* macros, of necessity */
  /* nnafree(any **) where "any" is any type; must be a macro */
+ /* The following was changed for the Microport large model */
+ #ifdef iAPX286
+ #define nnafree(mempp) if (*(mempp) != 0) \
+ 		(free((char *)*(mempp)), (*(mempp) = 0))
+ #else
  #define nnafree(mempp) (*(mempp) != 0? (free((char *)*(mempp)), (*(mempp) = 0)): 0)
+ #endif
  #ifdef lint
  nnfree(mempp)		/* If *mempp is non-null, free it and zero it. */
  register char **mempp;			/* pointer to malloc'ed ptr. */

11. I still don't have superkludge working.  It complains during the
    regression test as follows:

        : "and that's mkhistory done, finally try superkludge" 
        test -r arts/foo/1 ; 
        test -r arts/foo/10 ; 
        NEWSARTS=`pwd`/arts NEWSCTL=`pwd` NEWSBIN=`pwd`/nbin ./superkludge foo 
./superkludge: message-id format problems: 
1 <wont1>  
        test ! -r arts/foo/1 ; 
*** Error code 1 
 
Stop. 

-- 
Bob Thrush                 UUCP: {ucf-cs,rtmvax}!tarpit!rd
Automation Intelligence,   1200 W. Colonial Drive, Orlando, Florida 32804

henry@utzoo.uucp (Henry Spencer) (07/18/89)

In article <1989Jul16.000620.10241@tarpit.uucp> rd@tarpit.UUCP (Bob Thrush) writes:
> 6. V/AT was not able to use the supplied stdio library although
>    the libstdio test was happy.  The expire regression test
>    showed up several cases of truncated strings.  Instead of
>    pursuing the problem I used the V/AT stdio.  (I have not
>    tried the July 7th stdio patch.)

Please do try the improved stdio-test stuff from the 7 July patch.  We'd
really like to know if there are any systems other than SunOS 4.0 where
the tester still succeeds but the functions still don't work.  (Also, if
anyone can figure out what the problem is on 4.0 we'd be interested.
Geoff still isn't sure what's going on, although he hasn't had much time
for it lately.  Something to do with end-of-file handling, he thinks.)

> 7. I used compiler options "-Ml -g" (large model).  expire
>    (small model with optimization) generates (in nemalloc() ) a
>    "newsbin/expire/expire: out of memory" message and terminates.

Does your news.h have SMALLMEM defined?  (It should have if you answered
"small" to the address-space question in build.)  The 23-June patch added
a smaller buffer size to expire.c for the small-memory case, and it was
reported to work on a 16-bit machine that way.  Possibly it is still a
bit marginal, though.  Unfortunately we no longer have a 16-bit system
handy for testing.

>11. I still don't have superkludge working.  It complains during the
>    regression test as follows:
>
>        : "and that's mkhistory done, finally try superkludge" 
>        test -r arts/foo/1 ; 
>        test -r arts/foo/10 ; 
>        NEWSARTS=`pwd`/arts NEWSCTL=`pwd` NEWSBIN=`pwd`/nbin ./superkludge foo 
>./superkludge: message-id format problems: 
>1 <wont1>  

I *think* this is an awk problem.  If you look for the place where that
message gets printed, it's an internal consistency check -- a small awk
program is run against a newly-generated file to detect any lines that
don't look right, before the file gets used.  That line *ought* to be
okay; there may be something slightly wrong with your awk.
-- 
$10 million equals 18 PM       |     Henry Spencer at U of Toronto Zoology
(Pentagon-Minutes). -Tom Neff  | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

rick@pcrat.uucp (Rick Richardson) (07/20/89)

In article <1989Jul18.165520.18328@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes:
]In article <1989Jul16.000620.10241@tarpit.uucp> rd@tarpit.UUCP (Bob Thrush) writes:
]> 7. I used compiler options "-Ml -g" (large model).  expire
]>    (small model with optimization) generates (in nemalloc() ) a
]>    "newsbin/expire/expire: out of memory" message and terminates.
]
]Does your news.h have SMALLMEM defined?  (It should have if you answered
]"small" to the address-space question in build.)  The 23-June patch added
]a smaller buffer size to expire.c for the small-memory case, and it was
]reported to work on a 16-bit machine that way.

We've got SMALLMEM defined, and compiled with small model under Venix 286,
which is the same C compiler as V/AT, and we haven't noted any problems
with expire.

-Rick
-- 
Rick Richardson | JetRoff "di"-troff to LaserJet Postprocessor|uunet!pcrat!dry2
PC Research,Inc.| Mail: uunet!pcrat!jetroff; For anon uucp do:|for Dhrystone 2
uunet!pcrat!rick| uucp jetroff!~jetuucp/file_list ~nuucp/.    |submission forms.
jetroff Wk2200-0300,Sa,Su ACU {2400,PEP} 12013898963 "" \d\r\d ogin: jetuucp

rd@tarpit.uucp (Bob Thrush) (07/20/89)

In article <1989Jul18.165520.18328@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes:
>In article <1989Jul16.000620.10241@tarpit.uucp> rd@tarpit.UUCP (Bob Thrush) writes:
>> 6. V/AT was not able to use the supplied stdio library ...
>Please do try the improved stdio-test stuff from the 7 July patch.  ...

  With the July 7th patch, fast stdio fails during the second
"runtrials" in the first instance of the "stdiock.fast" test with
the following (condensed) diagnostic:
your stdio seems to be compatible (_ptr) incompatible (_cnt) with stdio.fast 

>> 7. I used compiler options "-Ml -g" (large model).  expire
>>    (small model with optimization) generates (in nemalloc() ) a
>>    "newsbin/expire/expire: out of memory" message and terminates.
>Does your news.h have SMALLMEM defined?  ...

  I had answered "big" to the address space question and SMALLMEM was
not defined. 
  With just a little bit of testing, it now appears that the small
model and the "small" answer ;-} have produced a working expire.
I will do a full install this weekend and check the whole system
more thoroughly.
  Thanks for the tip on SMALLMEM.

>>11. I still don't have superkludge working.  It complains during the
>>    regression test ...
>>./superkludge: message-id format problems: 
>>1 <wont1>  
>I *think* this is an awk problem. ...

  I'm now convinced that it's an awk problem.  However, not being
too comfortable with awk, I'll let it be and force expire to get
rid of the maps.
 
>-- 
>$10 million equals 18 PM       |     Henry Spencer at U of Toronto Zoology
>(Pentagon-Minutes). -Tom Neff  | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
-- 
Bob Thrush                 UUCP: {ucf-cs,rtmvax}!tarpit!rd
Automation Intelligence,   1200 W. Colonial Drive, Orlando, Florida 32804

dr@myrias.com (Dragos Ruiu) (07/25/89)

In article <1989Jul16.000620.10241@tarpit.uucp> rd@tarpit.UUCP (Bob Thrush) writes:
>
>  I have been running C News since July 5.  I am extremely
>impressed with the increase in performance and *much* easier
>administration.  With B News 2.11.14 and dbz, this system was
>processing about 12 articles/minute.  It is now achieving about
>28 articles/minute.  Many thanks to Henry and Geoff for an
>important improvement to news software!
>
   28 articles/sec !!! Gak. I'm getting >100/sec on my uPort 2.4 system. (using
dbz)

   Some suggestions:

      - Get the compress sources, and fudge a version of compress that only
	uses 12 bits. Compile in small model. This is a major speed win.
	(Just define PCXT in the sources and remove the microport
	specific patches if you have applied them.)

      - Compile news in the small model. Small model programs work MUCH
	faster. It seems to work fine in the small model.




>Bob Thrush                 UUCP: {ucf-cs,rtmvax}!tarpit!rd
>Automation Intelligence,   1200 W. Colonial Drive, Orlando, Florida 32804

-- 
Dragos Ruiu          What do you get when you cross a grape with an elephant ?
myrias!dr                        Grape Elephant Sine Theta

henry@utzoo.uucp (Henry Spencer) (08/04/89)

In article <617322137.22632@myrias.com> dr@myrias.com (Dragos Ruiu) writes:
>      - Compile news in the small model. Small model programs work MUCH
>	faster. It seems to work fine in the small model.

Some things may be a bit tight for space, since we haven't had a 16-bit
machine on hand for testing since utzoo transmuted itself into a Sun,
but everything in C News is thought to work in a 16-bit address space.
A number of people, both on pdp11s and on Intel machines, have reported
success (the smaller buffer in expire that showed up in one of our patches
was the result of some of their experience).

Note that you will need to tell "build" about it -- a number of things
are more byte-thrifty when they know that space is tight.
-- 
1961-1969: 8 years of Apollo.  |     Henry Spencer at U of Toronto Zoology
1969-1989: 20 years of nothing.| uunet!attcan!utzoo!henry henry@zoo.toronto.edu