Date: Thu, 11 Dec 2008 14:45:47 -0200 From: "Java Nunes" <javanunes@gmail.com> To: freebsd-bugs@freebsd.org Subject: fork bomb no respects limits in freebsd 7.0, freebsd is buged ? Message-ID: <425f5fc40812110845j71fdbd2fv43a518c39844fd75@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi, #>cat /boot/loader.conf kern.maxfiles="3000" kern.maxproc="666" <<<<<<<<<--------- root@bbb9 #>limits Resource limits (current): cputime infinity secs filesize 5242880 kB datasize 5242880 kB stacksize 524288 kB coredumpsize 1022976 kB memoryuse 1024000 kB memorylocked 683008 kB maxprocesses 599 <<<<<<<<<<- openfiles 677 sbsize infinity bytes vmemoryuse 693248 kB in /etc/login.conf :nologin=/var/run/nologin:\ :cputime=unlimited:\ :datasize=5G:\ :stacksize=667M:\ :memorylocked=667M:\ :memoryuse=1000M:\ :filesize=5G:\ :coredumpsize=999M:\ :openfiles=677:\ :maxproc=666:\ <<<<<<<<<<- :sbsize=unlimited:\ :vmemoryuse=677M:\ :priority=0:\ :idletime=2m\ :ignoretime@:\ :umask=022: su - bozo vi bomb.c #include <unistd.h> int main(int argc, char* argv[]) { while(1) fork(); return 0; } ~ gcc bomb.c -o bomb ~./bomb and my freebsd box shutdown with this error: maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5). maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5). maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5). maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5). panic: get_pv_entry : increase vm.pmap.shgperproc cpuid =0 uptime 19m physical memory: 1024MB Dumping 923 blah blah blha! Automatic reboot in 15 secounds = press blah blha blha lol! fBSD gives memory in spite of all limits. Is there any limit, which can stop adding memory for that forks ? limit it does not function in bsd? :0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?425f5fc40812110845j71fdbd2fv43a518c39844fd75>