lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070412081931.GB9842@1wt.eu>
Date:	Thu, 12 Apr 2007 10:19:31 +0200
From:	Willy Tarreau <w@....eu>
To:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
Cc:	Pedro <linux_user@...cksohn.com>, linux-kernel@...r.kernel.org
Subject: Re: tmpfs and the OOM killer

On Thu, Apr 12, 2007 at 10:13:05AM +0200, Jan Engelhardt wrote:
> 
> On Apr 11 2007 21:48, Willy Tarreau wrote:
> >On Wed, Apr 11, 2007 at 02:23:31AM -0300, Pedro wrote:
> >>   After suffering some days from a not|mis configured tmpfs,
> >> 
> >>   As the OOM killer is not Posix,
> >> 
> >>   Better than to kill processes would be to resize tmpfs, to use tmpfs empty 
> >> space.
> >
> >Will not work, because tmpfs does not use any memory for unused space. If
> >you don't believe me, simply create a large file on your tmpfs, then check
> >free memory, then remove the file and check free memory again.
> >
> >So your problem is not caused by the empty space on tmpfs, but either by
> >too much space used on tmpfs or by your application using too much memory.
> >
> >>   I'm using kernel 2.6.20.4. If someone ask I'll send a test application.
> >
> >Not needed, the one-liner "main(){while(malloc(4096));}" is enough to
> >trigger an OOM.
> 
> No, that won't do anything, malloc happily returns NULL after a few seconds.
> 
> int main()
> {
> 	while(1) {
> 		char *p = malloc(4096);
> 		*p = 1;
> 	}
> }
> 
> This is more likely to trigger OOM, because it actually dirties the page.

Yes, you're right, and that's indeed what my "freemem" program does ;-)

Willy

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ