Date: Tue, 8 Sep 2009 18:22:03 +0800 From: Cheng Renquan <crquan@gmail.com> To: Ivan Radovanovic <rivanr@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel panic caused by fork Message-ID: <91b13c310909080322s21e0fb02o423434206e5f96f6@mail.gmail.com> In-Reply-To: <4AA4E7A7.60503@gmail.com> References: <4AA4E7A7.60503@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 ti= me > (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 > > #include <sys/types.h> > #include <unistd.h> > > int main() { > =C2=A0while(1) > =C2=A0 fork(); > =C2=A0return 0; > } > > After running this program I got kernel panic with message > "get_pv_entry: increase vm.pmap.shpgperproc" > IMHO it is not very good idea to bring entire system down if one process > misbehaves in this way, it is maybe much better to kill offending process > and to send this message to system log. I am not sure whether the panic i= s > actually caused by process forking forever or when the system tries to > create new process when maxproc limit is already reached (since system is > only printing warning message that maxproc limit is reached and it only > panics when I try to start new process (like ps)). > System is FreeBSD 7.2-STABLE It's just the "fork bomb" problem, all operating system kernels cannot deal with it well, http://en.wikipedia.org/wiki/Fork_bomb And it's really a system administration problem rather than a kernel proble= m, --=20 Cheng Renquan (=E7=A8=8B=E4=BB=BB=E5=85=A8), from Shenzhen, China
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?91b13c310909080322s21e0fb02o423434206e5f96f6>