From owner-freebsd-current@FreeBSD.ORG Sun Jan 25 12:24:29 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E9DBB16A4CE for ; Sun, 25 Jan 2004 12:24:28 -0800 (PST) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A64043D49 for ; Sun, 25 Jan 2004 12:24:27 -0800 (PST) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id 5BFCF72DBF; Sun, 25 Jan 2004 12:24:27 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id 5721F72DB5; Sun, 25 Jan 2004 12:24:27 -0800 (PST) Date: Sun, 25 Jan 2004 12:24:27 -0800 (PST) From: Doug White To: "Christian B." In-Reply-To: Message-ID: <20040125122226.J81485@carver.gumbysoft.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: FreeBSD 5.2: malloc(): error: allocation failed X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2004 20:24:29 -0000 On Sun, 25 Jan 2004, Christian B. wrote: > First, I have FreeBSD 5.1 installed on my dual-Xeon machine with 2GB RAM. > Now, I delete the disk and installed FreeBSD 5.2 with the same ports and > configuration. Hm, you haven't been adjusting MAXDSIZ, have you? I've been getting this exact same error sequence when I set MAXDSIZ so big there was no space left for mmap() to work. In that case I was setting it to near 3GB. Are you setting any tuning option in loader.conf or with a custom kernel configuration? > > For the MySQL 4.0.17, I use following configuration (the same as under > FreeBSD 5.1): > ---------------------------------- > key_buffer = 256M > max_allowed_packet = 1M > table_cache = 256 > sort_buffer_size = 1M > read_buffer_size = 1M > myisam_sort_buffer_size = 64M > thread_cache = 8 > query_cache_size= 16M > thread_concurrency = 4 > max_connections = 2000 > ---------------------------------- > > But after I start the mysql-server, I get following error: > ---------------------------------- > mysqld in malloc(): error: allocation failed > mysqld got signal 6; > This could be because you hit a bug. It is also possible that this binary > or one of the libraries it was linked against is corrupt, improperly built, > or misconfigured. This error can also be caused by malfunctioning hardware. > We will try our best to scrape up some info that will hopefully help > diagnose > the problem, but since we have already crashed, something is definitely > wrong > and this may fail. > > key_buffer_size=268435456 > read_buffer_size=1044480 > max_used_connections=0 > max_connections=2000 > threads_connected=0 > It is possible that mysqld could use up to > key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = > 155824 > K > bytes of memory > Hope that's ok; if not, decrease some variables in the equation. > ---------------------------------- > > If I reduce the key_buffer to 128M, mysql starts normal. > > > So, I installed the Port "Memtest". But if I run it with more than 511MB > ("memtest 512M 1"), I get the following error: > ---------------------------------- > Current limits: > RLIMIT_RSS 0xffffffff > RLIMIT_VMEM 0xffffffff > Raising limits... > memtest in malloc(): error: allocation failed > Abort (core dumped) > ---------------------------------- > > The output from top: > ---------------------------------- > 61 processes: 3 running, 48 sleeping, 10 waiting > Mem: 76M Active, 12M Inact, 47M Wired, 16K Cache, 21M Buf, 1872M Free > Swap: 5120M Total, 5120M Free > ---------------------------------- > > > I read the whole documentation about FreeBSD 5.2-update, but I cannot find > any changes about the memory-functions. > > Can anyone say me, why I have problems with memory-allocation? > > Thanks for your help! > > Best regards, > Christian > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org