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

Assertion `log_block_get_start_lsn(lsn, log_block_get_hdr_no(buf)) == lsn' failed upon attempt to start on encrypted datadir from previous versions

    XMLWordPrintable

Details

    Description

      10.5 57c592f7

      2020-03-09  0:50:05 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
      2020-03-09  0:50:05 0 [Note] InnoDB: Completed initialization of buffer pool
      2020-03-09  0:50:05 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      mysqld: /data/src/10.5/storage/innobase/log/log0crypt.cc:153: bool log_crypt(byte*, lsn_t, ulint, log_crypt_t): Assertion `log_block_get_start_lsn(lsn, log_block_get_hdr_no(buf)) == lsn' failed.
      200309  0:50:05 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fb978b87f12 in __GI___assert_fail (assertion=0x557253511f90 "log_block_get_start_lsn(lsn, log_block_get_hdr_no(buf)) == lsn", file=0x557253511f30 "/data/src/10.5/storage/innobase/log/log0crypt.cc", line=153, function=0x557253512160 <log_crypt(unsigned char*, unsigned long, unsigned long, log_crypt_t)::__PRETTY_FUNCTION__> "bool log_crypt(byte*, lsn_t, ulint, log_crypt_t)") at assert.c:101
      #8  0x0000557252d4b6f8 in log_crypt (buf=0x7fb961215000 "\200", lsn=0, size=512, op=LOG_DECRYPT) at /data/src/10.5/storage/innobase/log/log0crypt.cc:153
      #9  0x0000557252d3383a in recv_log_recover_10_4 () at /data/src/10.5/storage/innobase/log/log0recv.cc:1506
      #10 0x0000557252d33fad in recv_find_max_checkpoint (max_field=0x7ffc62b96878) at /data/src/10.5/storage/innobase/log/log0recv.cc:1646
      #11 0x0000557252d3b6c1 in recv_recovery_from_checkpoint_start (flush_lsn=63902) at /data/src/10.5/storage/innobase/log/log0recv.cc:3292
      #12 0x0000557252e848e1 in srv_start (create_new_db=false) at /data/src/10.5/storage/innobase/srv/srv0start.cc:1529
      #13 0x0000557252c52249 in innodb_init (p=0x557256094dc0) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:4035
      #14 0x00005572528401b3 in ha_initialize_handlerton (plugin=0x557255fc89d0) at /data/src/10.5/sql/handler.cc:549
      #15 0x00005572525120d5 in plugin_initialize (tmp_root=0x7ffc62b995b0, plugin=0x557255fc89d0, argc=0x557253f5ded8 <remaining_argc>, argv=0x557255f887b8, options_only=false) at /data/src/10.5/sql/sql_plugin.cc:1450
      #16 0x0000557252512e57 in plugin_init (argc=0x557253f5ded8 <remaining_argc>, argv=0x557255f887b8, flags=0) at /data/src/10.5/sql/sql_plugin.cc:1731
      #17 0x00005572523b4771 in init_server_components () at /data/src/10.5/sql/mysqld.cc:5016
      #18 0x00005572523b59be in mysqld_main (argc=18, argv=0x557255f887b8) at /data/src/10.5/sql/mysqld.cc:5556
      #19 0x00005572523aa280 in main (argc=17, argv=0x7ffc62b99fb8) at /data/src/10.5/sql/main.cc:25
      

      To reproduce:

      • bootstrap a previous version (e.g. current 10.4) with

        --file-key-management --file-key-management-filename=`pwd`/mysql-test/std_data/keys.txt --plugin-load-add=file_key_management.so --innodb-encrypt-tables --innodb-encrypt-log --innodb-encryption-threads=4
        

      • (optionally) start the old server and shut it down normally;
      • start 10.5 on the datadir with the same options.

      An example of the datadir created with 10.4 1ad8693a is attached.

      Non-debug build doesn't crash.

      Attachments

        Issue Links

          Activity

            People

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