Open brody-qq opened 6 days ago
Yeah, I remember writing a fork bomb test a year ago and the result was pretty much the same. We should obviously not crash because of such behavior, but hogging on system resources (PID is definitely one of them, but also each process allocates a small area in kernel space) should be handled with some smart OOM handling trickery and probably a security feature :) Therefore, limiting processes from spawning endless amount of other processes could be integrated in the upcoming containers feature I'm working on.
I got the following kernel panic when running a program that repeatedly fork()s new processes:
You can reproduce this by applying the following diff and running
test-fork-crash
from the shell. Note that the crash takes a minute or two to happen, and it doesn't happen 100% of the time you run the program.