Bug #60844 | [mysql] 5.5.11-1 segmentation fault in mysql_install_db script | ||
---|---|---|---|
Submitted: | 12 Apr 2011 18:06 | Modified: | 13 May 2011 14:03 |
Reporter: | Jeremy Dawson | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Installing | Severity: | S1 (Critical) |
Version: | 5.5.11-1 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | archlinux |
[12 Apr 2011 18:06]
Jeremy Dawson
[12 Apr 2011 18:17]
Jeremy Dawson
I wasn't sure if this was an address to a stack trace: Thread pointer: 0x1863300 So I went through those steps as well (from here: http://dev.mysql.com/doc/refman/5.5/en/using-stack-trace.html): # /usr/local/mysql/bin/resolve_stack_dump -s /tmp/mysqld.sym -n /tmp/mystack.trace 0x1863300 _end + 9365552
[13 Apr 2011 5:50]
Valeriy Kravchuk
Please, check if the same problem happens with generic Linux .tar.gz binaries available from dev.mysql.com.
[14 Apr 2011 14:56]
Jeremy Dawson
So I downloaded the binary - mysql-5.5.11-linux2.6-x86_64.tar.gz Went through the steps for setup to the mysql_install_db step: shell> groupadd mysql shell> useradd -r -g mysql mysql shell> cd /usr/local shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz shell> ln -s full-path-to-mysql-VERSION-OS mysql shell> cd mysql shell> chown -R mysql . shell> chgrp -R mysql . shell> scripts/mysql_install_db --user=mysql Now I am getting an error for a missing file: # scripts/mysql_install_db --user=mysql Installing MySQL system tables... ./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory # Installed the missing library [root@serverass mysql]# pacman -Ss libaio community/libaio 0.3.109-5 The Linux-native asynchronous I/O facility (aio) library Now its working! [root@serverass mysql]# scripts/mysql_install_db --user=mysql Installing MySQL system tables... OK Filling help tables... OK .... # I am not certain why the binary from archlinux didn't provide the error for this library nor did the compiled version with no custom flags. Now that I got the error message its easier to fix. Related bug: http://bugs.mysql.com/bug.php?id=60544 Can you please help figure out why this missing library may not have been in either of the above examples?
[15 Apr 2011 17:09]
Valeriy Kravchuk
Problem with libaio (our binaries require it) is know, and you correctly identified it as Bug #60544. I am not sure how ArchLinux binaries are built. But can you, please, send the exact sequence of commands you executed on your system to build from source? The fact that our binaries work means that the problem is either in build environment difference or related to exact build commands used.
[15 Apr 2011 21:48]
Jeremy Dawson
I did confirm that the archlinux binary and the built from source copy still fails on mysql_install_db as well. These are my commands for building from source: groupadd mysql useradd -r -g mysql mysql tar -xzvf mysql-5.5.11.tar.gz cd mysql-5.5.11 cmake . make make install cd /usr/local/mysql chown -R mysql . chgrp -R mysql . scripts/mysql_install_db --user=mysql
[13 May 2011 8:54]
Andrea Scarpino
These are the options passed to the MySQL package in Arch Linux: CFLAGS="-fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer" \ CXXFLAGS="-fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti" \ cmake . \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DMYSQL_DATADIR=/var/lib/mysql \ -DSYSCONFDIR=/etc/mysql \ -DINSTALL_INFODIR=share/mysql/docs \ -DINSTALL_MANDIR=share/man \ -DINSTALL_PLUGINDIR=/usr/lib/mysql/plugin \ -DINSTALL_SCRIPTDIR=bin \ -DINSTALL_INCLUDEDIR=include/mysql \ -DINSTALL_DOCREADMEDIR=share/mysql \ -DINSTALL_SUPPORTFILESDIR=share/mysql \ -DINSTALL_MYSQLSHAREDIR=share/mysql \ -DINSTALL_SHAREDIR=share/mysql \ -DWITH_READLINE=ON \ -DWITH_ZLIB=system \ -DWITH_SSL=system \ -DWITH_LIBWRAP=ON \ -DDEFAULT_CHARSET=utf8 \ -DDEFAULT_COLLATION=utf8_general_ci \ -DWITH_EXTRA_CHARSETS=complex \ -DWITH_EMBEDDED_SERVER=ON \ -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ -DENABLED_LOCAL_INFILE=ON \ -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \ -DWITHOUT_ARCHIVE_STORAGE_ENGINE=1 \ -DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1 \ -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 \ -DWITH_INNOBASE_STORAGE_ENGINE=1
[13 May 2011 13:33]
Jeremy Dawson
So it appears a new version of mysql in now available. I have removed all other traces of previous versions and installed this mysql 5.5.12-1, the error is no longer there, its able to setup the tables and everything. I am not sure if this was a planned fix or not but the new version appears to be working as intended.
[13 May 2011 14:03]
Valeriy Kravchuk
Not repeatable with 5.5.12.