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

Assertion `trx->lock.n_active_thrs == 1' on TRT read

    XMLWordPrintable

    Details

      Description

      Note: Even though the test case appears to be non-concurrent, in some cases it doesn't fail – maybe due to an internal race condition, or non-deterministic behavior of some sort. If it doesn't fail for you, just re-run it.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, t TIME, KEY (i)) ENGINE=InnoDB WITH SYSTEM VERSIONING;
       
      INSERT INTO t1 VALUES (1,10,'15:01:53'),(2,20,'00:00:00');
      DELETE FROM t1;
       
      SELECT * FROM t1 WHERE t = '00:00:00' AND i > 0 AND sys_trx_end <> '2012-12-12 00:00:00';
       
      # Cleanup
      DROP TABLE t1;
      

      bb-10.3-temporal 79dd77e6aebc86

      mysqld: /data/src/bb-10.3-temporal/storage/innobase/que/que0que.cc:865: void que_thr_stop_for_mysql_no_error(que_thr_t*, trx_t*): Assertion `trx->lock.n_active_thrs == 1' failed.
      171212 16:48:56 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f870bb08ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055f2abd58a32 in que_thr_stop_for_mysql_no_error (thr=0x55f2adea5e70, trx=0x7f8705a0d0d8) at /data/src/bb-10.3-temporal/storage/innobase/que/que0que.cc:865
      #9  0x000055f2abdf2e71 in row_search_mvcc (buf=0x55f2adea30b8 "\377\004\005", mode=PAGE_CUR_G, prebuilt=0x55f2adea5318, match_mode=0, direction=0) at /data/src/bb-10.3-temporal/storage/innobase/row/row0sel.cc:5714
      #10 0x000055f2abc570a6 in ha_innobase::index_read (this=0x55f2adea28a8, buf=0x55f2adea30b8 "\377\004\005", key_ptr=0x0, key_len=0, find_flag=HA_READ_AFTER_KEY) at /data/src/bb-10.3-temporal/storage/innobase/handler/ha_innodb.cc:9680
      #11 0x000055f2abc584c0 in ha_innobase::index_first (this=0x55f2adea28a8, buf=0x55f2adea30b8 "\377\004\005") at /data/src/bb-10.3-temporal/storage/innobase/handler/ha_innodb.cc:10118
      #12 0x000055f2abc58740 in ha_innobase::rnd_next (this=0x55f2adea28a8, buf=0x55f2adea30b8 "\377\004\005") at /data/src/bb-10.3-temporal/storage/innobase/handler/ha_innodb.cc:10214
      #13 0x000055f2ab920ac6 in handler::ha_rnd_next (this=0x55f2adea28a8, buf=0x55f2adea30b8 "\377\004\005") at /data/src/bb-10.3-temporal/sql/handler.cc:2626
      #14 0x000055f2aba9d0ce in rr_sequential (info=0x7f870410cae0) at /data/src/bb-10.3-temporal/sql/records.cc:485
      #15 0x000055f2ab5af389 in READ_RECORD::read_record (this=0x7f870410cae0) at /data/src/bb-10.3-temporal/sql/records.h:73
      #16 0x000055f2ab75b27a in TR_table::query (this=0x7f870410cbf0, trx_id=1287) at /data/src/bb-10.3-temporal/sql/table.cc:8658
      #17 0x000055f2ab8e49ac in Field_vers_trx_id::get_date (this=0x7f86b400e600, ltime=0x7f870410d350, fuzzydate=33554433, trx_id=1287) at /data/src/bb-10.3-temporal/sql/field.cc:2016
      #18 0x000055f2ab90b61e in Field_vers_trx_id::get_date (this=0x7f86b400e600, ltime=0x7f870410d350, fuzzydate=33554433) at /data/src/bb-10.3-temporal/sql/field.h:2204
      #19 0x000055f2ab93bc60 in Item_field::get_date (this=0x7f86b4015c98, ltime=0x7f870410d350, fuzzydate=33554433) at /data/src/bb-10.3-temporal/sql/item.cc:3380
      #20 0x000055f2ab932362 in Item::get_date_with_conversion (this=0x7f86b4015c98, ltime=0x7f870410d350, fuzzydate=33554433) at /data/src/bb-10.3-temporal/sql/item.cc:149
      #21 0x000055f2ab562321 in Item::val_datetime_packed (this=0x7f86b4015c98) at /data/src/bb-10.3-temporal/sql/item.h:1415
      #22 0x000055f2ab95caeb in Arg_comparator::compare_datetime (this=0x7f86b4015f40) at /data/src/bb-10.3-temporal/sql/item_cmpfunc.cc:795
      #23 0x000055f2ab9704ea in Arg_comparator::compare (this=0x7f86b4015f40) at /data/src/bb-10.3-temporal/sql/item_cmpfunc.h:102
      #24 0x000055f2ab95fbbd in Item_func_ne::val_int (this=0x7f86b4015e80) at /data/src/bb-10.3-temporal/sql/item_cmpfunc.cc:1773
      #25 0x000055f2ab81e10f in Type_handler_int_result::Item_val_bool (this=0x55f2acdc9920 <type_handler_long>, item=0x7f86b4015e80) at /data/src/bb-10.3-temporal/sql/sql_type.cc:3199
      #26 0x000055f2ab561e92 in Item::val_bool (this=0x7f86b4015e80) at /data/src/bb-10.3-temporal/sql/item.h:1122
      #27 0x000055f2ab969cb2 in Item_cond_and::val_int (this=0x7f86b4019b60) at /data/src/bb-10.3-temporal/sql/item_cmpfunc.cc:5001
      #28 0x000055f2ab92888f in handler_index_cond_check (h_arg=0x7f86b409c898) at /data/src/bb-10.3-temporal/sql/handler.cc:5598
      #29 0x000055f2abc6bbce in innobase_index_cond (file=0x7f86b409c898) at /data/src/bb-10.3-temporal/storage/innobase/handler/ha_innodb.cc:21465
      #30 0x000055f2abdee945 in row_search_idx_cond_check (mysql_rec=0x7f86b4072528 "\375\001", prebuilt=0x7f86b406c9b8, rec=0x7f87056f80aa "\200", offsets=0x7f870410dda0) at /data/src/bb-10.3-temporal/storage/innobase/row/row0sel.cc:4010
      #31 0x000055f2abdf1ce8 in row_search_mvcc (buf=0x7f86b4072528 "\375\001", mode=PAGE_CUR_G, prebuilt=0x7f86b406c9b8, match_mode=0, direction=0) at /data/src/bb-10.3-temporal/storage/innobase/row/row0sel.cc:5205
      #32 0x000055f2abc570a6 in ha_innobase::index_read (this=0x7f86b409c898, buf=0x7f86b4072528 "\375\001", key_ptr=0x7f86b4070a78 "", key_len=5, find_flag=HA_READ_AFTER_KEY) at /data/src/bb-10.3-temporal/storage/innobase/handler/ha_innodb.cc:9680
      #33 0x000055f2ab92e222 in handler::index_read_map (this=0x7f86b409c898, buf=0x7f86b4072528 "\375\001", key=0x7f86b4070a78 "", keypart_map=1, find_flag=HA_READ_AFTER_KEY) at /data/src/bb-10.3-temporal/sql/handler.h:3386
      #34 0x000055f2ab9210c6 in handler::ha_index_read_map (this=0x7f86b409c898, buf=0x7f86b4072528 "\375\001", key=0x7f86b4070a78 "", keypart_map=1, find_flag=HA_READ_AFTER_KEY) at /data/src/bb-10.3-temporal/sql/handler.cc:2676
      #35 0x000055f2ab928463 in handler::read_range_first (this=0x7f86b409c898, start_key=0x7f86b409c980, end_key=0x0, eq_range_arg=false, sorted=true) at /data/src/bb-10.3-temporal/sql/handler.cc:5456
      #36 0x000055f2ab7eb44c in handler::multi_range_read_next (this=0x7f86b409c898, range_info=0x7f870410e910) at /data/src/bb-10.3-temporal/sql/multi_range_read.cc:291
      #37 0x000055f2ab7eb62e in Mrr_simple_index_reader::get_next (this=0x7f86b409ce20, range_info=0x7f870410e910) at /data/src/bb-10.3-temporal/sql/multi_range_read.cc:323
      #38 0x000055f2ab7ee28a in DsMrr_impl::dsmrr_next (this=0x7f86b409cce0, range_info=0x7f870410e910) at /data/src/bb-10.3-temporal/sql/multi_range_read.cc:1399
      #39 0x000055f2abc6ba5a in ha_innobase::multi_range_read_next (this=0x7f86b409c898, range_info=0x7f870410e910) at /data/src/bb-10.3-temporal/storage/innobase/handler/ha_innodb.cc:21404
      #40 0x000055f2aba8b3c6 in QUICK_RANGE_SELECT::get_next (this=0x7f86b409e5b0) at /data/src/bb-10.3-temporal/sql/opt_range.cc:11444
      #41 0x000055f2aba9ceb4 in rr_quick (info=0x7f86b4018d20) at /data/src/bb-10.3-temporal/sql/records.cc:366
      #42 0x000055f2ab5af389 in READ_RECORD::read_record (this=0x7f86b4018d20) at /data/src/bb-10.3-temporal/sql/records.h:73
      #43 0x000055f2ab6b32d9 in join_init_read_record (tab=0x7f86b4018c58) at /data/src/bb-10.3-temporal/sql/sql_select.cc:20347
      #44 0x000055f2ab6b109a in sub_select (join=0x7f86b40160c8, join_tab=0x7f86b4018c58, end_of_records=false) at /data/src/bb-10.3-temporal/sql/sql_select.cc:19421
      #45 0x000055f2ab6b0665 in do_select (join=0x7f86b40160c8, procedure=0x0) at /data/src/bb-10.3-temporal/sql/sql_select.cc:18964
      #46 0x000055f2ab688cde in JOIN::exec_inner (this=0x7f86b40160c8) at /data/src/bb-10.3-temporal/sql/sql_select.cc:3998
      #47 0x000055f2ab687f66 in JOIN::exec (this=0x7f86b40160c8) at /data/src/bb-10.3-temporal/sql/sql_select.cc:3783
      #48 0x000055f2ab689363 in mysql_select (thd=0x7f86b4000b00, tables=0x7f86b4014ed0, wild_num=1, fields=..., conds=0x7f86b4015b58, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f86b40160a8, unit=0x7f86b4004870, select_lex=0x7f86b4004fd0) at /data/src/bb-10.3-temporal/sql/sql_select.cc:4193
      #49 0x000055f2ab67b59e in handle_select (thd=0x7f86b4000b00, lex=0x7f86b40047a8, result=0x7f86b40160a8, setup_tables_done_option=0) at /data/src/bb-10.3-temporal/sql/sql_select.cc:380
      #50 0x000055f2ab646798 in execute_sqlcom_select (thd=0x7f86b4000b00, all_tables=0x7f86b4014ed0) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:6529
      #51 0x000055f2ab63cdae in mysql_execute_command (thd=0x7f86b4000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:3754
      #52 0x000055f2ab64a0ec in mysql_parse (thd=0x7f86b4000b00, rawbuf=0x7f86b4014c58 "SELECT * FROM t1 WHERE t = '00:00:00' AND i > 0 AND sys_trx_end <> '2012-12-12 00:00:00'", length=88, parser_state=0x7f87041105f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7985
      #53 0x000055f2ab63785a in dispatch_command (command=COM_QUERY, thd=0x7f86b4000b00, packet=0x7f86b415ffb1 "", packet_length=88, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1829
      #54 0x000055f2ab63627b in do_command (thd=0x7f86b4000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1371
      #55 0x000055f2ab79c96e in do_handle_one_connection (connect=0x55f2ade84a20) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1420
      #56 0x000055f2ab79c6fb in handle_one_connection (arg=0x55f2ade84a20) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1326
      #57 0x000055f2abc32094 in pfs_spawn_thread (arg=0x55f2adea9190) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
      #58 0x00007f870d7df494 in start_thread (arg=0x7f8704111700) at pthread_create.c:333
      #59 0x00007f870bbc593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

        Attachments

          Activity

            People

            Assignee:
            midenok Aleksey Midenkov
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.