[MDEV-28312] [FATAL] InnoDB: Page old data size XXX new data size XXX, page old max ins size XXX new max ins size XXX Created: 2022-04-14 Updated: 2022-08-25 Resolved: 2022-08-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera, Galera SST, Platform Debian |
| Affects Version/s: | 10.6.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Robert Kubik | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Cannot Reproduce | Votes: | 1 |
| Labels: | crash, galera, innodb | ||
| Environment: |
Ubuntu 20.04.4 LTS |
||
| Issue Links: |
|
||||||||
| Description |
|
Hello,
We've tried to search for such issue, but there is no cause found or any solution proposed. We've only found, that this issue can be caused by the indexes in some way, and we think that it started after a particular index has been created for the log table. We've been forced to do a re-sync from scratch of two cluster nodes. One of them started to hand with following errors:
We think that the error mentioned in the title is the root cause and probably causes some corruption of the data. We'll appreciate any help! |
| Comments |
| Comment by Marko Mäkelä [ 2022-04-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Do you use Galera snapshot transfer with the default wsrep_sst_method=rsync? That could corrupt files until proper locking was implemented in | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Kubik [ 2022-04-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We are using mariabackup SST method. However I think this is a secondary discussion IMO and we should focus on
thing. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-04-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It is well known ( The stack trace in the description does not show the correct InnoDB function names. A stack trace from GDB would be more useful. If the stack trace includes a change buffer merge, then it is a known problem but something that we cannot reproduce and thus not fix; see How was the "re-sync from scratch of two cluster nodes" executed? Were the crash recovery error messages issued for the same page or same tablespace as the fatal error? The inconsistency noticed during redo log based recovery should be unrelated to any bug in the change buffer. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Kubik [ 2022-04-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
No, mariabackup SST was set during the initial cluster setup and we've been using only this one. As I said, the issue started to occur after we created an additional index on the log table. Because we don't know the root cause, we deleted that additional index so it's possible, that this issue won't occur anymore to reproduce The re-sync was done using just full state transfer, via native Galera mechanism. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Kubik [ 2022-04-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello again,
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-04-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
r.kubik, the latest output that you provided shows corruption at two levels: an error message indicating that the indexes of a table are not consistent with each other, and an assertion failure because of an invalid record header bits (a corrupted index page). This could be due to a bug in the Galera snapshot transfer scripts, for example if a failure to apply the copied log (mariadb-backup --prepare) was ignored by the scripts. I’m reassigning this to our Galera maintainer. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2022-04-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
r.kubik How did you migrate from 10.1 to 10.6? Can we have full error log and your configuration of the nodes. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Kubik [ 2022-05-04 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Migration has been done using mariabackup from 10.1 to 10.6, using just binary files from /var/lib/mysql. Then mysql_upgrade done on target 10.6 nodes. Configuration:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Kubik [ 2022-05-04 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Configuration is the same on all the nodes, Galera docs readed carefully. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Kubik [ 2022-05-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Any updates on this? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-05-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
r.kubik, was a mariabackup --prepare or innobackupex --apply-log step run on the 10.1 files as part of the upgrade? Do you have the output from that step available? I am aware that before I think that in some past versions, the Galera snapshot transfer scripts omitted or discarded log files. That is a sure recipe for disaster, and it would disable an important safety mechanism against corruption. I became aware of that while implementing I only know InnoDB and some of the interface between it and Galera. I would say that an upgrade with wsrep_sst_method=rsync and innodb_use_native_aio=0 on the 10.1 donor should be safe. I would not trust anything else. After upgrading to a donor that contains the fix of | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-05-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
When it comes to the crash, I think that it should be prevented by the changes that I implemented for | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Kubik [ 2022-05-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The upgrade was done on a "normal" MariaDB instance. Galera was introduced/configured afterwards, on 10.6, after the mysql_upgrade etc. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-05-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
r.kubik, did you witness any corruption before enabling Galera? If you happen to have an old backup, I would suggest to invoke CHECK TABLE on every table. In
I do not think we see such errors in the internal InnoDB stress testing when the server is being killed under load, or mariadb-backup is being used. My best guess is that such errors occur when a section of the log was lost, or the ib_logfile0 was deleted in the past, to ‘fix’ crash recovery trouble. Could that have been the case here? A debug option could be implemented in | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Kubik [ 2022-05-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
No, there was no corruptions before galera, but galera has been introduced at the same time when migration/upgrade 10.1>10.6 occured. We are now unsure if this is galera thing, or migration issue. Have you encounteder similar issues with 10.1 > 10.6 upgrade in the past? Is it possible? We are now considering a scenario of stopping the production, making logical backup (mysqldump), purging the whole cluster and restoring from .sql backup to get rid of all data corruption. WDYT? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Kubik [ 2022-05-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I'm pretty sure that noone touched ib_logfile0 in the past. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-05-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I am not a support engineer, and this is not a support portal but a bug reporting system. That being said, logical backup and restore does sounds reasonable to me. If the InnoDB log got out of sync with the InnoDB data files, all sorts of bad things could happen. It may be impossible to determine what caused this corruption, and I can imagine that your priority is to fix the corruption, not to track down the root cause. Bugs in the Galera SST and IST are my best guesses. Some fixes to that were included in the recent 10.6.8 release.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-05-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It is actually possible that there is a recovery bug in 10.5 and 10.6, caused by Apparently, our internal stress testing of recovery and backup is using too small tables and too frequent DDL, which would lead to rather short lifetime of InnoDB data files. For the failure that I am currently debugging, the non-default setting innodb_file_per_table=0 was used, that is, all persistent InnoDB data was being written to the system tablespace. To catch this type of errors more easily, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Kubik [ 2022-05-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, For now we are going to do a logical backup&restore as well as upgrade to latest 10.6 version. Is this bug still relevant? According to | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-05-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I filed | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-06-03 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There is another recovery bug | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-06-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
In fact, the crash on exactly this type of corruption will be removed in | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Kubik [ 2022-08-03 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The issue does not appear anymore after we dumped the data via mysqldump and restored it. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2022-08-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Issue based on comments has been resolved and identified bugs are fixed. If issue again reproduces please open a new MDEV. |