|
MariaDB 10.3.14 slave
When the slave is running normally, the table space is suddenly damaged. The error message is as follows:
error log:
2019-07-02 21:42:55 0 [Note] InnoDB: Uncompressed page, stored checksum in field1 0, calculated checksums for field1: crc32 0, innodb 1067886597, page type 17855 == I
NDEX.none 3735928559, stored checksum in field2 0, calculated checksums for field2: crc32 0, innodb 3702374979, none 3735928559, page LSN 529 737322254, low 4 bytes o
f LSN at page end 737322254, page number (if stored to page already) 178467, space id (if created with >= MySQL-4.1.1 and stored already) 168
2019-07-02 21:42:55 0 [Note] InnoDB: Page may be an index page where index id is 883
2019-07-02 21:42:55 0 [Note] InnoDB: Index 883 is `IX_USER_ID` in table `nir`.`user_limit_log`
2019-07-02 21:42:55 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 corruption 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 recovery.
2019-07-02 21:42:55 0 [ERROR] InnoDB: Failed to read file './nir/user_limit_log.ibd' at offset 178467: Page read from tablespace is corrupted.
2019-07-02 21:42:55 443893 [ERROR] mysqld: Index for table 'user_limit_log' is corrupt; try to repair it
2019-07-02 21:42:55 443893 [ERROR] Slave SQL: Could not execute Write_rows_v1 event on table nir.user_limit_log; Table nir/user_limit_log in tablespace 1399779
99012608 corrupted., Error_code: 126; Index for table 'user_limit_log' is corrupt; try to repair it, Error_code: 1034; handler error HA_ERR_CRASHED; the event's master
log mysql-bin.011257, end_log_pos 88411472, Gtid 0-196307-4656674618, Internal MariaDB error code: 1034
2019-07-02 21:42:55 443893 [Warning] Slave: Table nir/user_limit_log in tablespace 139977999012608 corrupted. Error_code: 126
2019-07-02 21:42:55 443893 [Warning] Slave: Index for table 'user_limit_log' is corrupt; try to repair it Error_code: 1034
2019-07-02 21:42:55 443893 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at l
og 'mysql-bin.011257' position 88410304; GTID position '0-196307-4656674617'
2019-07-02 21:42:55 443885 [Note] Error reading relay log event: slave SQL thread was killed
2019-07-02 21:42:55 443885 [Note] Slave SQL thread exiting, replication stopped in log 'mysql-bin.011257' at position 88410304; GTID position '0-196307-4656674617'
2019-07-02 21:42:56 0 [ERROR] InnoDB: Database page corruption on disk or a failed file read of tablespace nir/user_limit_log page [page id: space=168, page number
=178467]. You may have to recover from a backup.
2019-07-02 21:42:56 0 [Note] InnoDB: Page dump in ascii and hex (16384 bytes):
len 16384; hex 000000000002b92300109169000dec65000002112bf2a50e45bf0000000000000000000000a800813e34837025d417c425c200020009021c00000000b4c2ce6500000000000000000373000
0000000000000000000000000000000000000010002001b696e66696d756d0001000b000073757072656d756d0000001000128000000001eff8d200d4c49c0000001800128000000001eff8d200d4c4ff000000
2000128000000001eff8d200d613b20004002800128000000001eff8d200d6156d0000003000128000000001eff8d200d618bf0000003823a68000000001eff8d200d618c10000004000128000000001eff8d30
0d4c4450005004800128000000001eff8d300d59f390000005000128000000001eff8d300d5c5eb0000005800128000000001eff8d300d5ca030000006000128000000001eff8d300d5ca040004006800128000
000001eff8d300d967810000007000128000000001eff8d300d967ef0000007800128000000001eff8d300d969670000008000128000000001eff8d300d969680004008800128000000001eff8d400d4c5e5000
0009000128000000001eff8d400d4c7220000009800128000000001eff8d400d4cf16000000a000128000000001eff8d400d4d400000400a800128000000001eff8d400d4d401000000b000128000000001eff8
|
|
There is no encryption involved according to my.cnf file. But checksum
value is 0 in page trailer and page header. Here there is no LSN mismatch.
There was wrong misconception that If checksum value is 0 then page should be empty.
This check was added by the following commit:
commit 065ba53ccbf3ab468408dc5a5dbcb3741750a02d
|
Author: Marko Mäkelä <marko.makela@mariadb.com>
|
Date: Tue Mar 26 13:51:15 2019 +0200
|
|
MDEV-12711 mariabackup --backup is refused for multi-file system tablespace
|
|
https://cs.stackexchange.com/questions/18431/range-of-crc-32
According to the above link, crc32 value can be 0.
|
|
thiru, I would like to revise your conclusion of the Stack Exchange discussion: The value of a CRC (using any primitive polynomial in a binary Galois Field) can only be 0 if the input is all 0. That is, unless the input buffer is all zero, such CRC computed out of it should not be 0.
This property is also being exploited in Galois linear-feedback shift registers. That is, unless the internal state of the Galois LFSR pseudorandom number generator is 0, it is guaranteed to cycle through the other 2³²-1 (or whatever the degree of the primitive polynomial is) values before repeating the sequence.
The reason why innodb_checksum_algorithm=crc32 can result in a zero checksum for nonzero input is (like mentioned in MDEV-21165) that this checksum (which was introduced in MySQL 5.6) is actually an exclusive-or combination of two CRC-32C checksums that are computed from different parts of the page. If both CRC-32C happen to be the same, the combined checksum can be the same. For the innodb_checksum_algorithm=full_crc32 that was introduced in MDEV-12026 (MariaDB 10.4), the checksum should only be 0 if the entire page is filled with 0 bytes.
|