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

InnoDB: Failing assertion: (block)->index || my_atomic_loadlint(&(block)->n_pointers) == 0 in btr0sea.cc

    XMLWordPrintable

    Details

      Description

      Assert hit during RQG testing
      2020-10-20 05:57:31 0x71105010a300  InnoDB: Assertion failure in file /home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/btr/btr0sea.cc line 668
      InnoDB: Failing assertion: (block)->index || my_atomic_loadlint(&(block)->n_pointers) == 0
      ...
      # 2020-10-20T06:07:10 [2145719] | Query (0x62b00017a228): SELECT `col_char_255_utf8_key` FROM `table100_innodb_int_autoinc` /* E_R Thread6 QNO 770 CON_ID 25 */
      Connection ID (thread ID): 25
      Status: KILL_TIMEOUT
       
      (rr) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000055ecc294b859 in __GI_abort () at abort.c:79
      #2  0x000055ecc5039feb in ut_dbg_assertion_failed (expr=expr@entry=0x55ecc60be200 "(block)->index || my_atomic_loadlint(&(block)->n_pointers) == 0", 
          file=file@entry=0x55ecc60bc3c0 "/home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/btr/btr0sea.cc", line=line@entry=668) at /home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/ut/ut0dbg.cc:60
      #3  0x000055ecc5107e0a in btr_search_update_hash_ref (info=info@entry=0x61a0000441b0, block=block@entry=0x55354aa45300, cursor=cursor@entry=0x6230002b0068) at /home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/btr/btr0sea.cc:668
      #4  0x000055ecc51171ce in btr_search_info_update_slow (info=info@entry=0x61a0000441b0, cursor=cursor@entry=0x6230002b0068) at /home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/btr/btr0sea.cc:1548
      #5  0x000055ecc50d1f94 in btr_search_info_update (cursor=<optimized out>, index=<optimized out>) at /home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/include/btr0sea.ic:84
      #6  btr_cur_search_to_nth_level_func (index=index@entry=0x616000067308, level=level@entry=0, tuple=<optimized out>, mode=mode@entry=PAGE_CUR_LE, latch_mode=<optimized out>, latch_mode@entry=1, cursor=cursor@entry=0x6230002b0068, 
          ahi_latch=<optimized out>, file=<optimized out>, line=<optimized out>, mtr=<optimized out>, autoinc=<optimized out>) at /home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/btr/btr0cur.cc:2364
      #7  0x000055ecc4e57017 in btr_pcur_open_with_no_init_func (mtr=0x7110501049e0, line=3308, file=0x55ecc6005ca0 "/home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/row/row0sel.cc", ahi_latch=0x0, cursor=0x6230002b0068, latch_mode=1, 
          mode=PAGE_CUR_LE, tuple=<optimized out>, index=0x616000067308) at /home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/include/btr0pcur.ic:504
      #8  Row_sel_get_clust_rec_for_mysql::operator() (this=<optimized out>, prebuilt=prebuilt@entry=0x6230002afd88, sec_index=sec_index@entry=0x61600006fa08, rec=<optimized out>, thr=thr@entry=0x6230002b0840, out_rec=<optimized out>, 
          offsets=<optimized out>, offset_heap=<optimized out>, vrow=<optimized out>, mtr=<optimized out>) at /home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/row/row0sel.cc:3308
      #9  0x000055ecc4e682c2 in row_search_mvcc (buf=buf@entry=0x6260000ed128 "\221$\b", mode=<optimized out>, mode@entry=PAGE_CUR_UNSUPP, prebuilt=0x6230002afd88, match_mode=match_mode@entry=0, direction=direction@entry=1)
          at /home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/row/row0sel.cc:5335
      #10 0x000055ecc49ebd25 in ha_innobase::general_fetch (this=0x61c0000d00a8, buf=<optimized out>, direction=direction@entry=1, match_mode=match_mode@entry=0) at /home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/handler/ha_innodb.cc:9499
      #11 0x000055ecc49ec789 in ha_innobase::index_next (this=<optimized out>, buf=<optimized out>) at /home/mleich/Server/bb-10.3-MDEV-23072/storage/innobase/handler/ha_innodb.cc:9567
      #12 0x000055ecc42d7c07 in handler::ha_index_next (this=0x61c0000d00a8, buf=<optimized out>) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/handler.cc:2954
      #13 0x000055ecc3c24f74 in join_read_next (info=0x62b00017bff0) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/records.h:71
      #14 0x000055ecc3bed6b7 in READ_RECORD::read_record (this=0x62b00017bff0) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/records.h:70
      #15 sub_select (join=0x62b00017ad88, join_tab=0x62b00017bf28, end_of_records=<optimized out>) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_select.cc:19733
      #16 0x000055ecc3c757f6 in do_select (join=join@entry=0x62b00017ad88, procedure=<optimized out>) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_select.cc:19254
      #17 0x000055ecc3c96597 in JOIN::exec_inner (this=this@entry=0x62b00017ad88) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_select.cc:4116
      #18 0x000055ecc3c96807 in JOIN::exec (this=this@entry=0x62b00017ad88) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_select.cc:3910
      #19 0x000055ecc3c91ed1 in mysql_select (thd=thd@entry=0x62a00023a208, tables=<optimized out>, wild_num=<optimized out>, fields=..., conds=<optimized out>, og_num=<optimized out>, order=<optimized out>, group=<optimized out>, having=<optimized out>, 
          proc_param=<optimized out>, select_options=<optimized out>, result=<optimized out>, unit=<optimized out>, select_lex=<optimized out>) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_select.cc:4315
      #20 0x000055ecc3c9290e in handle_select (thd=thd@entry=0x62a00023a208, lex=lex@entry=0x62a00023e010, result=result@entry=0x62b00017ad58, setup_tables_done_option=setup_tables_done_option@entry=0)
          at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_select.cc:370
      #21 0x000055ecc3ae1a62 in execute_sqlcom_select (thd=thd@entry=0x62a00023a208, all_tables=<optimized out>) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_parse.cc:6286
      #22 0x000055ecc3b0b90e in mysql_execute_command (thd=thd@entry=0x62a00023a208) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_parse.cc:3812
      #23 0x000055ecc3b1f17f in mysql_parse (thd=thd@entry=0x62a00023a208, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x711050107f40, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)
          at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_parse.cc:7810
      #24 0x000055ecc3b268bf in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62a00023a208, packet=packet@entry=0x6290008de209 "", packet_length=packet_length@entry=102, is_com_multi=is_com_multi@entry=false, 
          is_next_command=is_next_command@entry=false) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_class.h:1134
      #25 0x000055ecc3b301d6 in do_command (thd=0x62a00023a208) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_parse.cc:1393
      #26 0x000055ecc3ef99d0 in do_handle_one_connection (connect=connect@entry=0x6080000011a8) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_connect.cc:1403
      #27 0x000055ecc3efa0de in handle_one_connection (arg=0x6080000011a8) at /home/mleich/Server/bb-10.3-MDEV-23072/sql/sql_connect.cc:1308
      #28 0x000055ecc820f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #29 0x000055ecc2a48103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      (rr)
       
      The assert looks like the one in https://jira.mariadb.org/browse/MDEV-20824.
      But here its in btr0sea.cc line 668 + SQL is a SELECT ...
      and there its in buf0buf.cc line 3275 + SQL is a ALTER TABLE t4 DROP COLUMN ...
       
      origin/bb-10.3-MDEV-23072 36f5ea8b1092099e7ad96251bdefd43142bbe6c3 2020-10-19T22:18:29+05:30 compiled with debug+ASAN+Og
       
      RQG
      ====
      git clone https://github.com/mleich1/rqg --branch experimental RQG
       
      perl rqg.pl \
      --grammar=conf/engines/many_indexes.yy \
      --gendata=conf/engines/many_indexes.zz \
      --mysqld=--innodb_use_native_aio=1 \
      --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 \
      --validators=None \
      --mysqld=--log_output=none \
      --mysqld=--log-bin \
      --mysqld=--log_bin_trust_function_creators=1 \
      --mysqld=--loose-debug_assert_on_not_freed_memory=0 \
      --engine=InnoDB \
      --restart_timeout=120 \
      --duration=400 \
      --mysqld=--loose-innodb_fatal_semaphore_wait_threshold=400 \
      --mysqld=--innodb_stats_persistent=off \
      --mysqld=--loose-max-statement-time=30 \
      --threads=9 \
      --mysqld=--innodb_page_size=8K \
      --mysqld=--innodb-buffer-pool-size=256M \
      --duration=400 \
      --no_mask \
      --workdir=<local settings> \
      --vardir=<local settings> \
      --mtr-build-thread=<local settings> \
      --basedir1=<local settings> \
      --script_debug=_nix_ \
      --rr=Server \
      --rr_options=--chaos
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              mleich Matthias Leich
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration