Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-19978

Page read from tablespace is corrupted

Details

    Description

      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 22:07:48 0 [Note] InnoDB: Uncompressed page, stored checksum in field1 0, calculated checksums for field1: crc32 0, innodb 1067886597, page type 17855 == INDEX.none 3735928559,
      stored checksum in field2 0, calculated checksums for field2: crc32 0, innodb 3702374979, none 3735928559, page LSN 529 737322254, low 4 bytes of 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 22:07:48 0 [Note] InnoDB: Page may be an index page where index id is 883
      2019-07-02 22:07:48 0 [Note] InnoDB: Index 883 is `IX_USER_ID` in table `nir`.`user_limit_log`
      2019-07-02 22:07:48 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 22:07:48 0 [ERROR] InnoDB: Failed to read file './nir/user_limit_log.ibd' at offset 178467: Page read from tablespace is corrupted.
      2019-07-02 22:07:49 0 [ERROR] InnoDB: Database page corruption on disk or a failed file read of tablespace nirvana/user_limit_log page [page id: space=168, page number=178467]. You may have
      to recover from a backup.
      2019-07-02 22:07:49 0 [Note] InnoDB: Page dump in ascii and hex (16384 bytes):
      len 16384; hex 000000000002b92300109169000dec65000002112bf2a50e45bf0000000000000000000000a800813e34837025d417c425c200020009021c00000000b4c2ce65000000000000000003730000000000000000000000000
      000000000000000010002001b696e66696d756d0001000b000073757072656d756d0000001000128000000001eff8d200d4c49c0000001800128000000001eff8d200d4c4ff0000002000128000000001eff8d200d613b200040028001280
      00000001eff8d200d6156d0000003000128000000001eff8d200d618bf0000003823a68000000001eff8d200d618c10000004000128000000001eff8d300d4c4450005004800128000000001eff8d300d59f390000005000128000000001e
      ff8d300d5c5eb0000005800128000000001eff8d300d5ca030000006000128000000001eff8d300d5ca040004006800128000000001eff8d300d967810000007000128000000001eff8d300d967ef0000007800128000000001eff8d300d9
      69670000008000128000000001eff8d300d969680004008800128000000001eff8d400d4c5e50000009000128000000001eff8d400d4c7220000009800128000000001eff8d400d4cf16000000a000128000000001eff8d400d4d40000040
      0a800128000000001eff8d400d4d401000000b000128000000001eff8d500d4c872000000b800128000000001eff8d500d4c8c6000000c000128000000001eff8d500d4c9f4000400c800128000000001eff8d500d4d23d000000d0001280
      00000001eff8d500d4d580000000d800128000000001eff8d500d4d7cc000000e000128000000001eff8d500d4d7cd000400e800128000000001eff8d500d4db92000000f000128000000001eff8d500d7b334000000f800128000000001e
      ff8d500d7b8710000010000128000000001eff8d500d7b8720004010800128000000001eff8d600d4c5670000011000128000000001eff8d600d4c8990000011800128000000001eff8d600d4cd340000012000128000000001eff8d600d4
      d1960004012800128000000001eff8d600da429d0000013000128000000001eff8d600da4b570000013800128000000001eff8d600daab03000001401cb08000000001eff8d600daab050006014800128000000001eff8da00d4c46f00000
      15000128000000001eff8da00d4c58a0000015800128000000001eff8da00d4c9200000016000128000000001eff8da00d4ce150004016800128000000001eff8da00d4ce160000017000128000000001eff8dd00d4c40b00000178001280
      00000001eff8dd00d4c43a0000018000128000000001eff8dd00d4c5400004018800128000000001eff8dd00d5ac4c0000019000128000000001eff8dd00d6db150000019800128000000001eff8dd00f758a5000001a000128000000001e
      ff8de00d4c548000401a800128000000001eff8de00d4c591000001b000128000000001eff8de00d4c5c2000001b800128000000001eff8de00d4c9f3000001c000128000000001eff8de00d4ce21000401c81d9a8000000001eff8de00d4
      ce22000001d000128000000001eff8e000d4c4a5000001d800128000000001eff8e000d4c63e000001e000128000000001eff8e000d4d51d000501e800128000000001eff8e000d4dabf000001f000128000000001eff8e000d4dac000000
      1f800128000000001eff8e000d4e88f0000020000128000000001eff8e000d522e50004020800128000000001eff8e000d80b040000021000128000000001eff8e000d80f560000021800128000000001eff8e000d80f5700000220001280
      00000001eff8e400d4c5600004022800128000000001eff8e400d4c86600000230316e8000000001eff8e400d4c92c0000023800128000000001eff8e900f1f14e0000024000128000000001eff8e900f1f1a80007024800128000000001e
      ff8e900f207940000025000128000000001eff8e900f20a5f0000025800128000000001eff8e900f20a600000026000128000000001eff8eb00d4c73b0004026800128000000001eff8eb00d4c8e20000027000128000000001eff8eb00d4
      cc030000027800128000000001eff8eb00d4d13c00000280097e8000000001eff8eb00d4d13d0005028800128000000001eff8ef00d4c59b0000029000128000000001eff8ef00d4c5f70000029800128000000001eff8ef00d4c8a100000
      2a000128000000001eff8ef00d4cdee000402a800128000000001eff8ef00d4e3fe000002b000128000000001eff8ef00d51044000002b800128000000001eff8ef00d51603000002c000128000000001eff8ef00d51605000402c8001280
      00000001eff8f000d4d0b5000002d000128000000001eff8f000d4d340000002d800128000000001eff8f000d4dea7000002e000128000000001eff8f000d4e032000402e800128000000001eff8f000d4e2de000002f000128000000001e
      ff8f000d4e2df000002f819f28000000001eff8f100d5dd3f0000030000128000000001eff8f200d4c56a0008030800128000000001eff8f200d4c6f50000031000128000000001eff8f200d4dba10000031800128000000001eff8f200d5
      bdf90000032000128000000001eff8f200d5c24d0004032800128000000001eff8f200d5c24f0000033000128000000001eff8f400d4c43d0000033800128000000001eff8f400d4ca2f0000034000128000000001eff8f400d4d09900040
      34800128000000001eff8f400d4d65d0000035000128000000001eff8f400d4d65f0000035800128000000001eff8f600d4cbb20000036000128000000001eff8f600d4cf0e0004036800128000000001eff8f600d4d2ff00000370001280
      00000001eff8f600d4d79b0000037800128000000001eff8f600d4d79c0000038000128000000001eff8f600d4d96a0004038800128000000001eff8f600d4d9df0000039000128000000001eff8f600d7b3650000039800128000000001e
      ff8f600d7b875000003a005e88000000001eff8f600d7b877000603a800128000000001eff8f700d4c8eb000003b000128000000001eff8f700d51150000003b800128000000001eff8f700d517e4000003c000128000000001eff8f700d5
      1c53000403c800128000000001eff8f700d51c54000003d000128000000001eff8f700d550d0000003d800128000000001eff8f700da430c000003e000128000000001eff8f700da4821000403e800128000000001eff8f700da482200000
      3f000128000000001eff8f900d4c5fe000003f800128000000001eff8f900d4c9fe0000040000128000000001eff8f900d4d1990004040800128000000001eff8f900d4d7540000041000128000000001eff8f900d4dc420000041813e680
      00000001eff8f900d4dc430000042000128000000001eff8fa00d4cab10007042800128000000001eff8fa00d4cc700000043000128000000001eff8fa00d4d0390000043800128000000001eff8fa00d4d4050000044000128000000001e
      ff8fa00d4d4060004044800128000000001eff8fc00d4c4ca0000045000128000000001eff8fc00d4c5c10000045800128000000001eff8fc00d4c82d0000046000128000000001eff8fc00d4c9080004046800128000000001eff8fc00d4
      cd5c0000047000128000000001eff8fc00d4d2ed0000047818e48000000001eff8fc00d4d2ee0000048000128000000001eff90100d4c3b30007048800128000000001eff90100d4caa30000049000128000000001eff90100d4cab000000
      49800128000000001eff90200d4c769000004a000128000000001eff90200d4cbd4000404a800128000000001eff90200d4d35e000004b000128000000001eff90200d4d94c000004b800128000000001eff90200d4d94d000004c0001280
      00000001eff90300d58537000404c800128000000001eff90300d5864d000004d000128000000001eff90300d5ba0e000004d800128000000001eff90300d5be0f000004e000128000000001eff90300d703a1000404e800128000000001e
      ff90300d70848000004f000128000000001eff90300d70849000004f800128000000001eff90500d4ca160000050000128000000001eff90500d4cde80004050812008000000001eff90500e0d6d10000051000128000000001eff90700d4
      c5c30000051800128000000001eff90700d4c8d20000052000128000000001eff90700d4cbb70007052800128000000001eff90700d4ff3a0000053000128000000001eff90700d5052e0000053800128000000001eff90700d5052f00000

      Attachments

        1. error.log.7z
          37 kB
        2. my.cnf
          4 kB

        Issue Links

          Activity

            Looks much like MDEV-18193. thiru, can you confirm it's the same problem?

            elenst Elena Stepanova added a comment - Looks much like MDEV-18193 . thiru , can you confirm it's the same problem?
            hiller1 hiller1 added a comment -

            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

            hiller1 hiller1 added a comment - 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

            hiller1 Please upload the error log file, configuration file and whether the encryption was used?

            thiru Thirunarayanan Balathandayuthapani added a comment - hiller1 Please upload the error log file, configuration file and whether the encryption was used?
            hiller1 hiller1 added a comment -

            The error log has been uploaded

            hiller1 hiller1 added a comment - The error log has been uploaded

            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 Thirunarayanan Balathandayuthapani added a comment - 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.

            Looks good to me.

            kevg Eugene Kosov (Inactive) added a comment - Looks good to me.

            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.

            marko Marko Mäkelä added a comment - 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.

            I have seen two similar crashes on two separate instances on 10.4.13, not sure if it is the same but the crash log looks somewhat related, but I have created MDEV-23653

            marostegui Manuel Arostegui added a comment - I have seen two similar crashes on two separate instances on 10.4.13, not sure if it is the same but the crash log looks somewhat related, but I have created MDEV-23653

            People

              thiru Thirunarayanan Balathandayuthapani
              hiller1 hiller1
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.