Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Oct 2001 12:56:08 +0200
From:      "Alson van der Meulen" <alson@flutnet.org>
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>
In-Reply-To: <20011022194111.B375@IPAustralia.Gov.AU>
References:  <20011022194111.B375@IPAustralia.Gov.AU>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011022125608.F6526>