[MDEV-25136] Mariabackup crash with InnoDB: Assertion failure in file /.../extra/mariabackup/xtrabackup.cc line 875 Created: 2020-09-04 Updated: 2023-01-16 Resolved: 2023-01-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup, Galera |
| Affects Version/s: | 10.2.32, 10.3.24, 10.4.14, 10.5.5 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Todd Coker (Inactive) | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Won't Fix | Votes: | 5 |
| Labels: | None | ||
| Environment: |
RHEL 7.3 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
|
| Comments |
| Comment by Todd Coker (Inactive) [ 2020-09-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The crash has occurred several more times. Always related to DDL tracking and so far has always happened during an incremental backup. The server is part of a Galera cluster. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Todd Coker (Inactive) [ 2020-09-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
After examining the logs in more detail, this issue seems to be associated with TRUNCATE TABLE. It has nothing to do with whether the backup type is full or incremental as I thought earlier. I was able to reproduce this crash in a lab environment using a 3 node Galera cluster. The same crash also happens on a standard replication slave. I was not able to reproduce the crash on a standalone server. I used the attached script populate.sh to generate some activity to cause a crash. I ran it on node1 in my test cluster and took the backups on node3. In a classic replication environment I ran the script on the master and took backups on the slave. Example log of a failed full mariabackup is attached. To reproduce, set up a 3 node Galera cluster or 2 node master/slave | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Almeida (Inactive) [ 2020-10-07 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I can verify a customer has experienced this error again.
Error log:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vladislav Lesin [ 2020-11-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Coker, I failed to repeat it with the script you provided and master-slave replication. Could you please share server and mariabackup options you used in above test? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vladislav Lesin [ 2020-11-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I can repeat it on current 10.2 ES Galera cluster with the following MTR test:
I can't repeat it on CS 10.4.14. I suppose Galera bypasses somehow BLOCK_COMMIT lock and allows to commit DDL's when the lock is held on another node. I am trying to get rr trace of the whole test for deeper debuging, this will take some time, and also asked sysprg to review Galera MDL locking code. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vladislav Lesin [ 2020-12-07 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
According to the following code in 10.[45]
for WSREP applier thread global(backup) lock will be granted even if incompatible type of lock was granted for some other thread. What means even if BLOCK_COMMIT lock was granted, DDL will not be blocked in WSREP applier thread. And according to the comment in the code It was done intentionally. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vladislav Lesin [ 2020-12-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Here is the simplified test, which can be used for debug and to make sure "TRUNCATE" on node 2 is not blocked despite BLOCK_COMMIT is held.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vladislav Lesin [ 2020-12-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Useful comment from sysprg: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vladislav Lesin [ 2020-12-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I am assigning the issue to sysprg, as there is nothing to do from mariabackup side at the moment(see my comments above with the code which causes the issue and simplified test case to repeat it). The workaround for the customer at the moment is to not use DDL's during backup of Galera node. See also this thread in slack: https://mariadb.slack.com/archives/C03ER9QC3/p1607381382335100. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2021-04-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
perhaps a duplicate of |