Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jan 2004 21:13:31 +0100
From:      "Christian B." <freebsd.org@bimmer.at>
To:        <freebsd-current@freebsd.org>
Subject:   FreeBSD 5.2: malloc(): error: allocation failed
Message-ID:  <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAjsr3Y8m61BGK3QDgfQG1wCKBAAAQAAAAQw7wR/MadkyKklRl7q1e3gEAAAAA@bimmer.at>

next in thread | raw e-mail | index | archive | help
Hello,

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.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAjsr3Y8m61BGK3QDgfQG1wCKBAAAQAAAAQw7wR/MadkyKklRl7q1e3gEAAAAA>