[MDEV-15305] Core dump after upgrade from MySQL 5.0 and start replication Created: 2018-02-13  Updated: 2021-04-13  Resolved: 2021-04-13

Status: Closed
Project: MariaDB Server
Component/s: Replication, Server
Affects Version/s: 10.2.8, 10.2.12
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Mike Assignee: Marko Mäkelä
Resolution: Incomplete Votes: 0
Labels: None
Environment:

Running on centOS 7.4, MariaDB 10.2.8


Attachments: Text File MariaDB_config_files.txt     File mysqld.err    

 Description   

We are in the process of upgrading many MySQL 5.0.90 database servers to MariaDB 10.2.8. Our process has been working: Copy the data from MySQL 5.0 to the maraidb server, upgrade -> 5.1 -> 5.5 -> MariaDB. We then run replication from MySQL 5.0 to MariaDB using statement based replication for a period of time before moving the processing over to MariaDB.

The more detailed process goes as follows: Stop the slave on the source (MySQL 5.0.90) server. Rsync the entire data dir to the target (maria 10.2.8) server. Start MySQL 5.0 on the target server and get replication caught up. Stop MySQL 5.0 on the target and start MySQL 5.1. Run mysql_upgrade. Stop MySQL 5.1. Start replication and let it catch up. Run MySQL 5.5 and perform upgrade. start replication and let it catch up. Stop MySQL 5.5. Run MariaDB 10.2.8 and perform upgrade. Start replication and let it catch up.

This has worked numerous times. However The latest attempt core dumps on the last step (replication from 5.0 to 10.2) before replication even catches up.

When I mysqldump the data in MySQL 5.0 and then import it directly to MariaDB it works fine, but it is so slow it is impractical for large data sets.



 Comments   
Comment by Mike [ 2018-02-13 ]

We created another server (centOS 7.4) and tried the same process using MariaDB 10.2.12 and had the same result.

Comment by Elena Stepanova [ 2018-03-07 ]

marko, could you please take a look at the error log? Is it anything you're aware of?

Comment by Marko Mäkelä [ 2019-09-30 ]

It is a B-tree page corruption:

2018-02-12 14:25:58 140374500992768 [ERROR] InnoDB: Wrong owned count 9, 1, rec 99

As always with data corruption, it is hard to say when and why it was caused. (And it dose not help that I missed the question for 1½ years.)
If it was caused by a software bug, we’d need a reasonably repeatable test case. I do not remember bugs of exactly this kind in the server. But we have fixed bugs in the page checksum validation of mariabackup in January 2019.

Comment by Marko Mäkelä [ 2021-04-13 ]

You could argue that MariaDB should not crash so eagerly when encountering any form of InnoDB corruption, but that is unfortunately how InnoDB has been designed and implemented. Maybe some day MDEV-13542 will be fully fixed.

The root cause should be that something was corrupted in that MySQL 5.0 database. A possible reason is the bug that was recently fixed in MDEV-24449.

Generated at Thu Feb 08 08:20:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.