[comp.unix.i386] C news fast stdio fails regression test on 386/ix.

greyham@hades.ausonics.oz.au (Greyham Stoney) (08/10/90)

We have about the processing power of a wet fish at our site, so I'd really
like to be able to use C news's faster stdio functions. 

When libstdio/runtrials is run, it passes every test except the last one
(stdiock.fast) when its output is NOT redirected or piped, and it says:

> your stdio seems to be compatible (_ptr) incompatible (_cnt) with stdio.fast

Has anyone else running ISC 386/ix noticed this problem, and is there any
easy fix, or do I have to make to with the library stdio?.

						thanks.
							Greyham.

ps: slip a copy to me in the mail if you post a reply please!.
-- 
/*  Greyham Stoney:                            Australia: (02) 428 6476
 *  greyham@hades.ausonics.oz.au - Ausonics Pty Ltd, Lane Cove, Sydney, Oz.
 *		Neurone Server: Brain Cell not Responding.
 */

davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) (08/10/90)

In article <803@hades.ausonics.oz.au> greyham@hades.ausonics.oz.au (Greyham Stoney) writes:
| We have about the processing power of a wet fish at our site, so I'd really
| like to be able to use C news's faster stdio functions. 

| Has anyone else running ISC 386/ix noticed this problem, and is there any
| easy fix, or do I have to make to with the library stdio?.

  If you think the 386 has the power of a wet fish, think of all the
people running news on VAX 730, 750, 780 boxes, and Sun2. Anyway CPU
doesn't seem to be a problem, I just looked at 12 hours processing on a
386SX getting a full feed, and the total real time for all processes
running as news was 1951.58 sec, while the CPU was only 157.72. I see no
reason to worry about CPU at that rate, although a slow disk will eat
several hours of disk time.

  Oh, and this was with B news, a slow disk, and non-DBM history files
due to an install bug. Yes, it's a test system, at the moment it has no
usage in the world except running news and testing various o/s releases.
-- 
bill davidsen	(davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
 "This is your computer. This is your computer on OS/2. Any questions?"

henry@zoo.toronto.edu (Henry Spencer) (08/10/90)

In article <803@hades.ausonics.oz.au> greyham@hades.ausonics.oz.au (Greyham Stoney) writes:
>When libstdio/runtrials is run, it passes every test except the last one...
>Has anyone else running ISC 386/ix noticed this problem, and is there any
>easy fix, or do I have to make to with the library stdio?.

You probably have to make do with the library stdio.  Pity.  Unfortunately,
there are starting to be a *lot* of incompatible stdios out there in the
world.  Geoff might be able to deal with this if he knew precisely what
was going on inside them, but between the shortage of System V around
here and the difficulty of figuring out what's going on without source,
it's not likely to happen.
-- 
It is not possible to both understand  | Henry Spencer at U of Toronto Zoology
and appreciate Intel CPUs. -D.Wolfskill|  henry@zoo.toronto.edu   utzoo!henry

tpf@jdyx.UUCP (Tom Friedel) (08/11/90)

henry@zoo.toronto.edu (Henry Spencer) writes:

>You probably have to make do with the library stdio.  Pity.  Unfortunately,

I have run C-news with the fast stdio library since C-News first came
out, ignoring the error in the stdio library tests.  No problems that I
am aware of.  This is on Interactive 2.0.2.

What doesn't work for me is the setuid( geteiud()) and the spacefor
file, which I succesfully replaced with  'echo 10000'

tom friedel


-- 
Tom Friedel  JDyx Enterprises (404) 320-7624 tpf@jdyx.UUCP 
Unix BBS:  (404) 325-1719 <= 2400 ; (404) 321-5020 >= 2400
"Live simply, so that others may simply live."
 

jackv@turnkey.tcc.com (Jack F. Vogel) (08/13/90)

In article <1990Aug10.221410.8502@jdyx.UUCP> tpf@jdyx.UUCP (Tom Friedel) writes:
>I have run C-news with the fast stdio library since C-News first came
>out, ignoring the error in the stdio library tests.  No problems that I
>am aware of.  This is on Interactive 2.0.2.
 
Interesting, I had been paranoid since it failed that one test, I don't
suppose you have any idea on how much performance is gained, Cnews even
with the stock stdio is peppy enough that I don't know if its really worth
the bother.

>What doesn't work for me is the setuid( geteiud()) and the spacefor
>file, which I succesfully replaced with  'echo 10000'
 
Right setuid(geteuid()) just plain will not work, it doesn't work on AIX
either, in fact I suspect the majority of systems will not. However, there
is no reason not to use spacefor, it really is a nice feature. It is just
that it is the most system-dependent aspect to the whole Cnews package.
It is quite simple to get it to work with ISC. Change line 54 of the script
to look as follows:

	df $arg | sed "s/.*://" | awk "BEGIN { nf = 1 ; nr = 1 }

Also, this should be based on the spacefor.sysv prototype. Having this script
really work can keep you from overflowing filesystems, so its really not
desireable to shortcircuit it.

Disclaimer: ME, speak for Locus?? Surely you jest :-}!

-- 
Jack F. Vogel			jackv@locus.com
AIX370 Technical Support	       - or -
Locus Computing Corp.		jackv@turnkey.TCC.COM

clewis@eci386.uucp (Chris Lewis) (08/15/90)

In article <1990Aug12.211727.17535@turnkey.tcc.com> jackv@turnkey.TCC.COM (Jack F. Vogel) writes:

> Right setuid(geteuid()) just plain will not work, it doesn't work on AIX
> either, in fact I suspect the majority of systems will not.

Before trying this mechanism, I recommend checking your manuals.  AIX 3
(RS/6000) even has the "setr[ug]id()" calls, but they're dummies that ALWAYS
return failure (confuses Perl Configure somewhat).  "setuid(geteuid())"
will NEVER work on systems that reflect SVR5.3 setuid() semantics (eg:
SVID compliant systems).  The semantics are roughly (if effective ain't
root):
    - you can only setuid(getruid()), OR
    - setuid(saved_uid); Which has the effect of changing the effective
      userid to the effective userid of the program.
(eg: you can setuid to the real user, and you can setuid back to the
original set-user-id, but NEITHER will change real id.  C-news wants
to be able to set the real userid)

Worse, in SVR5.2 and previous, there's no saved-group concept (at least
in our 3b1's that is)

> However, there
> is no reason not to use spacefor, it really is a nice feature. It is just
> that it is the most system-dependent aspect to the whole Cnews package.
> It is quite simple to get it to work with ISC. Change line 54 of the script
> to look as follows:
 
> 	df $arg | sed "s/.*://" | awk "BEGIN { nf = 1 ; nr = 1 }

Even simpler, on our 1.0.6 386/ix, saying you have a "xenix" df works
fine without having to muck with source.
-- 
Chris Lewis, Elegant Communications Inc, {uunet!attcan,utzoo}!lsuc!eci386!clewis
Ferret mailing list: eci386!ferret-list, psroff mailing list: eci386!psroff-list
Psroff information/questions: psroff-request@eci386

ed@maxed.amg.com (Ed Whittemore) (08/15/90)

In article <1990Aug10.154632.6474@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes:
>In article <803@hades.ausonics.oz.au> greyham@hades.ausonics.oz.au (Greyham Stoney) writes:
>>When libstdio/runtrials is run, it passes every test except the last one...
>>Has anyone else running ISC 386/ix noticed this problem, and is there any
>>easy fix, or do I have to make to with the library stdio?.
>
>You probably have to make do with the library stdio.  Pity.  Unfortunately,
>there are starting to be a *lot* of incompatible stdios out there in the
>world.  Geoff might be able to deal with this if he knew precisely what
>was going on inside them, but between the shortage of System V around
>here and the difficulty of figuring out what's going on without source,
>it's not likely to happen.
>-- 
>It is not possible to both understand  | Henry Spencer at U of Toronto Zoology
>and appreciate Intel CPUs. -D.Wolfskill|  henry@zoo.toronto.edu   utzoo!henry

The stdio is plenty fast and if u use dbz the whole process of un-
compressing and posting a full newsfeed takes less than 20 min.--
on our 386.

-- 
Ed Whittemore   uunet!maxed!ed   ed@maxed.amg.com
American Micro Group, Inc.   201-944-3293

ronald@robobar.co.uk (Ronald S H Khoo) (08/15/90)

In article <1990Aug14.180838.16019@eci386.uucp> clewis@eci386.UUCP (Chris Lewis) writes:

> C-news wants
> to be able to set the real userid

which of course it doesn't actually _need_ to do on most sysV's because
all it wants the real id changed for is to get the ownership of newly
made directories right (ie owned by news) which it _could_ do with
chown() on [ most of ? all of ? ] these systems.

However Henry doesn't seem to like code littered with ugly #ifdefs all
over the place to do things differently for different systems if he can
avoid in in any way at all.  That seems perfectly sensible to me...
it's really the fault of whatever circumstances led to us having so
much divergence in the way our different Unices(*) work.

It's is a completely different philosophy from, say, Larry Wall's
which is to compromise the elegance of his code (and give him MUCH more
maintenance headache) and completely fill (+) his code with #ifdefs to make
sure it "does the natural thing" no matter what operating system you're
using.

There are different compromises either way.  In fact, you lose either way.

Such, as they say, is life.

(*) Unices is a colloquial plural of a certain well-known AT&T Trademark.
(+) OK so I'm exaggerating a little :-)
-- 
Eunet: Ronald.Khoo@robobar.Co.Uk  Phone: +44 81 991 1142  Fax: +44 81 998 8343
Paper: Robobar Ltd. 22 Wadsworth Road, Perivale, Middx., UB6 7JD ENGLAND.