Kernel 2.0.31pre9 memory leak (or where did all the memory go?)

Daniel Ryde (ryde@tripnet.se)
Mon, 22 Sep 1997 10:05:51 +0200 (CEST)


Pre9 is not working properly. We have several machines running it and
after an amount of time (a couple of days) all the memory has vanished.
This is dial-in ppp/web/mail/shell servers whith average 10 simultanious
logins. The memory is not eaen by any process as you can se below.
Maby there should be some memory statistics for the kernel in the /proc
system. Or is there any way of determinig where the memory have gone?
I guess this is a kernel memory leak as kernel 2.0.29 works just fine.

Hardware:
ASUS P/I-P55TP4XE
P5/133 Mhz
Memory: 31132k/32768k available (564k kernel code, 384k reserved, 688k data)
ide: i82371 PIIX (Triton) on PCI bus 0 function 57
ide0: BM-DMA at 0xe800-0xe807
ide1: BM-DMA at 0xe808-0xe80f
hda: QUANTUM FIREBALL1280A, 1222MB w/83kB Cache, CHS=621/64/63, DMA
eth0: 3Com 3c590 Vortex 10Mbps at 0xe400, 00:20:af:cf:21:35, IRQ 10
32K byte-wide RAM 1:1 Rx:Tx split, 10baseT interface.
3c59x.c:v0.44 9/9/97

$ free
total used free shared buffers cached
Mem: 31132 30552 580 3208 356 1132
-/+ buffers: 29064 2068
Swap: 66492 4456 62036

$ ps auxww
USER PID %CPU %MEM VSZ RSS TT STAT START TIME COMMAND
daemon 104 0.0 0.0 840 0 ? SW Sep 16 0:00 rpc.portmap
root 1 0.0 0.0 824 0 ? SW Sep 16 1:18 init
root 2 0.0 0.0 0 0 ? SW Sep 16 0:06 kflushd
root 3 0.0 0.0 0 0 ? SW< Sep 16 0:25 kswapd
root 9 0.0 0.1 796 44 ? S Sep 16 0:40 update
root 93 0.0 0.2 856 88 ? S Sep 16 1:24 /sbin/syslogd
root 95 0.0 0.0 916 0 ? SW Sep 16 0:00 klogd
root 106 0.0 0.0 816 20 ? S Sep 16 0:37 inetd
root 150 0.0 0.4 1072 132 ? S Sep 16 0:01 /usr/sbin/apache
root 158 0.0 0.0 1124 0 ? SW Sep 16 0:35 sshd
root 164 0.0 0.1 836 44 ? S Sep 16 0:01 cron
root 169 0.0 0.1 996 44 ? S Sep 16 0:00 /usr/sbin/nsrexecd
root 173 0.0 0.0 812 0 2 SW Sep 16 0:00 getty
root 212 0.0 0.0 812 0 1 SW Sep 16 0:00 getty
root 7512 0.0 0.0 980 0 Sl SW 00:51 0:00 pppd
root 7559 0.0 0.4 960 152 Sq S 00:59 0:00 pppd
root 7571 0.0 0.0 868 0 ? SW 01:00 0:00 mgetty
root 7575 0.0 0.0 868 0 ? SW 01:01 0:00 mgetty
root 7728 0.0 0.0 868 0 ? SW 01:23 0:00 mgetty
root 7770 0.0 0.0 868 0 ? SW 01:31 0:00 mgetty
root 7774 0.0 0.0 868 0 ? SW 01:32 0:00 mgetty
root 7797 0.0 0.0 868 0 ? SW 01:39 0:00 mgetty
root 7846 0.0 0.0 868 0 ? SW 01:50 0:00 mgetty
root 7873 0.0 0.0 868 0 ? SW 01:58 0:00 mgetty
root 7883 0.0 0.0 868 0 ? SW 02:00 0:00 mgetty
root 7902 0.0 0.0 868 0 ? SW 02:03 0:00 mgetty
root 7998 0.0 0.0 868 0 ? SW 02:24 0:00 mgetty
root 8045 0.0 0.0 868 0 ? SW 02:38 0:00 mgetty
root 8158 0.0 0.0 868 0 ? SW 03:04 0:00 mgetty
root 8200 0.0 0.0 868 0 ? SW 03:15 0:00 mgetty
root 8260 0.0 0.0 868 0 ? SW 03:26 0:00 mgetty
root 8339 0.0 0.0 868 4 ? S 03:44 0:00 mgetty
root 8406 0.0 0.2 1088 64 ? S 03:59 0:00 nsrexecd
root 8407 0.3 0.0 1832 0 ? SW 03:59 0:36 save
root 8574 0.0 0.0 868 0 ? SW 04:29 0:00 mgetty
root 8669 0.0 0.0 868 0 ? SW 04:49 0:00 mgetty
root 8774 0.0 0.0 868 0 ? SW 05:03 0:00 mgetty
root 8908 0.0 0.0 868 0 ? SW 05:28 0:00 mgetty
root 9014 0.0 0.0 868 16 ? S 05:45 0:00 mgetty
root 9113 0.0 0.0 868 0 ? SW 06:04 0:00 mgetty
root 9280 0.0 0.0 868 0 ? SW 06:40 0:00 mgetty
root 9284 0.0 0.0 836 12 ? S 06:42 0:00 cron
root 9286 0.0 0.0 808 8 ? S 06:42 0:00 run-parts
root 9569 0.0 1.2 1412 380 ? S 06:45 0:00 sh /etc/cron.daily/userchk
root 9643 0.0 1.3 924 428 ? R 06:47 0:00 ps auxww
www-data 9355 0.0 0.9 1116 292 ? S 06:42 0:00 /usr/sbin/apache
www-data 9356 0.0 0.8 1084 276 ? S 06:42 0:00 /usr/sbin/apache
www-data 9357 0.0 1.2 1092 384 ? S 06:42 0:00 /usr/sbin/apache
www-data 9358 0.0 1.0 1084 320 ? S 06:42 0:00 /usr/sbin/apache
www-data 9359 0.0 1.0 1084 320 ? S 06:42 0:00 /usr/sbin/apache
www-data 9544 0.0 0.8 1084 272 ? S 06:43 0:00 /usr/sbin/apache
www-data 9549 0.0 0.6 1092 188 ? S 06:44 0:00 /usr/sbin/apache
www-data 9550 0.0 0.7 1084 248 ? S 06:44 0:00 /usr/sbin/apache
www-data 9551 0.0 0.7 1084 236 ? S 06:44 0:00 /usr/sbin/apache
www-data 9552 0.0 0.7 1084 240 ? S 06:44 0:00 /usr/sbin/apache

No network activity at this time. And as you can see most of the processes
are swapped out. Shortly after this point I had to hit the big red button.
The next machine that have similar hardware is shortly about to end up the
same way, and I had another similar machine yesterday where the big button
was the only way out (there was not enough memory to do a nice reboot).
So if you want some more info then you have to ask them now. I will
whithin a couple of days revert to 2.0.29 as these machines must be stable.

Best Regards

Daniel Ryde, System Administrator
__________________________________________________________________________
Tripnet AB Visit Address: Telephone: +46 31 7252500
Box 5071 Avagen 42 Fasicmile: +46 31 7252501
S-402 22 GOTEBORG GOTEBORG Email: ryde@tripnet.se
Sweden Sweden