Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jan 1997 14:49:28 +0100 (MET)
From:      grog@lemis.de
To:        FreeBSD-current@FreeBSD.ORG (FreeBSD current users)
Subject:   Swap leak in -current?
Message-ID:  <199701031349.OAA15162@freebie.lemis.de>

next in thread | raw e-mail | index | archive | help
I've just failed a 'make world' for the second time after running out
of swap space.  I don't understand why: it looks like the make process
is using up swap at a ridiculous rate.  Here's the scenario:  Pentium
133 with 64 MB of memory, a hungry X server using about a third of
this, two swap spaces with a total of 150 MB.

When I start 'make world', I have about 30% swap usage--in other
words, about 100 MB empty.  As the build goes on, more and more swap
gets used up.  Finally, the whole thing falls over, and swap usage
goes back to what it was before the start.  I'm not using mfs, so it
can't be that.  Here are a few outputs:

(just now)
=== root@freebie (/dev/ttyp6) /home/grog 6 -> uname -a
FreeBSD freebie.lemis.de 3.0-CURRENT-ctm-2884 FreeBSD 3.0-CURRENT-ctm-2884 #165: Fri Jan  3 10:53:40 MET 1997     grog@freebie.lemis.de:/src/FREEBIE/sys/compile/FREEBIE  i386

(just before the crash)
=== grog@freebie (/dev/ttyp4) ~ 18 -> vmstat 2
 procs   memory     page                    disks         faults      cpu
 r b w   avm   fre  flt  re  pi  po  fr  sr s0 s1 s2 w0   in   sy  cs us sy id
 2 4 0 39524 24464  383   9   2   2 386 724  2  4  0 24  293  793 106 49 15 36
 0 2 0 39528 24052  106   3  22   0  69   0  9  0  0  7  314  316  72  2  9 88
^C

Note here that I have 24 MB free.  

=== grog@freebie (/dev/ttyp4) ~ 19 -> ps aux
USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
root       239  1.9 37.3 24280 23524  ??  R    11:12AM    3:17.28 X :0
grog       247  1.3  1.5   724  924  v0  I    11:12AM    1:30.82 xearth
root         2  0.6  0.0     0   12  ??  DL   12:12PM    0:36.89  (pagedaemon)
root         3  0.0  0.0     0   12  ??  DL   12:12PM    0:00.00  (vmdaemon)
root         4  0.0  0.0     0   12  ??  DL   12:12PM    0:08.95  (update)
root        26  0.0  0.0   200   12  ??  Is   12:12PM    0:00.00 adjkerntz -i
root        88  0.0  0.5   404  336  ??  Ss   11:12AM    0:03.81 named
root       112  0.0  0.5   196  328  ??  Ss   11:12AM    0:00.70 syslogd
daemon     117  0.0  0.4   176  216  ??  Is   11:12AM    0:00.01 portmap
root       124  0.0  0.0   532   12  ??  Is   11:12AM    0:00.25 mountd -n
root       137  0.0  0.4   196  216  ??  Is   11:12AM    0:00.17 inetd
root       144  0.0  0.5   332  284  ??  Ss   11:12AM    0:00.19 cron
root       146  0.0  0.4   196  216  ??  Is   11:12AM    0:00.02 lpd
root       149  0.0  0.4   496  216  ??  Is   11:12AM    0:00.02 sendmail: accepting connections on port 25 (sendmail)
root       192  0.0  0.4   232  256  ??  Ds   11:12AM    0:01.46 /usr/local/bin//bisdnd -s 24 -C /etc/isdn.connectscrip
grog       204  0.0  0.3  1044  208  v0  Is   11:12AM    0:00.31 -bash (bash)
root       205  0.0  0.3   164  192  v1  Is+  11:12AM    0:00.02 /usr/libexec/getty Pc ttyv1
root       206  0.0  0.3   164  192  v2  Is+  11:12AM    0:00.02 /usr/libexec/getty Pc ttyv2
root       207  0.0  0.3   164  192  v3  Is+  11:12AM    0:00.02 /usr/libexec/getty Pc ttyv3
root       208  0.0  0.3   164  192  v4  Is+  11:12AM    0:00.02 /usr/libexec/getty Pc ttyv4
root       209  0.0  0.3   164  192  v5  Is+  11:12AM    0:00.02 /usr/libexec/getty Pc ttyv5
root       210  0.0  0.3   164  192  v6  Is+  11:12AM    0:00.02 /usr/libexec/getty Pc ttyv6
root       211  0.0  0.3   164  192  v7  Is+  11:12AM    0:00.02 /usr/libexec/getty Pc ttyv7
root       212  0.0  0.3   164  192  v8  Is+  11:12AM    0:00.02 /usr/libexec/getty Pc ttyv8
root       213  0.0  0.3   156  212  ??  I    11:12AM    0:00.08 /usr/libexec/getty Pc ttyv10
grog       238  0.0  0.3   188  212  v0  I+   11:12AM    0:00.05 xinit
grog       241  0.0  0.2   484  124  v0  I    11:12AM    0:00.07 sh /home/grog/.xinitrc
grog       246  0.0  0.9   736  548  v0  I    11:12AM    2:08.83 xearth
root       255  0.0  0.6   544  376  v0  S    11:12AM    0:03.35 xterm -e dovm
root       256  0.0  0.7   548  416  v0  S    11:12AM    0:03.49 xterm -e doio
root       257  0.0  0.9   660  556  v0  S    11:12AM    0:00.34 xterm -e domessages
root       258  0.0  0.8   676  528  v0  S    11:12AM    0:01.79 xterm
root       261  0.0  1.1   676  696  v0  S    11:12AM    0:08.47 xterm
root       262  0.0  1.1   676  672  v0  R    11:12AM    0:00.65 xterm
grog       264  0.0  0.6   252  392  v0  S    11:12AM    0:00.31 xbiff
grog       266  0.0  0.7  1884  440  v0  S    11:12AM    0:05.69 mwm -multiscreen
grog       269  0.0  1.0  1040  636  p4  Ss   11:12AM    0:00.51 -bash (bash)
grog       270  0.0  0.2   480  104  p2  Is+  11:12AM    0:00.04 sh ./dovm
grog       271  0.0  0.2   480  104  p3  Is+  11:12AM    0:00.04 sh ./doio
root       272  0.0  1.0  1012  604  p5  Ss+  11:12AM    0:00.78 su (bash)
grog       273  0.0  0.3   480  156  p1  Ss+  11:12AM    0:01.81 sh ./domessages
grog       274  0.0  0.4   228  252  p3  S+   11:12AM    0:01.63 iostat -w 5
grog       275  0.0  0.1   264   72  p3  S+   11:12AM    0:03.56 src/display 1000 1000 2000 100 20 2000 100 20 2000 100
grog       276  0.0  0.4   240  256  p2  S+   11:12AM    0:26.53 vmstat -w 5
grog       277  0.0  0.1   264   72  p2  S+   11:12AM    0:03.95 src/display 10 10 10 100000 60000 2000 1000 100 100 10
grog       279  0.0  0.3   220  180  p1  S+   11:12AM    0:01.01 tail -f /var/log/messages
grog       291  0.0  0.7  1040  448  p6  Ss   11:12AM    0:04.92 -bash (bash)
grog       362  0.0  0.9   740  564  v0  I    11:15AM    1:23.96 xearth
grog       363  0.0  0.9   628  564  v0  I    11:15AM    1:22.01 xearth
root       425  0.0  0.0   224   12  ??  I    11:18AM    0:00.11 nfsd.old: server (nfsd.old)
root       426  0.0  0.0   224   12  ??  I    11:18AM    0:00.00 nfsd.old: server (nfsd.old)
root       427  0.0  0.0   224   12  ??  I    11:18AM    0:00.00 nfsd.old: server (nfsd.old)
root       428  0.0  0.0   224   12  ??  I    11:18AM    0:00.00 nfsd.old: server (nfsd.old)
grog     14250  0.0  0.1   168   36  p1  S+    1:36PM    0:00.01 sleep 30
grog     14302  0.0  0.1   168   36  p6  S+    1:36PM    0:00.01 sleep 10
root         0  0.0  0.0     0    0  ??  DLs  12:12PM    0:00.05  (swapper)
grog     14308  0.0  0.5   464  280  p4  R+    1:36PM    0:00.00 ps -aux
root         1  0.0  0.1   448   80  ??  Ss   12:12PM    0:00.11 /sbin/init --

The strange thing here is that the 'make world' doesn't show.  It was
on /dev/ttyp5, but all I see here is a 'su'.  At the time it crashed,
it was compiling libc:

gcc -fpic -DPIC -O -DLIBC_RCS -DSYSLIBC_RCS -D__DBINTERFACE_PRIVATE -DPOSIX_MISTAKE -I/src/FREEBIE/lib/libc/locale -DYP -c /src/FREEBIE/lib/libc/net/getservbyport.c -o getservbyport.so
gcc -fpic -DPIC -O -DLIBC_RCS -DSYSLIBC_RCS -D__DBINTERFACE_PRIVATE -DPOSIX_MISTAKE -I/src/FREEBIE/lib/libc/locale -DYP -c /src/FREEBIE/lib/libc/net/getservent.c -o getservent.so
gcc: virtual memory exhausted
*** Error code 1

On another window, I had a 'pstat -s' running with a 10 second delay.
Here's what happened when it came to the crunch:

Fri Jan  3 13:36:15 MET 1997
Device      1024-blocks     Used    Avail Capacity  Type
/dev/wd0s1b       51200    50872      264    99%    Interleaved
/dev/sd0b         98175    97600      511    99%    Interleaved
Total            149247   148472      775    99%

Jan  3 12:35:16 freebie /kernel: swap_pager: out of swap space

Fri Jan  3 13:36:25 MET 1997
Device      1024-blocks     Used    Avail Capacity  Type
/dev/wd0s1b       51200    22256    28880    44%    Interleaved
/dev/sd0b         98175    22216    75895    23%    Interleaved
Total            149247    44472   104775    30%

I'm going to stop X and try again, but I don't think it'll make much
difference.  What's strange is that there doesn't seem to be any
relationship between the ps display and the use of memory.  Am I
collecting fat zombies?

Greg



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