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

Race condition for btr_search_drop_page_hash_index() in buf_page_create()

    XMLWordPrintable

Details

    Description

      Assert hit during RQG testing
      [rr 105081 1367598]mysqld: storage/innobase/btr/btr0sea.cc:1109: void btr_search_drop_page_hash_index(buf_block_t*): Assertion `block->page.buf_fix_count == 0 || buf_block_get_state(block) == BUF_BLOCK_REMOVE_HASH || rw_lock_own_flagged(&block->lock, RW_LOCK_FLAG_X | RW_LOCK_FLAG_S | RW_LOCK_FLAG_SX)' failed.
      [rr 105081 1367618]200717 19:06:53 [rr 105081 1367621][ERROR] mysqld got signal 6 ;
      ....
      Query (0x641740011500): ALTER TABLE `t6` ENCRYPTION_KEY_ID=33
      Status: KILL_TIMEOUT
       
      (rr) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #1  0x00002fd775b878b1 in __GI_abort () at abort.c:79
      #2  0x00002fd775b7742a in __assert_fail_base (fmt=0x2fd775cfea38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
          assertion=assertion@entry=0x55b4b39672c8 "block->page.buf_fix_count == 0 || buf_block_get_state(block) == BUF_BLOCK_REMOVE_HASH || rw_lock_own_flagged(&block->lock, RW_LOCK_FLAG_X | RW_LOCK_FLAG_S | RW_LOCK_FLAG_SX)", 
          file=file@entry=0x55b4b3966e08 "/home/mleich/bb-10.4-thiru/storage/innobase/btr/btr0sea.cc", line=line@entry=1109, 
          function=function@entry=0x55b4b3968140 <btr_search_drop_page_hash_index(buf_block_t*)::__PRETTY_FUNCTION__> "void btr_search_drop_page_hash_index(buf_block_t*)") at assert.c:92
      #3  0x00002fd775b774a2 in __GI___assert_fail (
          assertion=assertion@entry=0x55b4b39672c8 "block->page.buf_fix_count == 0 || buf_block_get_state(block) == BUF_BLOCK_REMOVE_HASH || rw_lock_own_flagged(&block->lock, RW_LOCK_FLAG_X | RW_LOCK_FLAG_S | RW_LOCK_FLAG_SX)", 
          file=file@entry=0x55b4b3966e08 "/home/mleich/bb-10.4-thiru/storage/innobase/btr/btr0sea.cc", line=line@entry=1109, 
          function=function@entry=0x55b4b3968140 <btr_search_drop_page_hash_index(buf_block_t*)::__PRETTY_FUNCTION__> "void btr_search_drop_page_hash_index(buf_block_t*)") at assert.c:101
      #4  0x000055b4b3255cb0 in btr_search_drop_page_hash_index (block=block@entry=0x2fd774fcbfb0) at /home/mleich/bb-10.4-thiru/storage/innobase/btr/btr0sea.cc:1109
      #5  0x000055b4b327c39e in buf_page_create (page_id=..., zip_size=zip_size@entry=0, mtr=mtr@entry=0x64174005c640) at /home/mleich/bb-10.4-thiru/storage/innobase/buf/buf0buf.cc:5620
      #6  0x000055b4b334adff in fsp_page_create (space=space@entry=0x641740020740, offset=<optimized out>, rw_latch=rw_latch@entry=RW_X_LATCH, mtr=mtr@entry=0x64001fe9950, init_mtr=init_mtr@entry=0x64174005c640)
          at /home/mleich/bb-10.4-thiru/storage/innobase/fsp/fsp0fsp.cc:1160
      #7  0x000055b4b335039a in fsp_alloc_free_page (space=space@entry=0x641740020740, hint=<optimized out>, hint@entry=0, rw_latch=rw_latch@entry=RW_X_LATCH, mtr=mtr@entry=0x64001fe9950, init_mtr=init_mtr@entry=0x64174005c640)
          at /home/mleich/bb-10.4-thiru/storage/innobase/fsp/fsp0fsp.cc:1301
      #8  0x000055b4b3351b64 in fseg_alloc_free_page_low (space=space@entry=0x641740020740, seg_inode=seg_inode@entry=0x2fd7754ea6f2 "", hint=hint@entry=0, direction=direction@entry=111 'o', rw_latch=rw_latch@entry=RW_X_LATCH, mtr=mtr@entry=0x64001fe9950, 
          init_mtr=0x64174005c640, has_done_reservation=1) at /home/mleich/bb-10.4-thiru/storage/innobase/fsp/fsp0fsp.cc:2335
      #9  0x000055b4b3352c5d in fseg_alloc_free_page_general (seg_header=<optimized out>, hint=hint@entry=0, direction=direction@entry=111 'o', has_done_reservation=has_done_reservation@entry=1, mtr=mtr@entry=0x64001fe9950, 
          init_mtr=init_mtr@entry=0x64174005c640) at /home/mleich/bb-10.4-thiru/storage/innobase/fsp/fsp0fsp.cc:2468
      #10 0x000055b4b31f7629 in btr_page_alloc_low (index=<optimized out>, hint_page_no=hint_page_no@entry=0, file_direction=file_direction@entry=111 'o', level=0, mtr=mtr@entry=0x64001fe9950, init_mtr=init_mtr@entry=0x64174005c640)
          at /home/mleich/bb-10.4-thiru/storage/innobase/btr/btr0btr.cc:539
      #11 0x000055b4b31f7647 in btr_page_alloc (index=<optimized out>, hint_page_no=hint_page_no@entry=0, file_direction=file_direction@entry=111 'o', level=<optimized out>, mtr=mtr@entry=0x64001fe9950, init_mtr=init_mtr@entry=0x64174005c640)
          at /home/mleich/bb-10.4-thiru/storage/innobase/btr/btr0btr.cc:589
      #12 0x000055b4b320e57d in PageBulk::init (this=this@entry=0x64174005c630) at /home/mleich/bb-10.4-thiru/storage/innobase/btr/btr0bulk.cc:85
      #13 0x000055b4b320f905 in BtrBulk::insert (this=this@entry=0x64001fea730, tuple=tuple@entry=0x64174050dde0, level=level@entry=0) at /home/mleich/bb-10.4-thiru/storage/innobase/btr/btr0bulk.cc:931
      #14 0x000055b4b30dcafa in BtrBulk::insert (tuple=0x64174050dde0, this=0x64001fea730) at /home/mleich/bb-10.4-thiru/storage/innobase/include/btr0bulk.h:313
      #15 row_merge_insert_index_tuples (index=<optimized out>, old_table=old_table@entry=0x7fa48003c070, fd=..., block=block@entry=0x0, row_buf=row_buf@entry=0x3e2440cf4d0, btr_bulk=btr_bulk@entry=0x64001fea730, table_total_rows=<optimized out>, 
          pct_progress=pct_progress@entry=33.333333333333336, pct_cost=pct_cost@entry=33.333333333333336, crypt_block=<optimized out>, space=<optimized out>, stage=<optimized out>) at /home/mleich/bb-10.4-thiru/storage/innobase/row/row0merge.cc:3667
      #16 0x000055b4b30e4e06 in row_merge_read_clustered_index (trx=trx@entry=0x2fd775751cd0, table=table@entry=0x64001febd10, old_table=old_table@entry=0x7fa48003c070, new_table=new_table@entry=0x641740045d10, online=online@entry=true, 
          index=index@entry=0x641740026f18, fts_sort_idx=<optimized out>, psort_info=<optimized out>, files=<optimized out>, key_numbers=<optimized out>, n_index=<optimized out>, defaults=<optimized out>, add_v=<optimized out>, col_map=<optimized out>, 
          add_autoinc=<optimized out>, sequence=..., block=<optimized out>, skip_pk_sort=<optimized out>, tmpfd=<optimized out>, stage=<optimized out>, pct_cost=pct_cost@entry=33.333333333333336, crypt_block=<optimized out>, eval_table=<optimized out>, 
          allow_not_null=<optimized out>) at /home/mleich/bb-10.4-thiru/storage/innobase/row/row0merge.cc:2630
      #17 0x000055b4b30e5f0a in row_merge_build_indexes (trx=<optimized out>, old_table=<optimized out>, new_table=0x641740045d10, online=<optimized out>, indexes=<optimized out>, key_numbers=<optimized out>, n_indexes=<optimized out>, table=<optimized out>, 
          defaults=<optimized out>, col_map=<optimized out>, add_autoinc=<optimized out>, sequence=..., skip_pk_sort=<optimized out>, stage=<optimized out>, add_v=<optimized out>, eval_table=<optimized out>, allow_not_null=<optimized out>)
          at /home/mleich/bb-10.4-thiru/storage/innobase/row/row0merge.cc:4708
      #18 0x000055b4b2f8509e in ha_innobase::inplace_alter_table (this=0x64173c0a5bb0, altered_table=0x64001febd10, ha_alter_info=0x64001febc70) at /home/mleich/bb-10.4-thiru/storage/innobase/handler/handler0alter.cc:8470
      #19 0x000055b4b2b175b2 in handler::ha_inplace_alter_table (ha_alter_info=0x64001febc70, altered_table=0x64001febd10, this=<optimized out>) at /home/mleich/bb-10.4-thiru/sql/handler.h:4366
      #20 mysql_inplace_alter_table (thd=thd@entry=0x641740000ce8, table_list=0x641740011650, table=0x64173c0aa238, altered_table=altered_table@entry=0x64001febd10, ha_alter_info=ha_alter_info@entry=0x64001febc70, 
          inplace_supported=inplace_supported@entry=HA_ALTER_INPLACE_COPY_NO_LOCK, target_mdl_request=0x64001fecae0, alter_ctx=0x64001fed620) at /home/mleich/bb-10.4-thiru/sql/sql_table.cc:7746
      #21 0x000055b4b2b23313 in mysql_alter_table (thd=thd@entry=0x641740000ce8, new_db=new_db@entry=0x6417400054a8, new_name=new_name@entry=0x6417400058b0, create_info=create_info@entry=0x64001fee210, table_list=<optimized out>, 
          table_list@entry=0x641740011650, alter_info=alter_info@entry=0x64001fee150, order_num=0, order=0x0, ignore=false) at /home/mleich/bb-10.4-thiru/sql/sql_table.cc:10156
      #22 0x000055b4b2ba0d7f in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x641740000ce8) at /home/mleich/bb-10.4-thiru/sql/sql_alter.cc:514
      #23 0x000055b4b2a5e315 in mysql_execute_command (thd=thd@entry=0x641740000ce8) at /home/mleich/bb-10.4-thiru/sql/sql_parse.cc:6099
      #24 0x000055b4b2a602d9 in mysql_parse (thd=thd@entry=0x641740000ce8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x64001fef530, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)
          at /home/mleich/bb-10.4-thiru/sql/sql_parse.cc:7899
      #25 0x000055b4b2a62c75 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x641740000ce8, packet=packet@entry=0x6417400081a9 "ALTER TABLE `t6` ENCRYPTION_KEY_ID=33 /* E_R Thread7 QNO 1595 CON_ID 23 */ ", 
          packet_length=packet_length@entry=75, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /home/mleich/bb-10.4-thiru/sql/sql_parse.cc:1833
      #26 0x000055b4b2a67681 in do_command (thd=0x641740000ce8) at /home/mleich/bb-10.4-thiru/sql/sql_parse.cc:1351
      #27 0x000055b4b2b99aa2 in do_handle_one_connection (connect=connect@entry=0x55b4b69b9ef8) at /home/mleich/bb-10.4-thiru/sql/sql_connect.cc:1412
      #28 0x000055b4b2b99bc7 in handle_one_connection (arg=0x55b4b69b9ef8) at /home/mleich/bb-10.4-thiru/sql/sql_connect.cc:1316
      #29 0x00006bca0b6bc6db in start_thread (arg=0x64001ff0700) at pthread_create.c:463
      #30 0x00002fd775c68a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      (rr)
       
       
      origin/bb-10.4-thiru a13662dac1df224c607983815b2fe85ee72749c2 2020-07-17T22:49:03+05:30
       
      RQG
      git clone https://github.com/mleich1/rqg --branch experimental RQG
      origin/experimental f3d72ce51b150ee1f52a93d18f2024af293d925e 2020-07-13T20:46:53+02:00
       
      perl rqg.pl \                        
      --grammar=conf/mariadb/innodb_compression_encryption.yy \
      --gendata=conf/mariadb/innodb_compression_encryption.zz \
      --mysqld=--plugin-load-add=file_key_management.so \
      --mysqld=--loose-file-key-management-filename=/home/mleich/RQG_mleich/conf/mariadb/encryption_keys.txt \
      --mysqld=--innodb_use_native_aio=0 \
      --mysqld=--innodb_lock_schedule_algorithm=fcfs \
      --mysqld=--loose-idle_write_transaction_timeout=0 \
      --mysqld=--loose-idle_transaction_timeout=0 \
      --mysqld=--loose-idle_readonly_transaction_timeout=0 \
      --mysqld=--connect_timeout=60 \
      --mysqld=--interactive_timeout=28800 \
      --mysqld=--slave_net_timeout=60 \
      --mysqld=--net_read_timeout=30 \
      --mysqld=--net_write_timeout=60 \
      --mysqld=--loose-table_lock_wait_timeout=50 \
      --mysqld=--wait_timeout=28800 \
      --mysqld=--lock-wait-timeout=86400 \
      --mysqld=--innodb-lock-wait-timeout=50 \
      --no-mask \
      --queries=10000000 \
      --seed=random \
      --reporters=Backtrace \
      --reporters=ErrorLog \
      --reporters=Deadlock1 \
      --reporters=CrashRecovery1 \
      --validators=None \
      --mysqld=--log_output=none \
      --mysqld=--log-bin \
      --mysqld=--log_bin_trust_function_creators=1 \
      --mysqld=--loose-max-statement-time=30 \
      --mysqld=--loose-debug_assert_on_not_freed_memory=0 \
      --engine=InnoDB \
      --restart_timeout=120 \
      --duration=300 \
      --mysqld=--loose-innodb_fatal_semaphore_wait_threshold=300 \
      --threads=9 \
      --mysqld=--innodb_page_size=4K \
      --mysqld=--innodb-buffer-pool-size=8M \
      --duration=300 \
      --no_mask \
      --workdir=<local settings> \
      --vardir=<local settings> \
      --mtr-build-thread=<local settings> \
      --basedir1=<local settings> \
      --basedir2=<local settings> \
      --script_debug=_nix_ \
      --rr=Server \
      --rr_options=--chaos
      

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              mleich Matthias Leich
              Votes:
              0 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.