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

InnoDB: Aborting because of a corrupt database page: Encrypted page looks corrupted; innodb-force-recovery < 5 crashes in trx_rseg_mem_restore

    XMLWordPrintable

Details

    Description

      10.4 e837a358

      2020-02-29 23:47:07 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=15411771
      2020-02-29 23:47:08 0 [ERROR] InnoDB: Encrypted page [page id: space=0, page number=278] in file ./ibdata1 looks corrupted; key_version=1
      2020-02-29 23:47:08 0 [ERROR] [FATAL] InnoDB: Aborting because of a corrupt database page.
      200229 23:47:08 [ERROR] mysqld got signal 6 ;
       
      #5  0x00007f1a8ac1642a in __GI_abort () at abort.c:89
      #6  0x000055fcbf9c8ae7 in ib::fatal::~fatal (this=0x7ffdf882b000, __in_chrg=<optimized out>) at /data/src/10.4/storage/innobase/ut/ut0ut.cc:597
      #7  0x000055fcbfa5008f in buf_page_io_complete (bpage=0x7f1a6805e680, dblwr=false, evict=false) at /data/src/10.4/storage/innobase/buf/buf0buf.cc:6144
      #8  0x000055fcbfa7ed3b in buf_read_page_low (err=0x7ffdf882b3f4, sync=true, type=0, mode=132, page_id=..., zip_size=0, unzip=false, ignore_missing_space=false) at /data/src/10.4/storage/innobase/buf/buf0rea.cc:203
      #9  0x000055fcbfa7f675 in buf_read_page (page_id=..., zip_size=0) at /data/src/10.4/storage/innobase/buf/buf0rea.cc:413
      #10 0x000055fcbfa49abf in buf_page_get_gen (page_id=..., zip_size=0, rw_latch=2, guess=0x0, mode=10, file=0x55fcc0160fe0 "/data/src/10.4/storage/innobase/include/trx0rseg.ic", line=70, mtr=0x7ffdf882ba00, err=0x0) at /data/src/10.4/storage/innobase/buf/buf0buf.cc:4407
      #11 0x000055fcbf9a6cdf in trx_rsegf_get_new (space=0, page_no=278, mtr=0x7ffdf882ba00) at /data/src/10.4/storage/innobase/include/trx0rseg.ic:70
      #12 0x000055fcbf9a82a8 in trx_rseg_mem_restore (rseg=0x55fcc38b7620, max_trx_id=@0x7ffdf882b928: 48431, mtr=0x7ffdf882ba00) at /data/src/10.4/storage/innobase/trx/trx0rseg.cc:447
      #13 0x000055fcbf9a8b38 in trx_rseg_array_init () at /data/src/10.4/storage/innobase/trx/trx0rseg.cc:606
      #14 0x000055fcbf9b1ddc in trx_lists_init_at_db_start () at /data/src/10.4/storage/innobase/trx/trx0trx.cc:741
      #15 0x000055fcbf962dc2 in srv_start (create_new_db=false) at /data/src/10.4/storage/innobase/srv/srv0start.cc:1891
      #16 0x000055fcbf7344d3 in innodb_init (p=0x55fcc2d6bbe0) at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:4247
      #17 0x000055fcbf4eed02 in ha_initialize_handlerton (plugin=0x55fcc2ca4758) at /data/src/10.4/sql/handler.cc:557
      #18 0x000055fcbf1a99ad in plugin_initialize (tmp_root=0x7ffdf8832750, plugin=0x55fcc2ca4758, argc=0x55fcc0b3ad98 <remaining_argc>, argv=0x55fcc2c64ee8, options_only=false) at /data/src/10.4/sql/sql_plugin.cc:1438
      #19 0x000055fcbf1aa738 in plugin_init (argc=0x55fcc0b3ad98 <remaining_argc>, argv=0x55fcc2c64ee8, flags=0) at /data/src/10.4/sql/sql_plugin.cc:1720
      #20 0x000055fcbf051728 in init_server_components () at /data/src/10.4/sql/mysqld.cc:5207
      #21 0x000055fcbf052942 in mysqld_main (argc=22, argv=0x55fcc2c64ee8) at /data/src/10.4/sql/mysqld.cc:5730
      #22 0x000055fcbf046c10 in main (argc=22, argv=0x7ffdf8833518) at /data/src/10.4/sql/main.cc:25
      

      With innodb-force-recovery=3 (also 1-4):

      2020-03-01  0:09:07 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=15411771
      2020-03-01  0:09:08 0 [ERROR] InnoDB: Encrypted page [page id: space=0, page number=278] in file ./ibdata1 looks corrupted; key_version=1
      2020-03-01  0:09:08 0 [ERROR] InnoDB: Encrypted page [page id: space=0, page number=278] in file ./ibdata1 looks corrupted; key_version=1
      ...
      2020-03-01  0:09:08 0 [ERROR] InnoDB: Encrypted page [page id: space=0, page number=278] in file ./ibdata1 looks corrupted; key_version=1
      200301  0:09:08 [ERROR] mysqld got signal 11 ;
       
      #3  <signal handler called>
      #4  0x00005604d8a9424f in mach_read_from_4 (b=0x26 <error: Cannot access memory at address 0x26>) at /data/src/10.4/storage/innobase/include/mach0data.ic:178
      #5  0x00005604d8a962b8 in trx_rseg_mem_restore (rseg=0x5604dbe70590, max_trx_id=@0x7ffdef71fdc8: 48431, mtr=0x7ffdef71fea0) at /data/src/10.4/storage/innobase/trx/trx0rseg.cc:449
      #6  0x00005604d8a96b38 in trx_rseg_array_init () at /data/src/10.4/storage/innobase/trx/trx0rseg.cc:606
      #7  0x00005604d8a9fddc in trx_lists_init_at_db_start () at /data/src/10.4/storage/innobase/trx/trx0trx.cc:741
      #8  0x00005604d8a50dc2 in srv_start (create_new_db=false) at /data/src/10.4/storage/innobase/srv/srv0start.cc:1891
      #9  0x00005604d88224d3 in innodb_init (p=0x5604db324be0) at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:4247
      #10 0x00005604d85dcd02 in ha_initialize_handlerton (plugin=0x5604db25d758) at /data/src/10.4/sql/handler.cc:557
      #11 0x00005604d82979ad in plugin_initialize (tmp_root=0x7ffdef726bf0, plugin=0x5604db25d758, argc=0x5604d9c28d98 <remaining_argc>, argv=0x5604db21dee8, options_only=false) at /data/src/10.4/sql/sql_plugin.cc:1438
      #12 0x00005604d8298738 in plugin_init (argc=0x5604d9c28d98 <remaining_argc>, argv=0x5604db21dee8, flags=0) at /data/src/10.4/sql/sql_plugin.cc:1720
      #13 0x00005604d813f728 in init_server_components () at /data/src/10.4/sql/mysqld.cc:5207
      #14 0x00005604d8140942 in mysqld_main (argc=23, argv=0x5604db21dee8) at /data/src/10.4/sql/mysqld.cc:5730
      #15 0x00005604d8134c10 in main (argc=23, argv=0x7ffdef7279b8) at /data/src/10.4/sql/main.cc:25
      

      To reproduce:

      • download and extract the datadir;
      • start the server with

        --innodb-compression-algorithm=zlib --innodb-page-size=32K --innodb-encrypt-tables --innodb-encrypt-log --innodb-encryption-threads=4   --file-key-management --file-key-management-filename=`pwd`/mysql-test/std_data/keys.txt --plugin-load-add=file_key_management
        

        (and optionally with innodb-force-recovery=N).

      The datadir was generated with a 10.4-based branch by intentionally crashing the server in a middle of concurrent DML. The general log of the session before the crash is attached.

      Attachments

        Activity

          People

            marko Marko Mäkelä
            elenst Elena Stepanova
            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.