[MDEV-20617] InnoDB Failed to read file at offset Page read from tablespace is corrupted Created: 2019-09-18  Updated: 2023-05-12  Resolved: 2023-05-12

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

Type: Bug Priority: Major
Reporter: sysdljr Assignee: Marko Mäkelä
Resolution: Incomplete Votes: 0
Labels: None
Environment:

CentOS Linux release 7.3.1611
MariaDB-Server 10.3.14



 Description   

Hi,
yesterday and today , we encountered twice table corrupted errors, one on slave and other on master.
later, we restore table from database backup, please help confirm, this is os question or bug? thanks.

2019-09-18 2:42:43 0 [Note] InnoDB: Uncompressed page, stored checksum in field1 0, calculated checksums for field1: crc32 0, innodb 250018845, page type 17855 == INDEX.none 3735928559, stored checksum in field2 0, calculated check
sums for field2: crc32 0, innodb 301963614, none 3735928559, page LSN 1847 2662309274, low 4 bytes of LSN at page end 2662309274, page number (if stored to page already) 92068, space id (if created with >= MySQL-4.1.1 and stored alr
eady) 34
2019-09-18 2:42:43 0 [Note] InnoDB: Page may be an index page where index id is 126
2019-09-18 2:42:43 0 [Note] InnoDB: Index 126 is `idx__date` in table `db`.`tb_users_025`
2019-09-18 2:42:43 0 [Note] InnoDB: It is also possible that your operating system has corrupted its own file cache and rebooting your computer removes the error. If the corrupt page is an index page. You can also try to fix the cor
ruption by dumping, dropping, and reimporting the corrupt table. You can use CHECK TABLE to scan your table for corruption. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recove
ry.
2019-09-18 2:42:43 0 [ERROR] InnoDB: Failed to read file './db/tb_users_025.ibd' at offset 92068: Page read from tablespace is corrupted.
2019-09-18 3:04:43 0 [ERROR] InnoDB: Database page corruption on disk or a failed file read of tablespace db/tb_users_025 page [page id: space=34, page number=92068]. You may have to recover from a backup.
2019-09-18 3:04:43 0 [Note] InnoDB: Page dump in ascii and hex (16384 bytes)



 Comments   
Comment by Geoff Montee (Inactive) [ 2019-09-19 ]

This looks like it might be a duplicate of MDEV-19978.

Comment by Marko Mäkelä [ 2023-04-14 ]

There are many reasons why a page could be corrupted. One possible reason is that the files were incorrectly copied. There have been bugs in the default Galera snapshot transfer (SST) method rsync that were mostly fixed in MDEV-24845.

Handling of corrupted pages was improved in MDEV-13542 and related changes in MariaDB 10.6. Is there some way to reproduce this corruption when starting from a logical dump?

Often, but not always, corrupted tables can be fixed by OPTIMIZE TABLE. Because according to the output, this corruption occurs in a secondary index, OPTIMIZE TABLE should be able to fix it.

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