From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: linux-kernel@vger.kernel.org
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"kosaki.motohiro@jp.fujitsu.com" <kosaki.motohiro@jp.fujitsu.com>,
"rientjes@google.com" <rientjes@google.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
Oleg Nesterov <oleg@redhat.com>,
"minchan.kim@gmail.com" <minchan.kim@gmail.com>,
avagin@openvz.org, kirill@shutemov.name
Subject: [RFC][PATCH 0/3] A forkbomb killer and mm tracking system
Date: Wed, 23 Mar 2011 13:23:23 +0900 [thread overview]
Message-ID: <20110323132323.f223fc6d.kamezawa.hiroyu@jp.fujitsu.com> (raw)
Hi,
This is a new one. All design was changed.
While testing Andrey's case, I confirmed I need to reboot the system by
power off when I ran a fork-bomb. The speed of fork() is much faster
than some smart killing as pkill(1) and oom-killer cannot reach the speed.
I wonder it's better to have a fork-bomb killer.
In previous version, the kernel finds guilty processes(forkbomb) by chasing
task's process tree chain. But, it cannot kill a famous forkbomb
# forkbomb(){ forkbomb|forkbomb & } ; forkbomb
(see wikipedia.)
To kill this bomb, we need to track dead processes. This version uses
a mm_struct tracking system. All mm_structs are recorded with its
parent-chidlren, start_time information. (A periodic work will erase
that information.) And forkbomb killer kills tasks by using the map
of relationship among mm_structs.
I tested with
# forkbomb(){ forkbomb|forkbomb & } ; forkbomb
# make -j Kernel
# Andrey's case
and all bombs are removed by ForkBomb Killer.
Maybe more tests and development will be required.
(If there is swap, it's hard to kill bombs automatically....I used Sysrq.)
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>
next reply other threads:[~2011-03-23 4:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-23 4:23 KAMEZAWA Hiroyuki [this message]
2011-03-23 4:26 ` [RFC][PATCH 1/3] forkbomb: introduce mm recorder KAMEZAWA Hiroyuki
2011-03-23 4:29 ` [RFC][PATCH 2/3] forkbomb: forgetting useless information KAMEZAWA Hiroyuki
2011-03-23 4:30 ` [RFC][PATCH 3/3] forkbomb: forkbomb killer KAMEZAWA Hiroyuki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110323132323.f223fc6d.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@openvz.org \
--cc=kirill@shutemov.name \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
--cc=oleg@redhat.com \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox