Subject: Re: Fork bomb protection patch
To: NetBSD Kernel Technical Discussion List <tech-kern@netbsd.org>
From: None <kpneal@pobox.com>
List: tech-kern
Date: 12/04/2002 16:22:01
On Wed, Dec 04, 2002 at 02:16:52PM -0500, Greg A. Woods wrote:
> [ On Wednesday, December 4, 2002 at 10:07:35 (+0100), Jaromir Dolecek wrote: ]
> > Subject: Fork bomb protection patch
> >
> > * make process sleep for 0.5s if the system table is full
> > or when the user reaches their process number limit
> > - this is to not hog the system with huge number of CPU-hungry
> > looping processes
>
> I'm not sure I like this last bit.....
Say, is there a limit to the number of processes that can be starting
up at once?
On my 233MHz Alpha when I log in I automatically get about 30 xterms,
Netscape, Gnumeric, etc. The problem I'm seeing is that sometimes bash
(in an xterm) complains that it can't fork because it got EAGAIN. I'm
not hitting my per-user process limit I don't think -- This minute I
have 58 processes running, with the limit set to 1044. My memory use
is unlimited, I have 64MB of memory, and I have a half gig or so of
swap.
What's up? Is this fork() running into some transient limitation? If
so, can fork() wait a amount of time and then try again?
--
Kevin P. Neal http://www.pobox.com/~kpn/
"Nonbelievers found it difficult to defend their position in \
the presense of a working computer." -- a DEC Jensen paper