[comp.sys.mips] Mips m/120 no more processes/unable to allocate xxx errors

ams@gauss.Princeton.EDU (Andrew Simms) (11/20/89)

A few weeks back I posted an ariticle about a problem with memory
usage I was seeing on my m/120 system (16MB).  The problem was an
erroneous "No more processes" error that occurred during periods
of light to moderate use.  

I believe I have isolated the problem.  On some tips from customer
support at MIPs they suggested the real cause was probably running
out of memory.  Several net people suggested a similar cause.  
Well, you were all correct, but there may be an interesting cause behind
the memory problems.  

I currenty have 7 NCD Xwindow display stations who run xdm and the gwm
window manager package off the m/120.  I installed gwm a while ago 
when we had 3 Xterminals and we never saw a problem.  The no more processes
errors showed up with the additional terminals.  Closer examination of
the gwm executable showed it was revealed that it was 

/usr/local/bin/X11/gwm: mipseb demand paged stripped - version 2.0

According to the ld man page, to make an executable's text portion shared,
you link with the -n option, yielding this from file:

/usr/local/bin/X11/gwm: mipseb pure stripped - version 2.0

The problem seemed to disappear after relinking gwm, but I will not be
convinced that I really fixed anything for a while.  In the mean time,
could someone comment on -n linker option and whether or not a file
can be both demand paged and pure?  According to /etc/magic, the 68K 
seems to have such a combination.

Thanks in advance.
----------------------------------------------------------------------

  Andrew Simms					ams@acm.princeton.edu
  System Administrator
  Program in Applied and Computational Math
  Princeton University
  Princeton, NJ   08544
  609/258-5324 or 609/258-6227
  609/258-1054 (fax)

rogerk@mips.COM (Roger B.A. Klorese) (11/20/89)

In article <11637@phoenix.Princeton.EDU> ams@acm.Princeton.EDU (Andrew Simms) writes:
>could someone comment on -n linker option and whether or not a file
>can be both demand paged and pure?

The text segment of a demand-paged executable is always shared.  If loading
with "-n" removed your problem, it is not because of code becoming shared;
there must be another problem going on.  My guess is that it has to do with
the *reservation* of swap space for your program, not the actual use of it.
-- 
ROGER B.A. KLORESE      MIPS Computer Systems, Inc.      phone: +1 408 720-2939
928 E. Arques Ave.  Sunnyvale, CA  94086                        rogerk@mips.COM
{ames,decwrl,pyramid}!mips!rogerk
"I want to live where it's always Saturday."  -- Guadalcanal Diary

hartzell@boulder.Colorado.EDU (George Hartzell) (11/20/89)

In article <11637@phoenix.Princeton.EDU>, ams@gauss (Andrew Simms) writes:
>I currenty have 7 NCD Xwindow display stations who run xdm and the gwm
>window manager package off the m/120.  I installed gwm a while ago 
>when we had 3 Xterminals and we never saw a problem.  The no more processes
>errors showed up with the additional terminals.  Closer examination of
>the gwm executable showed it was revealed that it was 

I haven't installed gwm on our system (yet...), but had a "running out
of memory" problem on our M-2000 system (with 32 Mb and LOTS of swap
space) while running some software that used the GNU regexp stuff.
The problem was that the regexp package uses alloca, and needs to have
C_ALLOCA #defined so that it forces garbage collection every so often.
Since there was an alloca in libc.a, I didn't use Doug Gwyn's C alloca
package, and so I didn't #define C_ALLOCA.  It turned out that the
alloca in libc is Doug's C version, not a "true" one.  #defining
C_ALLOCA fixed my problems.  

So, you might want to check whether gwm uses alloca, and if so check
to see if it garbage collects based on an #ifdef C_ALLOCA.

g.

George Hartzell			                  (303) 492-4535
 MCD Biology, University of Colorado-Boulder, Boulder, CO 80309
hartzell@Boulder.Colorado.EDU  ..!{ncar,nbires}!boulder!hartzell