Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#23614 - [mysql] 5.5.10-2 & 5.5.11-1 segmentation fault in mysql_install_db script

Attached to Project: Arch Linux
Opened by Jeremy (jd1p3k) - Wednesday, 06 April 2011, 16:32 GMT
Last edited by Andrea Scarpino (BaSh) - Friday, 13 May 2011, 13:44 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andrea Scarpino (BaSh)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
# I am getting a segmentation fault when installing mysql during the mysql_install_db script.
Example snippet (see attached log for full output):
Thread pointer: 0x13a6e30
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
usr/bin/mysql_install_db: line 428: 1700 Done { echo "use mysql;"; cat $create_system_tables $fill_system_tables; }
1701 | eval "$filter_cmd_line"
1702 Segmentation fault | $mysqld_install_cmd_line > /dev/null

Installation of system tables failed! Examine the logs in

# I have found out what the variables listed above are, by adding some echo's to mysql_install_db script
$mysqld_install_cmd_line == /usr/bin/mysqld --lc-messages-dir=/usr/share/mysql/english/.. --bootstrap --basedir=/usr --datadir=/var/lib/mysql --log-warnings=0 --loose-skip-innodb --loose-skip-ndbcluster --user=mysql --max_allowed_packet=8M --default-storage-engine=myisam --net_buffer_length=16K
$create_system_tables == /usr/share/mysql/mysql_system_tables.sql
$fill_system_tables == /usr/share/mysql/mysql_system_tables_data.sql
$filter_cmd_line == cat

# If I uninstall mysql and config files:
pacman -Rn mysql

# Then try to reinstall:
pacman -S mysql

# I get a different error (unless I manually delete database directory - /var/lib/mysql):
[2011-04-05 19:04] Installing MySQL system tables...
[2011-04-05 19:04] ERROR: 24 Can't read value for symlink './performance' (Error 2)
[2011-04-05 19:04] 110405 19:04:59 [ERROR] Aborting

I am assuming this is because it failed last time setting up the tables completely.

# I have confirmed that all files are installed:
[root@serverass ~]# pacman -Q mysql -k
mysql: 201 total files, 0 missing files

# I first experienced this on an install that was about 5 days old, so I thought that I must have screwed something up after trying to get this installed. I reinstalled arch from ftp and am still experiencing the same issues.

# Please let me know if there is something I can try or other logs or information that may be of assistance. I have attached a log of when I was trying to install via this command:
pacman -Sy apache php php_apache mysql

Additional info:
* package version(s): mysql-5.5.10-2-x86_64.pkg.tar.xz ; mysql-5.5.11-1-x86_64.pkg.tar.xz
* config and/or log files etc.


Steps to reproduce:
# Try to install mysql:
pacman -S mysql

This task depends upon

Closed by  Andrea Scarpino (BaSh)
Friday, 13 May 2011, 13:44 GMT
Reason for closing:  Works for me
Additional comments about closing:  anyway Jeremy said he solved with 5.5.12-1
Comment by Andrea Scarpino (BaSh) - Wednesday, 06 April 2011, 19:59 GMT
the first try is to check if a my.cnf.pacnew file is present in /etc/mysql/, if so, replace the my.cnf file with it.
Comment by Jeremy (jd1p3k) - Wednesday, 06 April 2011, 20:37 GMT
No there is just my.cnf in /etc/mysql/

After my pacman -Rn mysql I checked for the existence of any files left over based on the output of:
pacman -Q mysql -l

and none of them exist. I have also just confirmed that /etc/mysql doesn't exist after removing the mysql package.
Comment by Jeremy (jd1p3k) - Saturday, 09 April 2011, 23:09 GMT
I have now uninstalled mysql:
pacman -Rn mysql
Then removed /var/lib/mysql/ directory.

I went ahead and added more echo's to mysql_install_db script to grab the other variables and installed again:
[2011-04-09 15:25] Running 'pacman -U --logfile=mysql_install.log mysql-5.5.11-1-x86_64.pkg.tar.xz'
[2011-04-09 15:25] arg is:
[2011-04-09 15:25] arg is:--basedir=/usr
[2011-04-09 15:25] arg is:--server-id=1
[2011-04-09 15:25] we made it here because basedir exists. basedir is:/usr
[2011-04-09 15:25] binder is:/usr/bin
[2011-04-09 15:25] extra_binder is:/usr/bin
[2011-04-09 15:25] pkgdatadir is:/usr/share/mysql
[2011-04-09 15:25] scriptdir is:/usr/scripts
[2011-04-09 15:25] fill_help_tables is:/usr/share/mysql/fill_help_tables.sql
[2011-04-09 15:25] create_system_tables is:/usr/share/mysql/mysql_system_tables.sql
[2011-04-09 15:25] fill_system_tables is:/usr/share/mysql/mysql_system_tables_data.sql
[2011-04-09 15:25] args after user is: --user=mysql
[2011-04-09 15:25] Now testing for cross_bootstrap...
[2011-04-09 15:25] filter_cmd_line is:cat
[2011-04-09 15:25] mysqld_bootstrap is:/usr/bin/mysqld
[2011-04-09 15:25] mysqld_install_cmd_line is:/usr/bin/mysqld --lc-messages-dir=/usr/share/mysql/english/.. --bootstrap --basedir=/usr --datadir=/var/lib/mysql --log-warnings=0 --loose-skip-innodb --loose-skip-ndbcluster --user=mysql --max_allowed_packet=8M --default-storage-engine=myisam --net_buffer_length=16K
[2011-04-09 15:25] Installing MySQL system tables...
[2011-04-09 15:26] 110409 15:26:01 - mysqld got signal 11 ;

I have attached the entire log, but its pretty much the same as before.

I also tried running the part where the segmentation fault is occurring, but this is after it happens once so I am not sure this error is valid or not, but I changed the --log-warnings to 10 from 0 hoping for better error output:
create_system_tables=/usr/share/mysql/mysql_system_tables.sql
fill_system_tables=/usr/share/mysql/mysql_system_tables_data.sql
filter_cmd_line=cat
mysqld_install_cmd_line="/usr/bin/mysqld --lc-messages-dir=/usr/share/mysql/english/.. --bootstrap --basedir=/usr --datadir=/var/lib/mysql --log-warnings=10 --loose-skip-innodb --loose-skip-ndbcluster --user=mysql --max_allowed_packet=8M --default-storage-engine=myisam --net_buffer_length=16K"

[root@serverass tmp]# { echo "use mysql;"; cat $create_system_tables $fill_system_tables; } | eval "$filter_cmd_line" | $mysqld_install_cmd_line > /dev/null110409 15:46:41 [Note] Plugin 'InnoDB' is disabled.
110409 15:46:41 [Warning] /usr/bin/mysqld: unknown option '--loose-skip-ndbcluster'
ERROR: 24 Can't read value for symlink './performance' (Error 2)
110409 15:46:41 [ERROR] Aborting

110409 15:46:42 [Note] /usr/bin/mysqld: Shutdown complete

Hoping this extra information can help... please let me know if there is anything else that may be of assistance. I still haven't figured out where the ./performance symlink is supposed to be coming from, but it seems to have something to do with the data dir.
Comment by Jeremy (jd1p3k) - Tuesday, 12 April 2011, 16:26 GMT
I have just compiled mysql 5.5.11 from source and installed, it also has the same issue with segmentation fault during mysql_install_db.
Comment by Jeremy (jd1p3k) - Tuesday, 12 April 2011, 18:07 GMT

Loading...