linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/3] A forkbomb killer and mm tracking system
@ 2011-03-23  4:23 KAMEZAWA Hiroyuki
  2011-03-23  4:26 ` [RFC][PATCH 1/3] forkbomb: introduce mm recorder KAMEZAWA Hiroyuki
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-03-23  4:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mm, kosaki.motohiro, rientjes, akpm, Oleg Nesterov,
	minchan.kim, avagin, kirill

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>

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

end of thread, other threads:[~2011-03-23  4:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-23  4:23 [RFC][PATCH 0/3] A forkbomb killer and mm tracking system KAMEZAWA Hiroyuki
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox