Bug #19677 Core Dump Running mysql_install_db on AIX 5.3
Submitted: 10 May 2006 12:42 Modified: 29 Feb 2008 11:20
Reporter: Scott Buffington Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Installing Severity:S1 (Critical)
Version:5.0.21 OS:IBM AIX (AIX 5.3 ML 4)
Assigned to: CPU Architecture:Any
Tags: AIX MySQL

[10 May 2006 12:42] Scott Buffington
Description:
I am getting the following Segmentation fault when running the mysql_install_db.  It is not creating any of the data tables.  Here is the output:

aixgold:/usr/local/mysql > bin/mysql_install_db --user=mysql
Installing all prepared tables
bin/mysql_install_db[218]: 430294 Segmentation fault(coredump)
Installation of system tables failed!

Examine the logs in /usr/local/mysql/var for more information.
You can also try to start the mysqld daemon with:
/usr/local/mysql/libexec/mysqld --skip-grant &
You can use the command line tool
/usr/local/mysql/bin/mysql to connect to the mysql
database and look at the grant tables:

shell> /usr/local/mysql/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /usr/local/mysql/var that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/local/mysql/bin/mysqlbug script!

It has been a real struggle getting MySQL to compile on AIX 5.3 before reaching this point.  Any help with this error would be greatly appreciated.  Thanks!

How to repeat:
Just rerun the bin/mysql_install_db --user=mysql
[10 May 2006 12:46] Scott Buffington
I tried the skip grant and that resulted in a coredump too.

aixgold:/usr/local/mysql > /usr/local/mysql/libexec/mysqld --skip-grant &
[1]     229436
aixgold:/usr/local/mysql > ps -ef |grep mysql
[1] + Segmentation fault(coredump) /usr/local/mysql/libexec/mysqld --skip-grant &
[10 May 2006 15:23] Valeriy Kravchuk
Thank you for a problem report. Please, specify exact configure options, compiler and compiler settings used to build. I'll try to repeat on AIX 5.2 then. It may give some insights on the reasons...
[10 May 2006 15:47] Scott Buffington
Sorry about that, I should have included.

gcc-3.3.2-5
CC="gcc -pipe -mcpu=power -Wa,-many" \
CXX="gcc -pipe -mcpu=power -Wa,-many" \
CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql --with-low-memory
[30 May 2006 18:11] Scott Buffington
What is the ETA of MySQL getting a copy of AIX 5.3?
[8 Jun 2006 16:51] Valeriy Kravchuk
Sorry, but I was not able to repeat the behaviour you described on AIX 5.2. I did the following:

tar -xvf mysql-5.0.22.tar
cd mysql-5.0.22
CC="gcc -pipe -mcpu=power -Wa,-many" CXX="gcc -pipe -mcpu=power -Wa,-many" CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/home/mysqldev/valeriy/dbs/5.0 --with-low-memory
make
make install

Then:

mysqldev@aix52:~/valeriy/mysql-5.0.22> cd ../dbs/5.0/
mysqldev@aix52:~/valeriy/dbs/5.0> bin/mysql_install_db
Installing all prepared tables
Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/home/mysqldev/valeriy/dbs/5.0/bin/mysqladmin -u root password 'new-password'
/home/mysqldev/valeriy/dbs/5.0/bin/mysqladmin -u root -h aix52.mysql.com password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd /home/mysqldev/valeriy/dbs/5.0 ; /home/mysqldev/valeriy/dbs/5.0/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the /home/mysqldev/valeriy/dbs/5.0/bin/mysqlbug
script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
mysqldev@aix52:~/valeriy/dbs/5.0> bin/mysqld_safe &
[1] 290960
mysqldev@aix52:~/valeriy/dbs/5.0> Starting mysqld daemon with databases from /home/mysqldev/valeriy/dbs/5.0/var

mysqldev@aix52:~/valeriy/dbs/5.0> bin/mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.22

No entry for terminal type "cygwin";
using dumb terminal settings.
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> exit
Bye
mysqldev@aix52:~/valeriy/dbs/5.0> bin/mysqladmin -uroot shutdown
STOPPING server from pid file /home/mysqldev/valeriy/dbs/5.0/var/aix52.mysql.com.pid
060608 18:47:38  mysqld ended

[1]+  Done                    bin/mysqld_safe
mysqldev@aix52:~/valeriy/dbs/5.0> uname -a
AIX aix52 2 5 00592F0F4C00
mysqldev@aix52:~/valeriy/dbs/5.0> gcc --version
gcc (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.

As for AIX 5.3, we can get it, but only after we'll have some customers on that platfrom (as I was informed).
[29 Feb 2008 9:09] Johan Vermeire
mysqlbug script

Attachment: mysqlbug (application/octet-stream, text), 9.94 KiB.

[29 Feb 2008 9:10] Johan Vermeire
Hi,

I still have the same problem nearly after 2 years of the above bug report!

platform: IBM AIX 5.3, PowerPC
MySQL version: 5.0.51a

escaladev /usr/local/bin>id

uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)

escaladev /usr/local/bin>mysql_install_db

Installing MySQL system tables...

/usr/local/bin/mysql_install_db[340]: 1044664 Segmentation fault(coredump)

Installation of system tables failed!

Examine the logs in /usr/local/var for more information.

You can try to start the mysqld daemon with:

/usr/local/libexec/mysqld --skip-grant &

and use the command line tool

/usr/local/bin/mysql to connect to the mysql

database and look at the grant tables:

shell> /usr/local/bin/mysql -u root mysql

mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log

gives you a log in /usr/local/var that may be helpful.

The latest information about MySQL is available on the web at

http://www.mysql.com

Please consult the MySQL manual section: 'Problems running mysql_install_db',

and the manual section that describes problems on your OS.

Another information source is the MySQL email archive.

Please check all of the above before mailing us!

And if you do mail us, you MUST use the /usr/local/bin/mysqlbug script!

escaladev /usr/local/bin>/usr/local/libexec/mysqld --skip-grant &

[1]     311478

escaladev /usr/local/bin>

[1] + Segmentation fault(coredump) /usr/local/libexec/mysqld --skip-grant &

escaladev /usr/local/bin>

escaladev /usr/local/bin>ll core

-rw-rw----   1 root     system      3379730 Feb 29 09:26 core

escaladev /usr/local/bin>ll mysqlbug

-rwxr-xr-x   1 root     system        10177 Feb 29 09:23 mysqlbug

escaladev /usr/local/bin>gcc -v

Using built-in specs.

Target: powerpc-ibm-aix5.3.0.0

Configured with: ../gcc-4.2.2/configure --disable-shared --enable-threads=posix --prefix=/opt/pware --enable-languages=c,c++

Thread model: aix

gcc version 4.2.2

escaladev /usr/local/bin>

I have attached the mysqlbug file for your reference.

This bug is only reproducible on AIX 5.3 and not on AIX 5.2.
On AIX 5.2, there is no problem.
So I suggest that you get AIX version 5.3.

Best Regards,

Johan Vermeire
Belgium
[29 Feb 2008 11:20] Scott Buffington
Johan and all,

I have since compiled MySQL many times on AIX 5.3 after much experimentation using the following instructions. http://www.cpuug.org/forum/index.php/topic,117.0.html  I apologize if the link is not allowed here, I originally reported on this bug and thought this information might be helpful for all, particularly the prereqs, some of which you will not need if you are not doing Apache, PHP and MySQL.  Hope these instructions help, kind regards.

Scott Buffington
[3 Mar 2008 9:40] Johan Vermeire
Scott,

I still have a Segmentation fault(coredump) with mysql_install_db on AIX 5.3 Service Pack 5.

Which compiler (IBM compiler or GNU compiler) version did you use to build MySQL v5.0.45 on AIX 5.3?
Which compiler flags did you specify?
Which configure options did you use for MySQL v5.0.45?

Best Regards,

Johan Vermeire