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

InnoDB recovery of recently created files is not crash-safe

    XMLWordPrintable

    Details

      Description

      The test encryption.innodb-redo-badkey fails on our CI systems quite often like this:

      2022-02-10 21:39:45 0 [Warning] Found 3 prepared XA transactions
      2022-02-10 21:39:46 0 [ERROR] InnoDB: Missing FILE_CREATE, FILE_DELETE or FILE_MODIFY before FILE_CHECKPOINT for tablespace 85
      2022-02-10 21:39:46 0 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[1445] with error Data structure corruption
      

      I reduced the test to the minimum so that it would still occasionally fail on my system when being run 64 times concurrently with each other:

      create table t1(a int primary key, c char(250), b blob) engine=innodb;
      create table t2(a int primary key, c char(250), b blob) engine=innodb;
      create table t3(a int primary key, c char(250), b blob) engine=innodb;
      create table t4(a int primary key, c char(250), b blob) engine=innodb;
      set unique_checks=0,foreign_key_checks=0;
      set @x=repeat('x',140),@y=repeat('y',140),@b=repeat('b',42000);
      begin;
      insert into t1 select seq, @x, @b from seq_1_to_20;
      insert into t2 select seq, @x, @b from seq_1_to_20;
      insert into t3 select seq, @x, @b from seq_1_to_20;
      insert into t4 select seq, @x, @b from seq_1_to_20;
      update t1 set c = @y;
      update t2 set c = @y;
      update t3 set c = @y;
      update t4 set c = @y;
      commit;
      # restart
      # restart
      # restart
      drop table t1,t2,t3,t4;
      

      There are 2 failure patterns:

      2022-02-11 17:01:59 0 [ERROR] InnoDB: Missing FILE_CREATE, FILE_DELETE or FILE_MODIFY before FILE_CHECKPOINT for tablespace 5
      

      and

      2022-02-11 16:52:35 0 [ERROR] InnoDB: Page [page id: space=0, page number=243] log sequence number 10492220 is in the future! Current system log sequence number 10485711.
      

      On 10.5, 64×100 runs of the test completed fine. I tried defining SUX_LOCK_GENERIC on 10.6, but also with that, the test fails.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.