Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Sep 2009 18:53:13 +1000
From:      Jan Mikkelsen <janm-freebsd-hackers@transactionware.com>
To:        Ivan Radovanovic <rivanr@gmail.com>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: Kernel panic caused by fork
Message-ID:  <E71733B7-16FB-435E-90BD-4869831CC61C@transactionware.com>
In-Reply-To: <4AA4E7A7.60503@gmail.com>
References:  <4AA4E7A7.60503@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E71733B7-16FB-435E-90BD-4869831CC61C>