[MDEV-25646] Atomic DDL: InnoDB: Datafile './test/<tablename>.ibd' is corrupted. Cannot determine the space ID from the first 64 pages Created: 2021-05-10  Updated: 2021-06-16  Resolved: 2021-06-16

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: N/A
Fix Version/s: 10.6.2

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-24626 Remove synchronous write of page0 and... Closed
is blocked by MDEV-25506 Atomic DDL: .frm file is removed and ... Closed
Relates
relates to MDEV-17567 Atomic DDL Closed

 Description   

I had this failure once so far, in atomic DDL tests on bb-10.6-monty-innodb of May 7th.
The recovery failure is still the same on the current bb-10.6-monty-innodb, however I have no information on whether the guilty part is the recovery or the logic preceding the crash.

Couldn't reproduce so far with rr (or without rr, for that matter).
The datadir and logs are available.

bb-10.6-monty-innodb 78846b639

2021-05-10 19:19:31 0 [Note] InnoDB: Header page consists of zero bytes in datafile: ./test/t9_Aria.ibd, Space ID:0, Flags: 0
2021-05-10 19:19:31 0 [Note] InnoDB: Page size:1024. Pages to analyze:64
2021-05-10 19:19:31 0 [Note] InnoDB: Page size: 1024. Possible space_id count:0
2021-05-10 19:19:31 0 [Note] InnoDB: Page size:2048. Pages to analyze:32
2021-05-10 19:19:31 0 [Note] InnoDB: Page size: 2048. Possible space_id count:0
2021-05-10 19:19:31 0 [Note] InnoDB: Page size:4096. Pages to analyze:16
2021-05-10 19:19:31 0 [Note] InnoDB: Page size: 4096. Possible space_id count:0
2021-05-10 19:19:31 0 [Note] InnoDB: Page size:8192. Pages to analyze:8
2021-05-10 19:19:31 0 [Note] InnoDB: Page size: 8192. Possible space_id count:0
2021-05-10 19:19:31 0 [Note] InnoDB: Page size:16384. Pages to analyze:4
2021-05-10 19:19:31 0 [Note] InnoDB: Page size: 16384. Possible space_id count:0
2021-05-10 19:19:31 0 [Note] InnoDB: Page size:32768. Pages to analyze:2
2021-05-10 19:19:31 0 [Note] InnoDB: Page size: 32768. Possible space_id count:0
2021-05-10 19:19:31 0 [Note] InnoDB: Page size:65536. Pages to analyze:1
2021-05-10 19:19:31 0 [Note] InnoDB: Page size: 65536. Possible space_id count:0
2021-05-10 19:19:31 0 [ERROR] InnoDB: Datafile './test/t9_Aria.ibd' is corrupted. Cannot determine the space ID from the first 64 pages.
2021-05-10 19:19:31 0 [Note] InnoDB: Tablespace 72 was not found at './test/t9_Aria.ibd', but there were no modifications either.
2021-05-10 19:19:31 0 [Note] InnoDB: 1 transaction(s) which must be rolled back or cleaned up in total 3 row operations to undo

(don't pay attention to the table name – it was initially Aria, but was altered to InnoDB long before the induced crash).

The error isn't bogus. Before recovery, there are both .ibd and .frm, after the recovery – only .ibd.



 Comments   
Comment by Marko Mäkelä [ 2021-05-11 ]

This error was almost fixed by MDEV-24626 as of yesterday. The server would seem to always recover with innodb_force_recovery=0. However, some messages could be output. One corner case remained in the test innodb_fts.crash_recovery,release: When a data file is empty (its length is 0 bytes) and some page-level log exists for the tablespace, the data file would not be deleted.

Comment by Marko Mäkelä [ 2021-06-16 ]

I think that this should have been fixed by MDEV-25506 part 3. The cause of this failure could have been that we had wrongly deleted a tablespace before the DDL transaction had been committed.

Generated at Thu Feb 08 09:39:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.