Bug #53155 | Crash in safe_mutex_init(), using uninitialized mutex attr | ||
---|---|---|---|
Submitted: | 26 Apr 2010 10:58 | Modified: | 23 Oct 2010 6:12 |
Reporter: | Vasil Dimov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S1 (Critical) |
Version: | mysql-5.1 | OS: | FreeBSD (8.0-STABLE amd64) |
Assigned to: | CPU Architecture: | Any | |
Tags: | 5.1 |
[26 Apr 2010 10:58]
Vasil Dimov
[26 Apr 2010 10:58]
Vasil Dimov
int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr __attribute__((unused)), const char *file, uint line) { bzero((char*) mp,sizeof(*mp)); pthread_mutex_init(&mp->global,MY_MUTEX_INIT_ERRCHK); pthread_mutex_init(&mp->mutex,attr); also the unused attribute should be removed because attr is actually used.
[26 Apr 2010 11:01]
Vasil Dimov
FreeBSD 8.0-STABLE amd64
[27 Apr 2010 11:36]
Gustaf Thorslund
Vasil, What exact version of MySQL Cluster are you using? /Gustaf
[27 Apr 2010 12:30]
Vasil Dimov
I am using /bzrroot/server/mysql-5.1
[27 Apr 2010 12:59]
Gustaf Thorslund
Vasil, Please try mysql-5.1-telco-6.3, mysql-5.1-telco-7.0, and/or mysql-5.1-telco-7.1 instead. The cluster code have not been merged into mysql-5.1 for some years now. /Gustaf
[27 Apr 2010 14:09]
Vasil Dimov
Gustaf, What if this does not happen with any of the trees you mention?
[27 Apr 2010 14:17]
Gustaf Thorslund
Vasil, Then we know it only affect the cluster source in the mysql-5.1 tree and that's not something we recommend to use anyway. /Gustaf
[27 Apr 2010 14:27]
Vasil Dimov
Users may get hurt if they enable --with-ndbcluster in mysql-5.1 Either --with-ndbcluster should be removed from ./configure if the code is unmaintained or the bug should be fixed in mysql-5.1. Pushbuild is running with that option turned on. Thanks!
[22 Oct 2010 5:46]
Gustaf Thorslund
Verified as described with: * FreeBSD 8.1 * GCC 4.2.1 * revno 3364 from the mysql-5.1 tree (what was current when this bug was reported) Works fine with: * revno 3469 (current version some days ago)
[22 Oct 2010 6:00]
Gustaf Thorslund
Test case used: --> #!/bin/sh REVNO=$(bzr version-info --custom --template="{revno}") echo -n revno: $REVNO ./BUILD/autorun.sh > autorun.$REVNO.log 2>&1 ./configure --enable-thread-safe-client --enable-local-infile --with-pic --with-client-ldflags=-static --with-mysqld-ldflags=-static --with-zlib-dir=bundled --without-ndb-debug --with-big-tables --with-ssl --with-readline --with-embedded-server --with-archive-storage-engine --with-blackhole-storage-engine --with-csv-storage-engine --with-example-storage-engine --with-federated-storage-engine --with-partition --with-extra-charsets=all --with-innodb --with-ndbcluster --with-debug > configure.$REVNO.log 2>&1 gmake > make.$REVNO.log 2>&1 cd mysql-test ./mysql-test-run 1st > test.$REVNO.log 2>&1 result=$? echo , result: $result return $result --> Will exit with 1 on failure and also create a mysql-test/mysqld.core.
[22 Oct 2010 19:54]
Gustaf Thorslund
bzr-bisect helped me find: --> No further bisection is possible. On revision 3457.1.25 (davi.arnaut@sun.com-20100714131012-btyvcruo9ot6ddzc): Bug#48327: Some crashes specific to FreeBSD ("embedded") Backport fixes from ndb: Rework the constructors of some static object's to not call dbug functions since the constructors will be called before main, and consequently, before the dbug library is initialized. --> So this could be a duplicate of Bug#48327, or some other mentioned there.
[23 Oct 2010 6:12]
Vasil Dimov
Has already been fixed