Re: fork: out of memory

David Whysong (dwhysong@physics.ucsb.edu)
Mon, 24 Nov 1997 00:29:43 -0800 (PST)


On Sun, 23 Nov 1997, David E. Fox wrote:

> With 2.1.65 I've noticed a couple 'fork: out of memory'
> messages that I think are spurious. At least there was
> plenty of free memory left at the times I got these
> messages. The last time I got it it came from cron's
> run-parts script (I am on a Red Hat 4.2 system) and
> it was mailed to root.
>
> I also got an awk help display on the screen.
>
> Anyone else seen this?

All the time. I think the memory management needs some work...

Here is an interesting example... I'm running on a dual P-133 with 32 megs
RAM and 117 megs swap, if you have more RAM you might have to do things
differently. Download a bunch of large .jpg files (I use stuff from
www.stsci.edu, you can get some nice HST images from the directory
/pubinfo/Pictures.html). Load 'em all at once:

$ for x in *
> do xli $x &
> done

Things grind along for a while, and then everything just stops. The mouse
will move, but I can't bring windows into focus or do anything. Then
switch to a text console, login, and try to do something. In some
situations, I can't even login -- I get a "fork: out of memory" error when
it tries to bring up the shell. Sometimes I can log in.

If you then free up some RAM by doing a "dd if=/dev/hda of=/dev/null
bs=15000k count=1" and switch back to X, the images will finish loading.

I did try "echo '128 256 512' > /proc/sys/vm/freepages" and it may have
helped a little, but the problem did not go away. Kernel 2.1.65, pretty
normal config.

Dave

David Whysong dwhysong@physics.ucsb.edu
Astrophysics graduate student, University of California, Santa Barbara
PGP Key fingerprint = 9D 51 6E CE 5F 38 F0 E7 56 3C 01 45 CF 03 9F 4A
Finger for PGP public key.