Kernel panic caused by fork
Ivan Radovanovic
rivanr at gmail.com
Tue Sep 8 09:09:18 UTC 2009
Jan Mikkelsen napisa:
> A quick observation: This is not "one process misbehaving", it is a
> large number of processes misbehaving. From an administrative point
> of view, I think the response is "call setrlimit(RLIMIT_NPROC, ...)",
> otherwise the expected behaviour is for your machine to stop making
> forward progress.
>
> Having said that, I agree that panics are bad and it would be nice if
> fork() returned EAGAIN, again and again and again. Or perhaps the
> machine should just panic ...
from fork(2) page - about errors
[EAGAIN] The system-imposed limit on the total number of pro-
cesses under execution would be exceeded. The limit
is given by the sysctl(3) MIB variable KERN_MAXPROC.
(The limit is actually ten less than this except for
the super user).
it seems that idea is to leave room for 10 more processes so root can
kill offending process, and limits at my system are (I am running pretty
much generic kernel)
kern.maxproc: 6164
kern.maxprocperuid: 5547
so if there are only two users running at the same time in the system
(the case when I did this testing) there is room for more than 500
processes after one user hits his limit - shouldn't panic I think
Regards,
Ivan
More information about the freebsd-hackers
mailing list