From owner-freebsd-questions Sat May 12 14: 3:33 2001 Delivered-To: freebsd-questions@freebsd.org Received: from segfault.kiev.ua (segfault.kiev.ua [193.193.193.4]) by hub.freebsd.org (Postfix) with ESMTP id BFD5C37B43F; Sat, 12 May 2001 14:03:23 -0700 (PDT) (envelope-from netch@iv.nn.kiev.ua) Received: (from uucp@localhost) by segfault.kiev.ua (8) with UUCP id AAZ92395; Sun, 13 May 2001 00:02:32 +0300 (EEST) (envelope-from netch@iv.nn.kiev.ua) Received: (from netch@localhost) by iv.nn.kiev.ua (8.11.3/8.11.3) id f4CL0p478251; Sun, 13 May 2001 00:00:51 +0300 (EEST) (envelope-from netch) Date: Sun, 13 May 2001 00:00:51 +0300 From: Valentin Nechayev To: David Xu Cc: freebsd-questions@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: kenel panic, vm_map_entry_create: kernel resources exhausted Message-ID: <20010513000051.A44618@iv.nn.kiev.ua> References: <002f01c0d840$5ed38180$3601a8c0@xyf> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002f01c0d840$5ed38180$3601a8c0@xyf>; from bsddiy@163.net on Wed, May 09, 2001 at 12:27:33PM +0800 X-42: On Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Wed, May 09, 2001 at 12:27:33, bsddiy (David Xu) wrote about "kenel panic, vm_map_entry_create: kernel resources exhausted": > 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. On my home 4.3-RC4 with maxusers=64, system does not crash. But syslog output shows some interesting: === cut === May 12 23:52:55 iv /kernel: proc: table ible is full May 12 23:52:55 iv /kernel: proc: table is full May 12 23:52:55 iv last message repeated 42 times May 12 23:52:55 iv /kernel: proble is full May 12 23:52:55 iv /kernel: proc: table is full May 12 23:52:55 iv last message repeated 42 times May 12 23:52:55 iv /kernel: proc: table ible is full May 12 23:52:55 iv /kernel: proc: table is full May 12 23:52:55 iv last message repeated 42 times May 12 23:52:55 iv /kernel: pros full May 12 23:52:55 iv /kernel: proc: table is full === ... and so on... === There is one CPU in system, and possibly there is no place where such race condition can reside in kernel. Syslogd seems to me to be more probable place for such race (??) I saw the same race on -current where kernel structure is totally another. > 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? It should not crash with any reasonable maxusers value (i.e. >=1). But system design suppose average memory usage per one user, I think it is 2MB...4MB. Hence for 64M, maxusers=32 is normal. /netch To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message