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

Assertion `0' failed in ReadView::check_trx_id_sanity upon crash-upgrade from 10.2.6

    XMLWordPrintable

Details

    Description

      10.3 14a58cea

      2019-02-02 23:35:15 9 [Warning] InnoDB: A transaction id in a record of table `test`.`t003` is newer than the system-wide maximum.
      mysqld: /data/src/10.3/storage/innobase/trx/trx0sys.cc:62: static void ReadView::check_trx_id_sanity(trx_id_t, const table_name_t&): Assertion `0' failed.
      190202 23:35:15 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f83396d5ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055f245849f66 in ReadView::check_trx_id_sanity (id=83180, name=...) at /data/src/10.3/storage/innobase/trx/trx0sys.cc:62
      #9  0x000055f2456c913c in ReadView::changes_visible (this=0x7f8338037258, id=83180, name=...) at /data/src/10.3/storage/innobase/include/read0types.h:212
      #10 0x000055f2456b42f8 in lock_clust_rec_cons_read_sees (rec=0x7f83169646a8 "\200", index=0x7f829002da08, offsets=0x7f8321ceae00, view=0x7f8338037258) at /data/src/10.3/storage/innobase/lock/lock0lock.cc:403
      #11 0x000055f2457ce3ce in row_search_mvcc (buf=0x7f82900268d0 "", mode=PAGE_CUR_G, prebuilt=0x7f82900244c8, match_mode=0, direction=1) at /data/src/10.3/storage/innobase/row/row0sel.cc:5124
      #12 0x000055f24578cc49 in row_search_for_mysql (buf=0x7f82900268d0 "", mode=PAGE_CUR_G, prebuilt=0x7f82900244c8, match_mode=0, direction=1) at /data/src/10.3/storage/innobase/include/row0sel.ic:137
      #13 0x000055f24579871a in row_scan_index_for_mysql (prebuilt=0x7f82900244c8, index=0x7f829002da08, n_rows=0x7f8321cebc00) at /data/src/10.3/storage/innobase/row/row0mysql.cc:4835
      #14 0x000055f2456458b5 in ha_innobase::check (this=0x7f8290021bc8, thd=0x7f8290000b00, check_opt=0x7f8290005928) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:14542
      #15 0x000055f24531dbdf in handler::ha_check (this=0x7f8290021bc8, thd=0x7f8290000b00, check_opt=0x7f8290005928) at /data/src/10.3/sql/handler.cc:4199
      #16 0x000055f24518deff in mysql_admin_table(THD *, TABLE_LIST *, HA_CHECK_OPT *, const char *, thr_lock_type, bool, bool, uint, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *), struct {...}, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *)) (thd=0x7f8290000b00, tables=0x7f8290013a20, check_opt=0x7f8290005928, operator_name=0x55f245bc4914 "check", lock_type=TL_READ_NO_INSERT, org_open_for_modify=false, repair_table_use_frm=false, extra_open_options=32, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x55f24531da5c <handler::ha_check(THD*, st_ha_check_opt*)>, view_operator_func=0x55f245122e86 <view_check(THD*, TABLE_LIST*, st_ha_check_opt*)>) at /data/src/10.3/sql/sql_admin.cc:803
      #17 0x000055f2451900ba in Sql_cmd_check_table::execute (this=0x7f8290014068, thd=0x7f8290000b00) at /data/src/10.3/sql/sql_admin.cc:1347
      #18 0x000055f2450246aa in mysql_execute_command (thd=0x7f8290000b00) at /data/src/10.3/sql/sql_parse.cc:6285
      #19 0x000055f24502977b in mysql_parse (thd=0x7f8290000b00, rawbuf=0x7f8290013948 "CHECK TABLE test.t003", length=21, parser_state=0x7f8321ced640, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8092
      #20 0x000055f24501692f in dispatch_command (command=COM_QUERY, thd=0x7f8290000b00, packet=0x7f829001ba31 "", packet_length=21, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1851
      #21 0x000055f245015353 in do_command (thd=0x7f8290000b00) at /data/src/10.3/sql/sql_parse.cc:1396
      #22 0x000055f24517d47a in do_handle_one_connection (connect=0x55f248cabdc0) at /data/src/10.3/sql/sql_connect.cc:1402
      #23 0x000055f24517d1fe in handle_one_connection (arg=0x55f248cabdc0) at /data/src/10.3/sql/sql_connect.cc:1308
      #24 0x00007f833b3ac494 in start_thread (arg=0x7f8321cee700) at pthread_create.c:333
      #25 0x00007f833979293f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      The failure happened upon crash upgrade from 10.2.6 running concurrent DML workflow. The datadir stored after the intentional 10.2.6 crash before any attempt to start the server can be found here:
      ftp://perro.askmonty.org/public/jira/mdev18454-data.tar.gz

      To reproduce, unpack the datadir, start 10.3 or 10.4 debug server with

      --file-key-management --file-key-management-filename=/data/bld/keys.txt --plugin-load-add=file_key_management.so --innodb-encrypt-tables --innodb-encrypt-log --innodb-encryption-threads=4 --aria-encrypt-tables=1 --encrypt-tmp-disk-tables=1 --encrypt-binlog --innodb-page-size=8K --innodb-compression-algorithm=none --loose-innodb-file-format=Barracuda --loose-innodb-file-per-table=1 --loose-max-statement-time=20 --loose-lock-wait-timeout=20 --loose-innodb-lock-wait-timeout=10 --loose-innodb_log_compressed_pages=on
      

      (modify the path to the key file as needed), and run

      CHECK TABLE test.t003;
      

      If you use the interactive client to run the statement, start it with no-auto-rehash (-A)

      Reproducible on 10.3 and 10.4.
      Non-debug builds don't crash, but produce a bunch of errors:

      2019-02-02 23:30:36 10 [Warning] InnoDB: A transaction id in a record of table `test`.`t003` is newer than the system-wide maximum.
      2019-02-02 23:30:36 10 [Warning] InnoDB: A transaction id in a record of table `test`.`t003` is newer than the system-wide maximum.
      2019-02-02 23:30:36 10 [ERROR] InnoDB: PAGE_MAX_TRX_ID out of bounds: 83182, 83180
      2019-02-02 23:30:36 10 [ERROR] InnoDB: Apparent corruption in space 15 page 48 index `col_timestamp_key`
      2019-02-02 23:30:36 10 [ERROR] InnoDB: In page 48 of index `col_timestamp_key` of table `test`.`t003`
      2019-02-02 23:30:36 10 [ERROR] InnoDB: PAGE_MAX_TRX_ID out of bounds: 83182, 83180
      2019-02-02 23:30:36 10 [ERROR] InnoDB: Apparent corruption in space 15 page 37 index `col_int_not_null_key`
      2019-02-02 23:30:36 10 [ERROR] InnoDB: In page 37 of index `col_int_not_null_key` of table `test`.`t003`
      2019-02-02 23:30:36 10 [ERROR] InnoDB: PAGE_MAX_TRX_ID out of bounds: 83182, 83180
      2019-02-02 23:30:36 10 [ERROR] InnoDB: Apparent corruption in space 15 page 42 index `col_int_key`
      2019-02-02 23:30:36 10 [ERROR] InnoDB: In page 42 of index `col_int_key` of table `test`.`t003`
      2019-02-02 23:30:36 10 [ERROR] InnoDB: PAGE_MAX_TRX_ID out of bounds: 83182, 83180
      2019-02-02 23:30:36 10 [ERROR] InnoDB: Apparent corruption in space 15 page 46 index `col_timestamp_not_null_key`
      2019-02-02 23:30:36 10 [ERROR] InnoDB: In page 46 of index `col_timestamp_not_null_key` of table `test`.`t003`
      2019-02-02 23:30:36 10 [ERROR] InnoDB: PAGE_MAX_TRX_ID out of bounds: 83182, 83180
      2019-02-02 23:30:36 10 [ERROR] InnoDB: Apparent corruption in space 15 page 35 index `col_varchar_8_key`
      2019-02-02 23:30:36 10 [ERROR] InnoDB: In page 35 of index `col_varchar_8_key` of table `test`.`t003`
      2019-02-02 23:30:36 10 [ERROR] InnoDB: PAGE_MAX_TRX_ID out of bounds: 83182, 83180
      2019-02-02 23:30:36 10 [ERROR] InnoDB: Apparent corruption in space 15 page 34 index `col_varchar_8_not_null_key`
      2019-02-02 23:30:36 10 [ERROR] InnoDB: In page 34 of index `col_varchar_8_not_null_key` of table `test`.`t003`
      

      Doesn't seem to be reproducible on 10.2.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              4 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.