From owner-freebsd-questions Wed May 9 17:58:53 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.viasoft.com.cn (unknown [61.153.1.177]) by hub.freebsd.org (Postfix) with ESMTP id E443C37B424 for ; Wed, 9 May 2001 17:58:49 -0700 (PDT) (envelope-from bsddiy@163.net) Received: from xyf ([192.168.1.54]) by mail.viasoft.com.cn (8.9.3/8.9.3) with SMTP id IAA10395; Thu, 10 May 2001 08:57:47 +0800 Message-ID: <002301c0d8ec$ae4df540$3601a8c0@xyf> From: "David Xu" To: "Pete Fritchman" , References: <002f01c0d840$5ed38180$3601a8c0@xyf> <20010509131701.F72871@databits.net> Subject: Re: kenel panic, vm_map_entry_create: kernel resources exhausted Date: Thu, 10 May 2001 08:59:11 +0800 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, do you really think about this problem carefully ? due to lack of information about maxusers and RAM size, how many maxusers an administrator can config for his RAM size? it needn't a fork bomb to crash system, think about a heavy loaded system, when processes number is increased, pmap table resource will possible be exhausted, and the bug will be trigged. an login.conf is bogus for this case, it can not prevent system from crash. I am very unhappy with this weak design, vm just does not protect itself. suck! :( --- Regards, David Xu ----- Original Message ----- From: Pete Fritchman To: David Xu Sent: Thursday, May 10, 2001 1:17 AM Subject: Re: kenel panic, vm_map_entry_create: kernel resources exhausted > Cross-posting to both stable@ and questions@ is *BAD*. > > This is answered frequently. See /etc/login.conf for help on stopping > fork bomb "attacks". > > -pete > > ++ 09/05/01 12:27 +0800 - David Xu: > | I am using FreeBSD 4.3-STABLE, my machine has 64 RAM. > | I can use a fork bomb to crash kernel under some conditions, > | fork bomb program is: > | > | #include > | int main() > | { > | while(1) > | { > | if (fork() == 0) > | break; > | } > | return 0; > | } > | > | when kernel panic, it prints: vm_map_entry_create: kernel resources > | exhausted, > | then after some seconds, it reboots. > | > | I have found that if I use GENERIC kernel config, I can not trigger this > | bug, > | default maxusers value in GENERIC kernel config file is 32, this is fine, > | if I change it to 128 and recompile/install kernel, I can use the fork bomb > | to > | crash kernel. it seems this problem is RAM size and maxusers parameter > | related. what max value of maxusers should I use if my RAM is 64M? > | > | --- > | Regards, > | David Xu > | > | > | > | > | To Unsubscribe: send mail to majordomo@FreeBSD.org > | with "unsubscribe freebsd-stable" in the body of the message > > -- > Pete Fritchman > Databits Network Services, Inc. > finger petef@databits.net for PGP key > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message