Bug #13722 staring mysqld for the first time core dumps on solaris 9 and Mysql version 5
Submitted: 3 Oct 2005 18:26 Modified: 11 Oct 2005 10:01
Reporter: M Paul Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.13 OS:Solaris (Solaris 9 ( x86))
Assigned to: CPU Architecture:Any

[3 Oct 2005 18:26] M Paul
Description:
Running configure scripts of mysql_install_db from the scripts dir. does the core dump 

and it gave everytime I tried to run

# ./bin/mysqld --skip-grant  
Illegal Instruction(coredump)

How to repeat:
# ./bin/mysqld --skip-grant  
Illegal Instruction(coredump)
[4 Oct 2005 9:15] Valeriy Kravchuk
Thank you for a bug report. Please, provide the following additional information:

- What hardware is used (how much RAM, is it 64-bit)?
- What package you installed (full name, please)? mysql-standard-5.0.13-rc-solaris9-i386.pkg.gz? mysql-5.0.13-rc.tar.gz and build from these sources? In a later case, please, specify the configure options you have used.
[5 Oct 2005 16:40] M Paul
Kernel Version : 
# showrev
Hostname: dba-test
Hostid: 21bb9473
Release: 5.9
Kernel architecture: i86pc
Application architecture: i386
Hardware provider: COMPAQ
Domain: 
Kernel version: SunOS 5.9 Generic 117172-07 Jun 2004

Total memory : 512 Mb
platform : 32 bit 

mysql s/w version :  mysql-standard-5.0.13-rc-solaris9-i386

The same problem happens with max version too. and these versions are the precompiled ones from mysql.org  site.

I downloaded these files : mysql-max-5.0.13-rc-solaris9-i386.pkg
                                      mysql-standard-5.0.13-rc-solaris9-i386.pkg

after doing pkgadd I ran configure from the BASEDIR. abd repeated it core dumped.

I was just wonderinf if the mysql s/w is dependant on the PATH like "/usr/local" etc. as I moved the s/w to "/opt" after the s/w was extraced in "/usr/local"

Interestingly enough solaris 9 companion cd has a version of mysql and I could start that without much issue and I believe its the proper port of mysql for solaris 9 x86 platform.

The version which is working is :

# mysqladmin version
mysqladmin  Ver 8.40 Distrib 4.0.15, for pc-solaris2.9 on i386
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          4.0.15
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /tmp/mysql.sock
Uptime:                 1 day 12 hours 44 min 4 sec

Threads: 1  Questions: 3  Slow queries: 0  Opens: 6  Flush tables: 1  Open tables: 0  Queries per second avg: 0.000
[6 Oct 2005 6:04] Valeriy Kravchuk
So, you had used .pkg for Solaris. Bad results with 5.013 and OK with 4.0.15 .pkg from companion CD. OK.

I do not completely understand your sequence of actions (with movement from /usr/local to /opt), so, please, send the exact sequence of commands you performed with the results you got. Just copy and paste. You may skip long outputs.

Yes, there may be dependences from the BASEDIR used in the package (like data directory in var subdirectory of it, as it is by defalt, etc.) I am not sure they can result in core dumps though.
[6 Oct 2005 17:31] M Paul
I managed to re do all the steps agagin today:

1. downloaded the file  mysql-standard-5.0.13-rc-solaris9-i386.pkg.gz
 
2. used gunzip
# gunzip mysql-standard-5.0.13-rc-solaris9-i386.pkg.gz
gunzip: mysql-standard-5.0.13-rc-solaris9-i386.pkg already exists; do you wish to overwrite (y or n)? y

output file size 

-rw-r--r--   1 root     other    59393024 Oct  6 10:12 mysql-standard-5.0.13-rc-solaris9-i386.pkg

3. used pkgadd to install pkg file
shows :
Installation of <mysql-standard> was successful.

pkginfo shows :

application mysql-standard                   mysql

4. the s/w got installed in 
/usr/local/mysql-standard-5.0.13-rc-solaris9-i386

5. now created a user & group mysql 

6. ln -s /usr/local/mysql-standard-5.0.13-rc-solaris9-i386  /mysql

7. cd /mysql

8. ls -al  /mysql
# ls -altr
total 106
-rw-r--r--   1 bin      bin         1379 Sep 21 18:18 README
-rw-r--r--   1 bin      bin        19071 Sep 21 18:19 COPYING
-rw-r--r--   1 bin      bin         8307 Sep 22 09:17 INSTALL-BINARY
-rw-r--r--   1 bin      bin         5712 Sep 22 09:17 EXCEPTIONS-CLIENT
-rwxr-xr-x   1 bin      bin          801 Sep 22 09:37 configure
drwxr-xr-x   3 root     other        512 Oct  6 10:16 ..
drwxr-xr-x   2 bin      bin          512 Oct  6 10:16 docs
drwxr-x---   4 bin      bin          512 Oct  6 10:16 data
drwxr-xr-x   2 bin      bin         1536 Oct  6 10:16 bin
drwxr-xr-x   3 bin      bin          512 Oct  6 10:16 man
drwxr-xr-x   2 bin      bin          512 Oct  6 10:16 lib
drwxr-xr-x   2 bin      bin         1536 Oct  6 10:16 include
drwxr-xr-x   2 bin      bin          512 Oct  6 10:16 scripts
drwxr-xr-x   7 bin      bin          512 Oct  6 10:16 mysql-test
drwxr-xr-x   2 bin      bin          512 Oct  6 10:16 tests
drwxr-xr-x   2 bin      bin          512 Oct  6 10:16 support-files
drwxr-xr-x   5 bin      bin         1024 Oct  6 10:16 sql-bench
drwxr-xr-x   3 bin      bin          512 Oct  6 10:16 share
drwxr-xr-x  14 bin      bin          512 Oct  6 10:22 .

9. chown -R root  /mysql

10. cd /mysql

11. # chown -R mysql data

12 executed :

# pwd
/mysql
# /mysql/configure
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you.  If you run into any trouble, please
consult the MySQL manual, that you can find in the Docs directory.

Installing all prepared tables
Illegal Instruction - core dumped
Installation of system tables failed!

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

shell> ./bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in ./data 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 ./bin/mysqlbug script!
Broken Pipe
# 

13. reran :
# ./bin/mysqld --skip-grant  
Illegal Instruction(coredump)
[6 Oct 2005 17:33] M Paul
Also ran  to confirm no issue with PATH

# mysqld --help
mysqld  Ver 5.0.13-rc-standard for pc-solaris2.9 on i386 (MySQL Community Edition - Standard (GPL))
Copyright (C) 2000 MySQL AB, by Monty and others
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Starts the MySQL database server

Usage: mysqld [OPTIONS]

For more help options (several pages), use mysqld --verbose --help
[7 Oct 2005 9:10] Valeriy Kravchuk
According to the manual (http://dev.mysql.com/doc/mysql/en/installing-binary.html), after creating a symbolic link (OK, let it be /mysql) and goinf to that directory, you have to perform:

scripts/mysql_install_db --user=mysql

then change ownership, and then:

bin/mysqld_safe --user=mysql &

So, would you, please, perfrom these actions instead of steps 12 and 13 and inform me about the results.

Had never used configure in binary distributions...
[7 Oct 2005 22:42] M Paul
SO since the link is already created I did the following 
1. cd /mysql
2. scripts/mysql_install_db --user=mysql

# scripts/mysql_install_db --user=mysql
Installing all prepared tables
Illegal Instruction - core dumped
Installation of system tables failed!

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

shell> ./bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in ./data 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 ./bin/mysqlbug script!

3.  Also ran the other one too:
# bin/mysqld_safe --user=mysql &

[1]     815
# # Starting mysqld daemon with databases from /usr/local/mysql-standard-5.0.13-rc-solaris9-i386/data
Illegal Instruction - core dumped
STOPPING server from pid file /usr/local/mysql-standard-5.0.13-rc-solaris9-i386/data/dba-test.pid
051007 15:40:45  mysqld ended

So the error persists in all instance.
[10 Oct 2005 15:59] Valeriy Kravchuk
So, what is in the error log (/usr/local/mysql-standard-5.0.13-rc-solaris9-i386/data/*.err)? 

If we got the core dumps, there should be something in the error log.
[10 Oct 2005 21:06] M Paul
# cat dba-test.err
051007 15:40:43  mysqld started
051007 15:40:45  mysqld ended
[10 Oct 2005 21:11] M Paul
I thought these may be of interest:

# pldd core
core 'core' of 833:     /usr/local/mysql-standard-5.0.13-rc-solaris9-i386/bin/mysqld --basedir
/usr/lib/librt.so.1
/usr/lib/libz.so.1
/usr/lib/libdl.so.1
/usr/lib/libpthread.so.1
/usr/lib/libthread.so.1
/usr/lib/libcrypt_i.so.1
/usr/lib/libgen.so.1
/usr/lib/libsocket.so.1
/usr/lib/libnsl.so.1
/usr/lib/libm.so.1
/usr/lib/libCstd.so.1
/usr/lib/libCrun.so.1
/usr/lib/libc.so.1
/usr/lib/libaio.so.1
/usr/lib/libmd5.so.1
/usr/lib/libmp.so.2

# pstack core
core 'core' of 833:     /usr/local/mysql-standard-5.0.13-rc-solaris9-i386/bin/mysqld --basedir
 081d6305 __1cLunireg_init6FL_v_ (20) + 6d
 0815fbd8 ???????? (833fbdd, 5, 8554690, 83f3f40)
 0816063f main     (5, 8047d08, 8047d20) + 2a
 080fa9e2 ???????? ()
[11 Oct 2005 10:01] Valeriy Kravchuk
Thanks to our engineering team, I found the reason. Your report is a duplicate of http://bugs.mysql.com/bug.php?id=6772. Please, wait for the next releases (5.0.14) or build from sources. Sorry for the inconvenience.