From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 8 09:09:17 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED459106568D for ; Tue, 8 Sep 2009 09:09:17 +0000 (UTC) (envelope-from rivanr@gmail.com) Received: from mail-bw0-f206.google.com (mail-bw0-f206.google.com [209.85.218.206]) by mx1.freebsd.org (Postfix) with ESMTP id 76C698FC27 for ; Tue, 8 Sep 2009 09:09:17 +0000 (UTC) Received: by bwz2 with SMTP id 2so796133bwz.43 for ; Tue, 08 Sep 2009 02:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=hxTcQgRU1X7ndqKzHO671baC+88AFv9jCbHhJqyRr/s=; b=SbLurKoJcbcEHPaDzbc2LnfxfxdqXlXputOU02jpXXNfMTuAHpNocLQpnouLKEzIkq d8MuLZjha1TT9IMe1UgHtvNexVT0zJD32nnsJBKR7E+Nrl4Pt7hByySpU2yeXCuSotY/ 9ARa0CrYN8oxNHHM3YmBRGw67FmFkyIkS7mgg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=u6oOSazMB20bE1RH+uEByZWpkpKRZQW6Jp86hUl+ZzvvoHz/D2mPTKxlHSxH8NXsdU CtQUqv3weVpvS9jeMzsSiwTbbgoaoIPuut3auanxasRbJz5W+B9qDAVuiEA9rnIZX2Ld w0V8Q1NNcxqzXnnO3L5JmTl5ZjwiGrf0PF8kk= Received: by 10.103.78.35 with SMTP id f35mr6526804mul.89.1252400956551; Tue, 08 Sep 2009 02:09:16 -0700 (PDT) Received: from azdaja.softwarehood.com ([95.180.33.218]) by mx.google.com with ESMTPS id w5sm170879mue.4.2009.09.08.02.09.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 08 Sep 2009 02:09:16 -0700 (PDT) Message-ID: <4AA61F3A.3040802@gmail.com> Date: Tue, 08 Sep 2009 11:09:14 +0200 From: Ivan Radovanovic User-Agent: Thunderbird 2.0.0.22 (X11/20090708) MIME-Version: 1.0 To: Jan Mikkelsen References: <4AA4E7A7.60503@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: Kernel panic caused by fork X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 09:09:18 -0000 Jan Mikkelsen napisa: > 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 ... from fork(2) page - about errors [EAGAIN] The system-imposed limit on the total number of pro- cesses under execution would be exceeded. The limit is given by the sysctl(3) MIB variable KERN_MAXPROC. (The limit is actually ten less than this except for the super user). it seems that idea is to leave room for 10 more processes so root can kill offending process, and limits at my system are (I am running pretty much generic kernel) kern.maxproc: 6164 kern.maxprocperuid: 5547 so if there are only two users running at the same time in the system (the case when I did this testing) there is room for more than 500 processes after one user hits his limit - shouldn't panic I think Regards, Ivan