| Bug #28284 | Test "mysqlslap" reports "out of memory" | ||
|---|---|---|---|
| Submitted: | 7 May 2007 15:27 | Modified: | 9 Oct 2007 0:47 |
| Reporter: | Joerg Bruehe | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Tests | Severity: | S3 (Non-critical) |
| Version: | 5.1.18 | OS: | Linux (RHAS 3 / x86) |
| Assigned to: | Georgi Kodinov | CPU Architecture: | Any |
[7 Jul 2007 9:35]
Daniel Fischer
Still present in 5.1.20.
[22 Aug 2007 10:46]
Joerg Bruehe
Still present in 5.1.21-beta. Specific to that platform (Linux RHAS3 on x86), occurs in both tar.gz and RPM builds there. The computed values are in the 4 giga range (4294967259, 4294967258, or 4294967257 bytes), this cannot be right on a 32 bit platform. Raising priority (test suite failure !).
[24 Aug 2007 15:06]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/33035 ChangeSet@1.2572, 2007-08-24 18:06:44+03:00, gkodinov@magare.gmz +3 -0 Bug #28284: Test "mysqlslap" reports "out of memory" When locking a "fast" mutex a static variable cpu_count was used as a flag to initialize itself on the first usage by calling sysconf() and setting non-zero value. This is not thread and optimization safe on some platforms. That's why the global initialization needs to be done once in a designated function. This will also speed up the usage (by a small bit) because it won't have to check if it's initialized on every call. Fixed by moving the fast mutexes initialization out of my_pthread_fastmutex_lock() to fastmutex_global_init() and call it from my_init()
[14 Sep 2007 7:44]
Bugs System
Pushed into 5.1.23-beta
[9 Oct 2007 0:47]
Paul DuBois
Noted in 5.1.23 changelog. Fast-mutex locking was not thread-safe and optimization-safe on some platforms, which could cause program failures such as out-of-memory errors.

Description: Symptom: ===== mysqlslap [ fail ] Errors are (from /PATH/mysqltest-time) : /home/mysqldev/tmp-200704301832-5.1.18-beta-31904/rhas3-x86-glibc23/test/mysql-5.1.18-beta-linux-i686-glibc23/bin/mysqlslap : Out of memory (Needed 4294967252 bytes) mysqltest: At line 12: command "$MYSQL_SLAP --only-print --delimiter=";" --query="select * from t1;select * from t2" --create="CREATE TABLE t1 (id int, name varchar(64)); create table t2(foo1 varchar(32), foo2 varchar(32)); INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2')" --engine="heap,myisam"" failed (the last lines may be the most important ones) Result from queries before failure can be found in /PATH/mysql-test/var/log/mysqlslap.log ===== Happens in *all* (non-debug) 5.1.18 (test build) runs on our RedHat AS 3 / x86 host. I have no feeling whether that memory demand is "for real" and just hits a host limit (on that single one ?), or the demand is bogus and the whole issue is caused by some other platform issue (compiler ?). How to repeat: Run the test suite on that machine.