xtrabackup encounters assertion failure when taking incremental backup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
New
|
Undecided
|
Unassigned |
Bug Description
Taking an incremental backup of a running InnoDB database causes xtrabackup to encounter an assertion failure due to tablespace id being allegedly mis-aligned.....
Multiple attempts to backup this database encounter similar assertions but on different tables..
My suspicion is that tables are being dropped and recreated during the backup, so the tablespace id in the data dictionary at the beginning of the backup has changed by the time the process comes to actually open the .ibd per-tablespace file later on in the backup…
I think the fact that the error happens on different tables each time is fairly good evidence to back up this theory, but you guys are the experts...
The assertion looks like:
incremental backup from 5250385178540 is enabled.
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /mysqldb/data
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: use O_DIRECT
110828 19:10:19 InnoDB: Warning: allocated tablespace 636, old maximum was 9
>> log scanned up to (5444207434065)
>> log scanned up to (5444210337603)
>> log scanned up to (5444213213911)
>> log scanned up to (5444217152139)
>> log scanned up to (5444220334845)
>> log scanned up to (5444245546572)
>> log scanned up to (5444259268795)
>> log scanned up to (5444266374104)
>> log scanned up to (5444279696651)
>> log scanned up to (5444279758349)
>> log scanned up to (5444280855357)
>> log scanned up to (5444280891607)
>> log scanned up to (5444280915322)
>> log scanned up to (5444280953222)
>> log scanned up to (5444280974395)
>> log scanned up to (5444285081215)
>> log scanned up to (5444286169399)
>> log scanned up to (5444286212068)
>> log scanned up to (5444286259826)
>> log scanned up to (5444286280585)
>> log scanned up to (5444286285925)
>> log scanned up to (5444286346477)
>> log scanned up to (5444286458853)
>> log scanned up to (5444286495127)
>> log scanned up to (5444286543033)
>> log scanned up to (5444286632303)
>> log scanned up to (5444286652743)
>> log scanned up to (5444286729806)
>> log scanned up to (5444286752276)
>> log scanned up to (5444286779789)
>> log scanned up to (5444286799640)
>> log scanned up to (5444286823282)
>> log scanned up to (5444286841309)
>> log scanned up to (5444286998233)
>> log scanned up to (5444287328521)
>> log scanned up to (5444287363801)
>> log scanned up to (5444287518640)
>> log scanned up to (5444287537379)
>> log scanned up to (5444287566289)
>> log scanned up to (5444287600592)
>> log scanned up to (5444287624330)
>> log scanned up to (5444287695968)
>> log scanned up to (5444287743204)
xtrabackup version 1.6.2 for Percona Server 5.1.55 unknown-linux-gnu (x86_64) (revision id: 274)
[01] Copying /mysqldb/
to /mysqldb/
[01] ...done
[01] Copying /mysqldb/
to /mysqldb/
…. <snip -- ..many .delta files are copied...> ….
[01] Copying ./marin_
to /mysqldb/
[01] ...done
[01] Copying ./marin_
to /mysqldb/
[01] ...done
[01] Copying ./marin_
InnoDB: but in file ./marin_
110828 20:03:12 InnoDB: Assertion failure in thread 1378617664 in file fil/fil0fil.c line 740
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://
InnoDB: about forcing recovery.
revenue_
to /mysqldb/
[01] ...done
[01] Copying ./marin_
to /mysqldb/
[01] ...done
[01] Copying ./marin_
to /mysqldb/
[01] ...done
[01] Copying ./marin_
to /mysqldb/
[01] ...done
[01] Copying ./marin_
to /mysqldb/
[01] …done
another example backing up the same DB hours later..…
[01] Copying ./marin_
to /mysqldb/
[01] InnoDB: Error: tablespace id is 67357 in the data dictionary
InnoDB: but in file ./marin_
110828 22:11:59 InnoDB: Assertion failure in thread 1378867520 in file fil/fil0fil.c line 740
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://
InnoDB: about forcing recovery.
…done
Yes dropping or creating tables (bug #722638) or even truncating certain tables (bug #826604) during a backup does cause backups to fail in this manner.