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
| ||
|
Date: Thu, 11 Aug 2011 00:07:02 -0700 (PDT) From: Mahmood Naderan <nt_mahmood@...oo.com> To: David Rientjes <rientjes@...gle.com> Cc: Randy Dunlap <rdunlap@...otime.net>, "\"\"linux-kernel@...r.kernel.org\"\"" <linux-kernel@...r.kernel.org>, "\"linux-mm@...ck.org\"" <linux-mm@...ck.org> Subject: Re: running of out memory => kernel crash >The default behavior is to kill all eligible and unkillable threads until >there are none left to sacrifice (i.e. all kthreads and OOM_DISABLE). In a simple test with virtualbox, I reduced the amount of ram to 300MB. Then I ran "swapoff -a" and opened some applications. I noticed that the free spaces is kept around 2-3MB and "kswapd" is running. Also I saw that disk activity was very high. That mean although "swap" partition is turned off, "kswapd" was trying to do something. I wonder how that behavior can be explained? >Ok, so you don't have a /proc/pid/oom_score_adj, so you're using a kernel >that predates 2.6.36. Yes, the srv machine that I posted those results, has kernel before 2.6.36 // Naderan *Mahmood; ----- Original Message ----- From: David Rientjes <rientjes@...gle.com> To: Mahmood Naderan <nt_mahmood@...oo.com> Cc: Randy Dunlap <rdunlap@...otime.net>; ""linux-kernel@...r.kernel.org"" <linux-kernel@...r.kernel.org>; "linux-mm@...ck.org" <linux-mm@...ck.org> Sent: Thursday, August 11, 2011 8:39 AM Subject: Re: running of out memory => kernel crash On Wed, 10 Aug 2011, Mahmood Naderan wrote: > >If you're using cpusets or mempolicies, you must ensure that all tasks > >attached to either of them are not set to OOM_DISABLE. It seems unlikely > >that you're using those, so it seems like a system-wide oom condition. > > I didn't do that manually. What is the default behaviour? Does oom > working or not? > The default behavior is to kill all eligible and unkillable threads until there are none left to sacrifice (i.e. all kthreads and OOM_DISABLE). > For a user process: > > root@srv:~# cat /proc/18564/oom_score > 9198 > root@srv:~# cat /proc/18564/oom_adj > 0 > Ok, so you don't have a /proc/pid/oom_score_adj, so you're using a kernel that predates 2.6.36. > And for "init" process: > > root@srv:~# cat /proc/1/oom_score > 17509 > root@srv:~# cat /proc/1/oom_adj > 0 > > Based on my understandings, in an out of memory condition (oom), > the init process is more eligible to be killed!!!!!!! Is that right? > init is exempt from oom killing, it's oom_score is meaningless. > Again I didn't get my answer yet: > What is the default behavior of linux in an oom condition? If the default is, > crash (kernel panic), then how can I change that in such a way to kill > the hungry process? > You either have /proc/sys/vm/panic_on_oom set or it's killing a thread that is taking down the entire machine. If it's the latter, then please capture the kernel log and post it as Randy suggested. -- 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