Kernel panic caused by fork
Ivan Voras
ivoras at freebsd.org
Tue Sep 8 21:01:49 UTC 2009
Ivan Radovanovic 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
>
> #include <sys/types.h>
> #include <unistd.h>
>
> int main() {
> while(1)
> fork();
> return 0;
> }
A simple fork bomb. Hmm, it should just crash and if it does crash it's
a regression. I've "tested" fork bombs on 7-STABLE and early 8-CURRENT
and they were behaving as expected - stopped at the maxproc limit.
I don't currently have spare 7.x stable machines but I have just run it
on 8-BETA2 one and the maxproc limit still works, though as expected the
console is almost unusable for anything except switching (i.e. processes
don't get to receive input very often). A lot of them are in "locked"
state with "*vm ob" as state/channel name.
I couldn't clean the system from the fork bomb with "killall" as root.
Can you describe your machine? My is an Atom-based (slow) netbook with 1
GB RAM.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20090908/a679699b/signature.pgp
More information about the freebsd-hackers
mailing list