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

InnoDB crash recovery unsuccessful after restarting a Kubernetes compute node

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.3.1
    • None
    • None
    • AWS Elastic Kubernetes Services v1.29
      mariadb:11.3.1 container image
      AWS Elastic Filesystem Storage

    Description

      InnoDB crash recovery was unsuccessful after restarting a Kubernetes compute node. With innodb_force_recovery=1, the database started it still was not possible to generate a dump.

      2024-07-28 16:00:14 0 [Note] InnoDB: Using liburing
      2024-07-28 16:00:14 0 [Note] InnoDB: Initializing buffer pool, total size = 512.000MiB, chunk size = 8.000MiB
      2024-07-28 16:00:14 0 [Note] InnoDB: Completed initialization of buffer pool
      2024-07-28 16:00:14 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
      2024-07-28 16:00:14 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1016168499
      2024-07-28 16:00:15 0 [Note] InnoDB: End of log at LSN=1059138724
      2024-07-28 16:00:15 0 [Note] InnoDB: To recover: 2042 pages
      2024-07-28 16:00:15 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=27, page number=3]
      2024-07-28 16:00:15 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
      2024-07-28 16:00:15 0 [Note] InnoDB: Set innodb_force_recovery=1 to ignore corrupted pages.
      2024-07-28 16:00:15 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=27, page number=3]
      ...
      

      innodb_force_recovery=1

      2024-07-28 16:56:38 0 [Note] InnoDB: Using liburing
      2024-07-28 16:56:38 0 [Note] InnoDB: Initializing buffer pool, total size = 512.000MiB, chunk size = 8.000MiB
      2024-07-28 16:56:38 0 [Note] InnoDB: Completed initialization of buffer pool
      2024-07-28 16:56:38 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
      2024-07-28 16:56:39 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1016168499
      2024-07-28 16:56:39 0 [Note] InnoDB: At LSN: 1018058720: unable to open file ./DB/#sql-alter-1-f26.ibd for tablespace 113
      2024-07-28 16:56:39 0 [Note] InnoDB: At LSN: 1018068693: unable to open file ./DB/#sql-DB-1-f26.ibd for tablespace 69
      2024-07-28 16:56:39 0 [Note] InnoDB: At LSN: 1053607868: unable to open file ./DB/#sql-alter-1-13401.ibd for tablespace 114
      2024-07-28 16:56:39 0 [Note] InnoDB: At LSN: 1053611500: unable to open file ./DB/#sql-DB-1-13401.ibd for tablespace 83
      2024-07-28 16:56:40 0 [Note] InnoDB: End of log at LSN=1059134053
      2024-07-28 16:56:40 0 [Note] InnoDB: To recover: 2040 pages
      2024-07-28 16:56:40 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=27, page number=3]
      2024-07-28 16:56:40 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=27, page number=4]
      2024-07-28 16:56:40 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=27, page number=6]
      2024-07-28 16:56:40 0 [ERROR] InnoDB: Not applying DELETE_ROW_FORMAT_DYNAMIC due to corruption on [page id: space=27, page number=6]
      2024-07-28 16:56:40 0 [ERROR] InnoDB: Not applying DELETE_ROW_FORMAT_DYNAMIC due to corruption on [page id: space=27, page number=6]
      2024-07-28 16:56:40 0 [ERROR] InnoDB: Not applying INSERT_REUSE_DYNAMIC due to corruption on [page id: space=27, page number=6]
      2024-07-28 16:56:40 0 [ERROR] InnoDB: Not applying INSERT_REUSE_DYNAMIC due to corruption on [page id: space=27, page number=6]
      2024-07-28 16:56:40 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=27, page number=6]
      

      # mariadb-dump -h $DB_HOST -u $DB_USERNAME -p DB > dump.sql
      Enter password:
      mariadb-dump: Error 1034: Index for table '**************' is corrupt; try to repair it when dumping table `'**************'` at row: 50521
      

      MariaDB [DB]> CHECK TABLE ****************;
      +-------------------------+-------+----------+---------------------------------------------------------------------+
      | Table                   | Op    | Msg_type | Msg_text                                                            |
      +-------------------------+-------+----------+---------------------------------------------------------------------+
      | DB.**************** | check | Warning  | InnoDB: The B-tree of index PRIMARY is corrupted.                       |
      | DB.**************** | check | Warning  | InnoDB: Index fk_********_id******* is marked as corrupted              |
      | DB.**************** | check | Warning  | InnoDB: Index fk_********_id******** is marked as corrupted             |
      | DB.**************** | check | Warning  | InnoDB: Index ******** is marked as corrupted                           |
      | DB.**************** | check | Warning  | InnoDB: Index ******** is marked as corrupted                           |
      | DB.**************** | check | error    | Corrupt                                                                 |
      +-------------------------+-------+----------+---------------------------------------------------------------------+
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            alexghit Alex
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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