Date: Tue, 08 Sep 2009 18:42:01 +0200 From: Ivan Radovanovic <rivanr@gmail.com> To: Julian Elischer <julian@elischer.org> Cc: freebsd-hackers@freebsd.org, Cheng Renquan <crquan@gmail.com> Subject: Re: Kernel panic caused by fork Message-ID: <4AA68959.6000808@gmail.com> In-Reply-To: <4AA68544.8050102@elischer.org> References: <4AA4E7A7.60503@gmail.com> <91b13c310909080322s21e0fb02o423434206e5f96f6@mail.gmail.com> <4AA68544.8050102@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer napisa: > Cheng Renquan wrote: >> On Mon, Sep 7, 2009 at 6:59 PM, Ivan Radovanovic<rivanr@gmail.com> >> wrote: >>> I was testing FreeBSD's behavior when running many threads at the >>> same time >>> (and I find it performs excellent) when I wanted to test how system >>> will >>> behave towards program that spawns itself too many times. I wrote a >>> very >>> simple program >> It's just the "fork bomb" problem, all operating system kernels cannot >> deal with it well, >> >> http://en.wikipedia.org/wiki/Fork_bomb > It's more a tuning problem I think. The system should tune itself so > that MAXPROX is hit before critical resources are exhausted I think. > Having said that, there are a lot of resources that need to be watched. After reading this nice article on wikipedia and learning about that bash one liner I wanted to check if it really works, but I didn't want to bring the system down again (and to create crash dump and so on), so I wanted to limit number of processes for single user and I did sysctl kern.maxprocperuid=1000 as root, and after that I started bash and typed :(){ :|:& };: as normal user First thing to notice - there was more than 4000 spawned bash processes (why if I set limit to 1000 per user id?), however system didn't crash and I was eventually able to recover with /bin/kill -9 -- -1234 1234 being process group id of bash process Regards, Ivan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AA68959.6000808>