[MDEV-18611] mariabackup silently ended during xtrabackup_copy_logfile() Created: 2019-02-18 Updated: 2021-09-30 Resolved: 2020-09-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | mariabackup |
| Affects Version/s: | 10.3.11, 10.2, 10.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Richard Stracke | Assignee: | Vladislav Lesin |
| Resolution: | Won't Fix | Votes: | 2 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
Mariabackup silently stopped in some cases. Regarding an analysis from vlad.lesin , it will be happen, if log_sys.log.read_log_seg() returns 0, even if there was something wring during reading. Variant 1:
Variant 2: Downloaded buffer is unequal to expected datasize.
But in this case the flag about corrupted log is set. Suggested fix from vlad.lesin
|
| Comments |
| Comment by Marko Mäkelä [ 2019-02-19 ] | |||||||||||||||||||||||||||||||||||
|
I would suggest the following patch against Mariabackup 10.2:
| |||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2019-02-19 ] | |||||||||||||||||||||||||||||||||||
|
I pushed my version of the fix. It turns out that only mariabackup was affected; InnoDB crash recovery would ignore the return value of the function. | |||||||||||||||||||||||||||||||||||
| Comment by Vladislav Lesin [ 2019-03-12 ] | |||||||||||||||||||||||||||||||||||
|
The customer still has the issue despite using mariabackup 10.3.13 with the fix for this task. | |||||||||||||||||||||||||||||||||||
| Comment by Vladislav Lesin [ 2019-09-26 ] | |||||||||||||||||||||||||||||||||||
|
Support sent me the information about the size of innodb log files:
I have prepared mariabackup version with some extra logging for support team, and the following is the part of mariabackup log:
Consider the following line:
(248264788-248789068)*512 = 268431360 - the difference between read and calculated log block number. The redo log size is 268435456. Log header size is 2k. There are two files, i.e. the total header size is 4k. So 268435456 - 4096 = 268431360. This is exactly the amount of bytes necessary to make full loop in circular innodb log buffer. And this is the difference between read and calculated LSN we found above. What we see is that mariabackup started at 00:00:11. The delay between the moment it read checkpoint lsn and the moment when it started to read redo log records from redo log(00:00:22) is 11s. And during this time server wrote greater or equal to 268431360 bytes in redo log, new checkpoint is started and redo log blocks were overwritten. But mariabackup did not refresh it's checkpoint info and that is why log block number read from redo log does not correspond to calculated redo log block number. | |||||||||||||||||||||||||||||||||||
| Comment by Vladislav Lesin [ 2019-10-02 ] | |||||||||||||||||||||||||||||||||||
|
Test case: https://github.com/vlad-lesin/mariadb-server/tree/10.2-MDEV-18611-test-case . | |||||||||||||||||||||||||||||||||||
| Comment by Vladislav Lesin [ 2020-09-21 ] | |||||||||||||||||||||||||||||||||||
|
We are not going to spend much effort to fix this edge case, we have improved the descriptiveness of the error message instead, please see |