Re: Behavior under swap catastrophe?

Rudolf Leitgeb (leitgeb@variable.stanford.edu)
14 Feb 1997 02:25:24 GMT


Joe Fouche (jf@ugcs.caltech.edu) wrote:
: I've noticed lately that the behavior of the kernel when some process goes
: berserk and fills up all the swap is a little strange. It seems to start sending
: SEGV's to many processes as the large one grows. This wouldn't be so bad, except
: that init is often killed. Is a modification to protect the life of init in order?
: Or should we just make sure this never happens?

I guess the reason for these SEGV's is that processes try to malloc
chunks of memory, don't get any but forget to check the return value of
malloc. In order to prevent init from dying init would be required not
to allocate any memory (which is impossible. It forks other processes).

If init dies, you get logged out and the offensive process (the one that
eats all the memory) is terminated. But usually at least the operating
system survives. The only way to prevent a process from eating too much
memory is limit/ulimit (I've heard not even these always work).

Rudi