Bug #43450 Upgrading fro 5.0 to 5.1, mysql crashes during mysql_upgrade
Submitted: 6 Mar 2009 10:26 Modified: 7 Dec 2016 16:18
Reporter: Kyriakos Kouramenos Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.1.31 OS:Linux (SUSE 10 ES SP2)
Assigned to: CPU Architecture:Any

[6 Mar 2009 10:26] Kyriakos Kouramenos
Description:
OS is SUSE 10 SP2
While running mysql_upgrade, I receive the following errors after the tables have been checked and repaired:

Running 'mysql_fix_privilege_tables'...
ERROR 2013 (HY000) at line 72: Lost connection to MySQL server during query
ERROR 2006 (HY000) at line 73: MySQL server has gone away
ERROR 2006 (HY000) at line 77: MySQL server has gone away
ERROR 2006 (HY000) at line 79: MySQL server has gone away
ERROR 2006 (HY000) at line 80: MySQL server has gone away
                               .
                               .
                               .
ERROR 2006 (HY000) at line 606: MySQL server has gone away
ERROR 2006 (HY000) at line 608: MySQL server has gone away
ERROR 2006 (HY000) at line 614: MySQL server has gone away
FATAL ERROR: Upgrade failed

In the error log it shows that the database crashes when that point is reached and restarts.

/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x2e)[0x89b4be]
/usr/local/mysql/bin/mysqld(handle_segfault+0x322)[0x5d29f2]
/lib64/libpthread.so.0[0x2ac9f3f0ac00]
/usr/local/mysql/bin/mysqld(_Z11plugin_lockP3THDPP13st_plugin_int+0x21)[0x7409b1]
/usr/local/mysql/bin/mysqld(_Z12ha_checktypeP3THD14legacy_db_typebb+0x10c)[0x6c1bdc]
/usr/local/mysql/bin/mysqld(_Z26mysql_create_table_no_lockP3THDPKcS2_P24st_ha_create_informationP10Alter_infobj+0x75)[0x6d4945]
/usr/local/mysql/bin/mysqld(_Z18mysql_create_tableP3THDPKcS2_P24st_ha_create_informationP10Alter_infobj+0x91)[0x6d56b1]
/usr/local/mysql/bin/mysqld(_Z21mysql_execute_commandP3THD+0x5316)[0x5e7d46]
/usr/local/mysql/bin/mysqld(_ZN18Prepared_statement7executeEP6Stringb+0x3cd)[0x657f2d]
/usr/local/mysql/bin/mysqld(_ZN18Prepared_statement12execute_loopEP6StringbPhS2_+0x7c)[0x65ae4c]
/usr/local/mysql/bin/mysqld(_Z22mysql_sql_stmt_executeP3THD+0xa7)[0x65b327]
/usr/local/mysql/bin/mysqld(_Z21mysql_execute_commandP3THD+0x1661)[0x5e4091]
/usr/local/mysql/bin/mysqld(_Z11mysql_parseP3THDPKcjPS2_+0x357)[0x5e8297]
/usr/local/mysql/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xe63)[0x5e9103]
/usr/local/mysql/bin/mysqld(_Z10do_commandP3THD+0xe6)[0x5e99c6]
/usr/local/mysql/bin/mysqld(handle_one_connection+0x236)[0x5dc636]
/lib64/libpthread.so.0[0x2ac9f3f03143]
/lib64/libc.so.6(__clone+0x6d)[0x2ac9f457f8cd]
090306 12:14:34 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=402653184
read_buffer_size=1048576
max_used_connections=1
max_threads=500
threads_connected=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1422298 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x4784840
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...
stack_bottom = 0x42085190 thread_stack 0x40000
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x47d5a58 = CREATE TABLE IF NOT EXISTS general_log (event_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, thr                         ead_id INTEGER NOT NULL, server_id INTEGER NOT NULL, command_type VARCHAR(64) NOT NULL, argument MEDIUMTEXT NOT NULL) engine=CSV CH                         ARACTER SET utf8 comment="General log"
thd->thread_id=4
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
090306 12:14:34 mysqld_safe Number of processes running now: 0
090306 12:14:34 mysqld_safe mysqld restarted
090306 12:14:34 [Warning] The syntax '--log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '--slow_query_                         log'/'--slow_query_log_file' instead.
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 268435456 bytes!
090306 12:14:35 [ERROR] Plugin 'InnoDB' init function returned error.
090306 12:14:35 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
090306 12:14:35 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. The table is probably corrupted
090306 12:14:35 [ERROR] mysql.user has no `Event_priv` column at position 29
090306 12:14:35 [ERROR] Cannot open mysql.event
090306 12:14:35 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
090306 12:14:35 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.31-log'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Server (GPL)

How to repeat:
With a 5.0 databse, upgrade to 5.1.31 from the tar.gz binaries. Install it and run mysql_upgrade.
[6 Mar 2009 10:33] Kyriakos Kouramenos
Manually running the commands
mysqlcheck --check-upgrade --all-databases --auto-repair
mysql_fix_privilege_tables
mysqlcheck --all-databases --check-upgrade --fix-db-names --fix-table-names

is succesfull, no errors.
[9 Jun 2009 9:09] Sveta Smirnova
Thank you for the report.

Please try in your environment with current version 5.1.35 and if problem is still not solved provide your configuration file.
[9 Jul 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[7 Dec 2016 16:18] Yngve Svendsen
Posted by developer:
 
This relates to EOL (no longer supported) versions of MySQL Server. Thus closing.