Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.6.3, 10.6.4, 10.6.5
Description
The test innodb.doublewrite corrupts the first page of a data file t1.ibd by writing 0 to the bytes 34 through 37 and recomputing the checksum.
The data directory in data.tar.xz fails to recover:
tar xJf data.tar.xz
|
sql/mariadbd --innodb-page-size=32k --datadir=$(pwd)/data
|
mariadb-10.6.5 |
2021-11-10 13:17:58 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=45679,45679
|
2021-11-10 13:17:58 0 [ERROR] InnoDB: Inconsistent tablespace ID in ./test/t1.ibd
|
2021-11-10 13:17:58 0 [ERROR] InnoDB: Cannot apply log to [page id: space=5, page number=0] of corrupted file './test/t1.ibd'
|
2021-11-10 13:17:58 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
|
2021-11-10 13:17:58 0 [Note] InnoDB: Starting shutdown...
|
You will find that fil_ibd_load() is invoked once and returns FIL_LOAD_DEFER. After that, buf_dblwr_t::recover() will be invoked, but there is no call of Datafile::restore_from_doublewrite(). The scenario is similar to MDEV-26631.
Note: The doublewrite copy of the page is at the very first slot. The contents only differs for the tablespace identifier and the page checksum:
diff -u <(od -An -t x1 -j 0x200000 -N 0x8000 data/ibdata1) <(od -An -t x1 -N 0x8000 data/test/t1.ibd) |
Thanks to monty for providing a copy of the data directory.
Attachments
Issue Links
- causes
-
MDEV-27322 Test innodb.doublewrite crashes when using innodb_flush_method=O_DIRECT
- Closed
- relates to
-
MDEV-25909 Unnecessary calls to fil_ibd_load() slow down recovery
- Open
-
MDEV-26631 Race condition in the test innodb.doublewrite
- Closed