Subject: Re: Fork bomb protection patch
To: None <ragge@ludd.luth.se>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 12/04/2002 22:57:55
On Wed, Dec 04, 2002 at 11:38:17PM +0100, ragge@ludd.luth.se wrote:
> > 
> > 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? 
> >
> Your window manager or whatever starts your window may have a 64-proc
> limitation; if it starts from xdm it won't have run any dot-scripts.
> You can check it by doing "sysctl proc.17339.rlimit.maxproc.soft"
> substituting 17339 for the pid of your window manager.

You could also be hitting the limit on the number of open files,
sockets are used to link each program to the X-server.

	David

-- 
David Laight: david@l8s.co.uk