[MDEV-14333] Mariabackup --apply-log-only crashes if incomplete transactions with update_undo logs are present Created: 2017-11-09 Updated: 2017-11-09 Resolved: 2017-11-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup, Storage Engine - InnoDB |
| Affects Version/s: | 10.1.28 |
| Fix Version/s: | 10.1.29 |
| Type: | Bug | Priority: | Major |
| Reporter: | Gokhan Demir | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | innodb, mariabackup | ||
| Environment: |
CentOS 6, 7 |
||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
When I am trying to apply-log-only my Incremental backup, I started to see this error frequently, like 1 or 2 times a week. Could not reach information on the Internet. So I am reporting it as a bug. This error started to appear after I upgraded MariaDB server and backup from 10.1.26 to 10.1.28. Previously, I did not encounter this error. CurrentIy I cannot provide a full and an incremental backup because database is nearly 400 GB. However, next time the error happens, I can provide desktop sharing if desired. Here is the stack trace from the logs: 2017-11-08 1:13:10 139887762020384 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer... xtrabackup: Recovered WSREP position: 00000000-0000-0000-0000-000000000000:-1 To report this bug, see https://mariadb.com/kb/en/reporting-bugs We will try our best to scrape up some info that will hopefully help Server version: 10.1.28-MariaDB Thread pointer: 0x0 |
| Comments |
| Comment by Marko Mäkelä [ 2017-11-09 ] | ||||||||||||
|
The assertion, which was added in In mariabackup --apply-log-only, nothing will be done to any recovered transactions; only the redo log will be applied to the data pages. I am not sure, but it is possible that the backup would be usable even after this assertion failed. Because Mariabackup 10.1 is invoking XtraDB startup and shutdown several times, it is possible that a critical startup/shutdown step was omitted. This bug does not affect Mariabackup 10.2, because there the assertion is also checking for srv_was_started, which would not be set in Mariabackup outside the --export function. In Mariabackup 10.1 it can be set, so we will have to relax the assertion in some other way. | ||||||||||||
| Comment by Marko Mäkelä [ 2017-11-09 ] | ||||||||||||
|
The InnoDB transaction logs are divided into update_undo and insert_undo. For insert_undo, I relaxed this assertion in | ||||||||||||
| Comment by Marko Mäkelä [ 2017-11-09 ] | ||||||||||||
|
gokhan, it looks like this error indeed ruins the backup, because the xtrabackup_checkpoints file would not be updated to say "log-applied". The fix is this simple:
The error indeed was only present in Mariabackup 10.1. I merged the test case to 10.2, and it worked just fine, without any code changes. In Mariabackup 10.2, there is no --apply-log-only option because it is the default. Only during --export, Mariabackup 10.2 can generate redo log records on its own. |