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

Failing assertion: new_state->key_version != ENCRYPTION_KEY_VERSION_INVALID

    XMLWordPrintable

    Details

      Description

      InnoDB: Assertion failure in thread 140535339677440 in file fil0crypt.cc line 975
      InnoDB: Failing assertion: new_state->key_version != ENCRYPTION_KEY_VERSION_INVALID
      InnoDB: We intentionally generate a memory trap.

      Stack trace from 10.1 commit f789158ddfa90933678dc927a05719ba692d0854

      #3  <signal handler called>
      #4  0x00007fd11cccd165 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
      #5  0x00007fd11ccd03e0 in *__GI_abort () at abort.c:92
      #6  0x00007fd11fc71adb in fil_crypt_get_key_state (new_state=0x7fd0eeffedb0) at 10.1/storage/xtradb/fil/fil0crypt.cc:975
      #7  0x00007fd11fc72429 in fil_crypt_space_needs_rotation (state=0x7fd0eeffedc0, key_state=0x7fd0eeffedb0, recheck=0x7fd0eeffed9b) at 1
      0.1/storage/xtradb/fil/fil0crypt.cc:1315
      #8  0x00007fd11fc72a9c in fil_crypt_find_space_to_rotate (key_state=0x7fd0eeffedb0, state=0x7fd0eeffedc0, recheck=0x7fd0eeffed9b) at 10.1/storage/xtradb/fil/fil0crypt.cc:1561
      #9  0x00007fd11fc740fe in fil_crypt_thread (arg=0x0) at 10.1/storage/xtradb/fil/fil0crypt.cc:2233
      #10 0x00007fd11ece1b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #11 0x00007fd11cd7695d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      General test flow:

      • server is started with file_key_management plugin and keys, otherwise default options;
      • a few InnoDB tables are created;
      • several threads are running DML on these tables;
      • one thread is running ALTER TABLE with different values of ENCRYPTED and ENCRYPTION_KEY_ID, and also toggles innodb_encryption_threads and innodb_encrypt_tables glboal variables;
      • the server gets intentionally crashed and restarted periodically.

      RQG command line

      $RQG_HOME/runall-new.pl --threads=8 --duration=600 --queries=100M   --restart-timeout=30  --mysqld=--log_output=FILE --mysqld=--plugin_load_add=file_key_management.so --mysqld=--file_key_management_filename=$BASEDIR/mysql-test/std_data/keys.txt  --reporters=Backtrace,ErrorLog,CrashRestart --grammar=$HOMEDIR/mdev8817.yy --gendata=$HOMEDIR/mdev8817.zz --basedir=$BASEDIR --vardir=$HOMEDIR/var --mtr-build-thread=817

      mdev8817.yy and mdev8817.zz are attached.
      Use RQG from lp:~elenst/randgen/mariadb-patches.

      It can also trigger MDEV-8819 and MDEV-8821.

        Attachments

          Activity

            People

            Assignee:
            jplindst Jan Lindström
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: