Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Sep 2000 16:19:38 -0500
From:      Jason Kasper <j_dot_kasper@usa.net>
To:        stable@FreeBSD.ORG
Subject:   recent weirdness in cc1plus?
Message-ID:  <20000905161937.C58235@judea.firstblind.net>

next in thread | raw e-mail | index | archive | help
Hi there.  I just cvsup'd two nights ago and am experiencing weirdness
in regards to cc1plus.  I'm not sure if it is related to a recent change
in cc1plus, or the phase of the moon, or my having eaten chili for
dinner last night, but if anybody can help me with this, I'd appreciate
it. 

The problem that I'm having has only reared its ugly in head while I'm 
trying to compile kdelibs-20000829A via ports.  I guess the sheer size
of this monster is what could be triggering the symptoms, but I digress.

I'm running FreeBSD 4.1-STABLE and as I said above, I just cvsup'd two
nights ago (Sep  3 20:54 EST).  I am using a Compaq Armada 7800 laptop
with a Pentium II/Pentium II Xeon/Celeron (300.01-M Hz 686-class CPU),
64 megs of RAM, and 128 megs of swap space.  

   (gideon@judea:~) /usr/libexec/cc1plus -version
   (03:46P/538/ttyp9)
   GNU C++ version 2.95.2 19991024 (release) (i386-unknown-freebsd)
   compiled by GNU C version 2.95.2 19991024 (release).
   options passed: 
   options enabled:  -fpeephole -ffunction-cse -fkeep-static-consts
   -freg-struct-return -fexceptions -fsjlj-exceptions -fcommon
   -fgnu-linker
   -fargument-alias -fident -m80387 -mhard-float -mno-soft-float -mieee-fp
   -mfp-ret-in-387 -mno-fancy-math-387 -mschedule-prologue -mcpu=i386
   -march=pentium

What happens is that cc1plus goes merrily along, trying to compile 
its way through kdelibs-20000829A and does so with nary a complaint
until it hits here:

   Making all in mcopidl
   gmake[3]: Entering directory
   `/usr/ports/x11/kdelibs2/work/kdelibs-20000829A/arts/mcopidl'
   c++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../dcop -I../../kdecore
   -I../../kdeui -I/usr/X11R6/include/qt2 -I/usr/X11R6/include
   -I/usr/local/include  -I./../mcop  -I/usr/local/include
   -I/usr/local/include  -pipe -O -march=pentiumpro -mpentiumpro
   -fmemoize-lookups -fsave-memoized -frtti  -c mcopidl.cc

At this point, top shows:

  PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
59072 root      47   0 38632K 37788K RUN      0:26 65.61% 56.30% cc1plus

After about a half a minute of compiling, it appears that cc1plus goes
into a tailspin and starts steadily chewing up memory.  It doubles its
SIZE and the RES memory shown below will continue growing until it eats
up all of my swap space and the box grinds to a halt until I kill it
off.  I also get a gazillion of the dreaded "/kernel: swap_pager: out 
of swap space" and "/kernel: swap_pager_getswapspace: failed" messages.

  PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
59072 root     -22   0 86088K 14624K swread   0:30 15.82% 15.43% cc1plus

Now, I tried to solve the problem by lowering the memory parameters in
/etc/login.conf for default and then re-running 'cap_mkdb /etc/login.conf', 
as shown below....

default:\
  :cputime=unlimited:\
  :datasize=unlimited:\
  :stacksize=unlimited:\
  :memorylocked=40M:\
  :memoryuse=40M:\
  :memoryuse-cur=40M:\
  :filesize=unlimited:\
  :coredumpsize=unlimited:\
  :openfiles=unlimited:\
  :maxproc=unlimited:\
  :sbsize=unlimited:\
  :priority=0:\
  :ignoretime@:\
  :umask=022:

Apparently, this had no effect, as when I logged out and back in again
and tried the whole thing again, I still get a mutating cc1plus that
kills my box.

So I guess my questions are:
 1) Has anybody ever seen this type of anti-social behavior before?  
 2) What am I doing wrong in my /etc/login.conf such that this
    anti-social behavior is not stopped before it's allowed to use up
    all of my swap space and generally do no-so-nice things to my
    machine?

Any help would be GREATLY appreciated--not so much because I want to run
kde2, but I'd really like to prevent this sort of thing from
happening--no matter what tries to cause it.  Thanks very much....

-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=
Jason Kasper (vanRijn)
Systems     Engineer
bash$ :(){ :|:&};:
VORFA


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000905161937.C58235>