Kernel panic caused by fork

Jan Mikkelsen janm-freebsd-hackers at transactionware.com
Tue Sep 8 09:19:57 UTC 2009


Hi,

On 07/09/2009, at 8:59 PM, Ivan Radovanovic wrote:
...
> 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 is 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)).

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 ...

Regards,

Jan.



More information about the freebsd-hackers mailing list