From owner-freebsd-questions Mon Oct 22 3:56:23 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail2.mediadesign.nl (md2.mediadesign.nl [212.19.205.67]) by hub.freebsd.org (Postfix) with SMTP id 91D9B37B406 for ; Mon, 22 Oct 2001 03:56:10 -0700 (PDT) Received: (qmail 18439 invoked by uid 1002); 22 Oct 2001 10:56:08 -0000 From: "Alson van der Meulen" Date: Mon, 22 Oct 2001 12:56:08 +0200 To: Questions@FreeBSD.ORG Subject: Re: 4.3-RELEASE kaput after running Perl applications that forks (and pings). Message-ID: <20011022125608.F6526@md2.mediadesign.nl> Mail-Followup-To: Questions@FreeBSD.ORG References: <20011022194111.B375@IPAustralia.Gov.AU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011022194111.B375@IPAustralia.Gov.AU> User-Agent: Mutt/1.3.22i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Oct 22, 2001 at 07:41:13PM +1000, Stanley Hopcroft wrote: > Dear Ladies and Gentlemen, > > I am writing to invite your comment on something I feel more likely to > occur on an MS Operating system. > > An unloaded FreeBSD 4.3-RELEASE reboots part way through a Perl script > that forks a few hundred processes that exec 'ping'. > > There is nothing in dmesg (apart from boot messages) or in > /var/log/messages. > > Should I enable a debugging kernel ? You'll prolly see a panic message at the console > > Why wasn't the user (un priviledged process) simply terminated ? Did you set the limits login.conf(5) correct? Without limits, you'll be able to DoS the system using forkbomb like techniques. Also, if you want to have a lot of processes, you might want to increase MAXUSERS in the kernel config. > > . shows a load average of no more than 30 > . total CPU utilisation bottoming at 0% with <= 40% system utilisation > . is running no more than 500 user processes. > . has no exceptional swap activity (can't remember what it was) > > If there was a panic, I don't know what the message was; the only > indication I had of the machine failing was the ssh connection closing. > > Here is the application; it failed when it tried to have 255 processes > running at one time (replace 100 by 255 in Parallel::ForkManager > constructor; this is a CPAN class that while new seems Ok) Are you sure it's not a hardware problem? Some problems only show up under stress. I can panic a box with a lot of processes if no limit is set for user processes (ulimit -u), but that's just reinventing the forkbomb (using while true; do ping -q foo & done). You can prevent it by just setting limits in login.conf. Someone working on the vm might know if it's normal to panic with such few processes (might be something else wrong). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message