[comp.unix.admin] MAXUPRC broken in SunOS 4.1

jlf@mirsa.inria.fr (Jean-Louis Faraut) (04/02/91)

Hi Christine,

we just ran into the same MAXUPRC problem a few weeks ago with SunOS
4.1_PSR_A on our 4/490. 

Looking at /sys/conf.comon/param.c, I saw the following lines :

#ifdef sparc
...
#undef MAXUPRC
#define MAXUPRC (NPROC - 5)

so to fix this problem, I commented out the two last lines and
recompiled the kernel and this have worked fine so far .

Hope this will help you ...

                           @
                          ,  ,,     ,,_._.
        	         /  //     //          Jean-Louis Faraut
        	        /  //     //--         
                  //   /  //     //            Administrateur Systeme
                 ((_._'  ((_._. //                   de l'ESSI
        	        	 
E-mail :             +-----------------------------------------------------+
jlf@cerisi.cerisi.fr | ESSI (Ecole Superieure des Sciences Informatiques)  |
jlf@mirsa.inria.fr   |               Sophia-Antipolis (France)             |
Tel. : 93 95 44 37   +-----------------------------------------------------+

My English is surely bad, but please note that I'm French and we do not
speak English here :-)

alan@frey.newcastle.edu.au (Alan Hargreaves) (04/03/91)

jlf@mirsa.inria.fr (Jean-Louis Faraut) writes:

>Looking at /sys/conf.comon/param.c, I saw the following lines :

>#ifdef sparc
>...
>#undef MAXUPRC
>#define MAXUPRC (NPROC - 5)

i just checked the value this gave for our system. OUCH.
effectively #define MAXUPRC 1029 

This is a real problem that it is NPROC - 5. Considering that most systems
would have more than 5 daemons running, it is quite possible for an
unknowledgeable (or malicious) user to use up all the process slots.

I have had both happen in the last few months. One was a user who
created a file (called dup) which contained the line "sh dup".

The other (which only happened last week) was an unknowledgeable user
who created a file called CONTENTS that had the title CONTENTS inside it,
he then proceeded to accidentally run it instead of editing it.

I was wondering exactly where the problem was. Perhaps SUN should do something
in the way of informing us poor sysadmins about this kind of thing.

Oh, BTW the patch sugessted defines MAXUPRC 25 which seems to be a little
more reasonable for most systems. Perhaps a bit small for here though ;-)

alan.
-- 
Alan Hargreaves (VK2MGL) alan@frey.newcastle.edu.au, Uni of Newcastle, UCS.
Ph: +61 49 215 512 Fax: +61 49 687 472 ICBM: 32 53 44.6 S / 151 41 52.6 E
"Romeo, Romeo, I'd know where you were if you had a telepager."
		Shelley on If Shakespeare had been an advertising executive.