From owner-freebsd-stable@FreeBSD.ORG Wed Jul 23 14:09:01 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6048237B401 for ; Wed, 23 Jul 2003 14:09:01 -0700 (PDT) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E911243F3F for ; Wed, 23 Jul 2003 14:09:00 -0700 (PDT) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id DBF3872DD1; Wed, 23 Jul 2003 14:09:00 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id D972A72DD0; Wed, 23 Jul 2003 14:09:00 -0700 (PDT) Date: Wed, 23 Jul 2003 14:09:00 -0700 (PDT) From: Doug White To: Gabor In-Reply-To: <20030723173427.GA72876@vmunix.com> Message-ID: <20030723140329.C92624@carver.gumbysoft.com> References: <20030723173427.GA72876@vmunix.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-stable@freebsd.org Subject: Re: malloc does not return null when out of memory X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2003 21:09:01 -0000 On Wed, 23 Jul 2003, Gabor wrote: > We have a little soekris box running freebsd that uses racoon for key > management. It's used for setting up an ipsec tunnel. I noticed that > one of these devices lost the tunnel this morning. I looked in the > log and saw this > > Jul 23 01:37:57 m0n0wall /kernel: pid 80 (racoon), uid 0, was killed: out of swap space [...] > Here is the tail end of the output. It dies when trying to poke at > the memory using memset. If I just malloc without the memset, it > never even dies. That's normal. If you malloc() memory and never touch it then it is never actually allocated. Your problem is that you're running out of memory. Try killing off unneeded daemons and set maxusers to a low value (like 32). Also try reducing the size of your mfs partitions, if you're using rc.diskless2. I don't think raccoon is much of a memory pig, unless you have a huge number of connections. > The kernel for this has the NO_SWAPPING option enabled since there is > essentially no disk, it boots from a CF. Do you have the 32MB or 64MB version? I have a net4501 (64MB) and I still have 39MB free. Its just running natd, sshd, named and dhcpd. -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org