linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] forkbomb killer
@ 2011-03-24  9:22 KAMEZAWA Hiroyuki
  2011-03-24  9:25 ` [PATCH 1/5] forkbomb killer config and documentation KAMEZAWA Hiroyuki
                   ` (5 more replies)
  0 siblings, 6 replies; 28+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-03-24  9:22 UTC (permalink / raw)
  To: linux-mm@kvack.org
  Cc: linux-kernel@vger.kernel.org, rientjes@google.com, Andrey Vagin


Cleaned up and fixed unclear logics. and removed RFC.
Maybe this version is easy to be read.


When we see forkbomb, it tends can be a fatal one.

 When A user makes a forkbomb (and sometimes reaches ulimit....
   In this case, 
   - If the system is not in OOM, the admin may be able to kill all threads by
     hand..but forkbomb may be faster than pkill() by admin.
   - If the system is in OOM, the admin needs to reboot system.
     OOM killer is slow than forkbomb.

So, I think forkbomb killer is appreciated. It's better than reboot.

At implementing forkbomb killer, one of difficult case is like this

# forkbomb(){ forkbomb|forkbomb & } ; forkbomb

With this, parent tasks will exit() before the system goes under OOM.
So, it's difficult to know the whole image of forkbomb.

This patch introduce a subsystem to track mm's history and records it
even after the task exit. (It will be flushed periodically.)

I tested with several forkbomb cases and this patch seems work fine.

Maybe some more 'heuristics' can be added....but I think this simple
one works enough. Any comments are welcome.
Thanks,
-Kame


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2011-04-14 18:13 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24  9:22 [PATCH 0/4] forkbomb killer KAMEZAWA Hiroyuki
2011-03-24  9:25 ` [PATCH 1/5] forkbomb killer config and documentation KAMEZAWA Hiroyuki
2011-03-24  9:26 ` [PATCH 2/5] forkbomb: mm tracking subsystem KAMEZAWA Hiroyuki
2011-03-24  9:28 ` [PATCH 3/5] forkbomb : mm histroy scanning and locks KAMEZAWA Hiroyuki
2011-03-24  9:29 ` [PATCH 4/5] forkbomb : periodic flushing mm history information KAMEZAWA Hiroyuki
2011-03-24  9:30 ` [PATCH 5/5] forkbomb killer KAMEZAWA Hiroyuki
2011-03-24 10:52 ` [PATCH 0/4] " Minchan Kim
2011-03-25  0:04   ` KAMEZAWA Hiroyuki
2011-03-25  2:38     ` Minchan Kim
2011-03-25  2:54       ` KAMEZAWA Hiroyuki
2011-03-25  4:05         ` Minchan Kim
2011-03-25 13:45           ` Colin Walters
2011-03-26  0:04             ` Hiroyuki Kamezawa
2011-03-26  2:34           ` Michel Lespinasse
2011-03-26  8:48             ` Hiroyuki Kamezawa
2011-03-28 16:21               ` Minchan Kim
2011-03-28 23:50                 ` KAMEZAWA Hiroyuki
2011-03-29  0:24                   ` Minchan Kim
2011-03-29  0:32                     ` KAMEZAWA Hiroyuki
2011-03-29  1:12                       ` Minchan Kim
2011-03-29  1:12                         ` KAMEZAWA Hiroyuki
2011-03-29  1:27                           ` Minchan Kim
2011-04-14  0:20                             ` KOSAKI Motohiro
2011-04-14  0:35                               ` KAMEZAWA Hiroyuki
2011-04-14  0:57                                 ` Minchan Kim
2011-04-14 18:13                                   ` David Rientjes
2011-03-28 23:46               ` Michel Lespinasse
2011-03-29  0:25                 ` KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).