lkml.org 
[lkml]   [1998]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Out Of Memory in v. 2.1
Bill Hawes wrote:
>
> Roy Bixler wrote:
>
> > I am running kernel 2.1.123 on a couple of workstations and find a
> > reliable way to make the machines completely non-responsive is simply
> > to run a buggy X application which tries to allocate more memory than
> > is availabe. The only way out is a hard reset or a Alt-SysRq
> > sequence. In ordinary circumstances, the memory and swap space on
> > each machine is perfectly adequate and so I don't see "get more
> > memory" as being a solution. I could just get rid of the buggy apps,
> > but feel that the system ought to offer some protection against the
> > Out Of Memory scenario (i.e. a program shouldn't be able to cause a
> > system freeze simply by using too much memory.)
>
> Can you send a pointer to a "buggy app" that illustrates the problem?


I've been testing Rick's OOM Killer (v2 only 'cause I cannot patch v3)
and this program works fine (well, maybe "fine" is not the right word)
-----------------------------------
#include <stdlib.h>
main()
{
while(1)
{
if( malloc(2048) == 0)
sleep(1);
}
}
-----------------------------------
This program shows how easy (snif :( ) is to crash a Unix/Linux system
without any big trick or root access. I call it leak.c
If you wish you can cut off the "if" and the "sleep" of the code, the
results are the same.

But before you start the program, be ready to use the reset button. I've
just tested this program with a 2.1.123 and it crashed my machine again.

When I tried Rick's patch it killed the leak process every time I
tested, but my patched system also killed netscape several times when
the system needed a lot of memory (not out of memory exactly), but I
could not patch OOM Killer against 2.1.121 and didn't see any new
version to check it out, so I don't have a final opinion.

Good luck

Dinamerico Schwingel
ds@conex.net

>
> OOM killers are dangerous and I'd like to think we can find a better
> solution.
>
> Regards,
> Bill
>
> >
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:44    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site