[MDEV-27236] mysql_upgrade crashes server process Created: 2021-12-12  Updated: 2022-01-20  Resolved: 2022-01-20

Status: Closed
Project: MariaDB Server
Component/s: Compiling, SSL
Affects Version/s: 10.6.5
Fix Version/s: 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2, 10.8.1

Type: Bug Priority: Critical
Reporter: Marc Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

linux


Attachments: File mysql.err.log    
Issue Links:
PartOf
is part of MDEV-25785 Add support for OpenSSL 3.0 Closed

 Description   

running mysql_upgrade shows:

mysql_upgrade --verbose
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats                                 OK
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.global_priv                                  OK
mysql.gtid_slave_pos                               OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.index_stats                                  OK
mysql.innodb_index_stats                           OK
mysql.innodb_table_stats                           OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.roles_mapping                                OK
mysql.servers                                      OK
mysql.table_stats                                  OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.transaction_registry                         OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Processing databases
information_schema
mysql
mysqlcheck: Got error: 2013: Lost connection to server during query when executing 'REPAIR NO_WRITE_TO_BINLOG VIEW ... '
FATAL ERROR: Upgrade failed

and in the server log you can see:
Dez 12 11:52:03 localhost mysqld[66966]: 2021-12-12 11:52:03 0 [Note] /usr/sbin/mysqld: ready for connections.
Dez 12 11:52:03 localhost mysqld[66966]: 2021-12-12 11:52:03 0 [ERROR] mysqld: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
Dez 12 11:52:03 localhost mysqld[66966]: 211212 11:52:03 server_audit: Query cache is enabled with the TABLE events. Some table reads can be veiled.2021-12-12 11:52:03 0 [ERROR] Incorrect definition of table mysql.event: expected column 'definer' at position 3 to have type varchar(, found type char(141).
Dez 12 11:52:03 localhost mysqld[66966]: 211212 11:52:03 server_audit: MariaDB Audit Plugin version 1.4.13 STARTED

It looks like some definitions do not match



 Comments   
Comment by Sergei Golubchik [ 2021-12-12 ]

Not matching mysql.event definition isn't fatal. Could you please show the complete error log?

Comment by Marc [ 2021-12-12 ]

that is all of the servers error log.

Comment by Sergei Golubchik [ 2021-12-12 ]

Normally the crash shows in the logs like, for example, in MDEV-16856

Are you saying the server suddenly disappears with no trace in the logs whatsoever and the last line is "MariaDB Audit Plugin version 1.4.13 STARTED" ?

How do you start mariadbd?

Comment by Marc [ 2021-12-12 ]

Here is the full output after server start and running mysql_upgrade
mysql.err.log

Comment by Sergei Golubchik [ 2021-12-12 ]

Looks like MDEV-26950, do you have OpenSSL 3.0?

Comment by Marc [ 2021-12-12 ]

Yes, I have. Did not look obvious to me this has sth to do with ssl.

Comment by Sergei Golubchik [ 2021-12-12 ]

No problem. Same conclusion though — OpeSSL 3.0 is not supported yet. It's work in progress still, see MDEV-25785.
Should be done in 10.8 and then backported to earlier releases.

Generated at Thu Feb 08 09:51:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.