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

Intermittent InnoDB: Failing assertion: crypt_data and InnoDB: Failing assertion: mutex->magic_n == MUTEX_MAGIC_N

    XMLWordPrintable

Details

    Description

      Note: reproducible on the current 10.1 tree commit 476dfb1603 plus the patch for MDEV-8164 applied locally (either 6f1114b or eefada5, all the same). The stack traces below are from the latter patch on top of 10.1 tree.

      The two failures below happen intermittently on the same test, which is why I am filing them together. I don't know if they have the same root cause or not.

      2015-05-17 21:13:51 7f182cbfc700  InnoDB: Assertion failure in thread 139741806708480 in file fil0crypt.cc line 1577
      InnoDB: Failing assertion: crypt_data
      InnoDB: We intentionally generate a memory trap.
       
      # 2015-05-17T21:13:57 [58831] #5  0x00007f185b8bdb8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
      # 2015-05-17T21:13:57 [58831] #6  0x00007f185e59de07 in fil_crypt_find_page_to_rotate (key_state=0x7f182cbfbd90, state=0x7f182cbfbda0) at /home/elenst/git/10.1/storage/xtradb/fil/fil0crypt.cc:1577
      # 2015-05-17T21:13:57 [58831] #7  0x00007f185e59f073 in fil_crypt_thread (arg=0x0) at /home/elenst/git/10.1/storage/xtradb/fil/fil0crypt.cc:2156
      # 2015-05-17T21:13:57 [58831] #8  0x00007f185c24ae9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
      # 2015-05-17T21:13:57 [58831] #9  0x00007f185b977cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6

      2015-05-17 21:17:52 7f0e30ffc700  InnoDB: Assertion failure in thread 139698928338688 in file sync0sync.cc line 485
      InnoDB: Failing assertion: mutex->magic_n == MUTEX_MAGIC_N
      InnoDB: We intentionally generate a memory trap.
       
      # 2015-05-17T21:17:58 [59088] #5  0x00007f0e5fdbeb8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
      # 2015-05-17T21:17:58 [59088] #6  0x00007f0e62998aa8 in mutex_validate (mutex=0x7f0e3280e7f8) at /home/elenst/git/10.1/storage/xtradb/
      sync/sync0sync.cc:485
      # 2015-05-17T21:17:58 [59088] #7  0x00007f0e62a9b551 in mutex_enter_func (mutex=0x7f0e3280e7f8, file_name=0x7f0e62ddd8e0 "/home/elenst
      /git/10.1/storage/xtradb/fil/fil0crypt.cc", line=2077) at /home/elenst/git/10.1/storage/xtradb/include/sync0sync.ic:257
      # 2015-05-17T21:17:58 [59088] #8  0x00007f0e62a9b6a3 in pfs_mutex_enter_func (mutex=0x7f0e3280e7f8, file_name=0x7f0e62ddd8e0 "/home/el
      enst/git/10.1/storage/xtradb/fil/fil0crypt.cc", line=2077) at /home/elenst/git/10.1/storage/xtradb/include/sync0sync.ic:379
      # 2015-05-17T21:17:58 [59088] #9  0x00007f0e62a9fe94 in fil_crypt_complete_rotate_space (key_state=0x7f0e30ffbd90, state=0x7f0e30ffbda
      0) at /home/elenst/git/10.1/storage/xtradb/fil/fil0crypt.cc:2077
      # 2015-05-17T21:17:58 [59088] #10 0x00007f0e62aa00a0 in fil_crypt_thread (arg=0x0) at /home/elenst/git/10.1/storage/xtradb/fil/fil0crypt.cc:2166
      # 2015-05-17T21:17:58 [59088] #11 0x00007f0e6074be9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
      # 2015-05-17T21:17:58 [59088] #12 0x00007f0e5fe78cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6

      Results of 10 subsequent runs of the test below:

      • 2 times it passed
      • 3 times it ended with Failing assertion: crypt_data
      • 5 times it ended with Failing assertion: mutex->magic_n == MUTEX_MAGIC_N

      query:
              INSERT IGNORE INTO _table ( _field ) VALUES ( _digit ), ( _digit ), ( _digit ), ( _digit ) |
              DELETE FROM _table WHERE `pk` > _digit LIMIT 4 ;
       
      thread2:
              set_encrypt_option |
              create_or_replace;
       
      set_encrypt_option:
              SET GLOBAL innodb_encrypt_tables = enc_tables |
              SET GLOBAL innodb_encryption_threads = _digit |
              SET GLOBAL innodb_scrub_log_speed = _smallint_unsigned 
      ;
       
      encrypt_on_off:
              ON | OFF ;
       
      enc_tables:
              ON | OFF | 'FORCE' ;
       
      create_or_replace:
              CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM _table ;

      RQG data template enc2.zz

      $tables = {
      	rows => [0, 1, 10 ],
      	pk => [ 'int auto_increment' ]
      };
       
      $fields = {
      	types => [ 'int' ],
      	indexes => [ 'key', undef ]
      };
       
      $data = {
      	numbers => [ 'digit', 'null', undef ],
      	strings => [ 'letter', 'english' ],
      	blobs => [ 'data' ],
      	temporals => ['date', 'year', 'null', undef ]
      }

      RQG command line (use lp:~elenst/randgen/mariadb-patches):

      perl ./runall-new.pl --threads=2 --duration=400 --queries=100M --mysqld=--plugin-load-add=file_key_management.so --mysqld=--file_key_management_filename=<your basedir>/mysql-test/std_data/keys.txt --grammar=enc2.yy --gendata=enc2.zz --mtr-build-thread=73 --basedir1=<your basedir> --vardir1=<your vardir>

      See MDEV-8171 for instructions how to run the same test several times.

      Attachments

        Issue Links

          Activity

            People

              jplindst Jan Lindström (Inactive)
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.