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

InnoDB: Failing assertion: prebuilt->sql_stat_start || trx->state == 1 on concurrent multi-table update

    XMLWordPrintable

Details

    • 5.5.44

    Description

      Stack trace from 5.5 commit cc84ac3be41d9d6ac480d55449d5bf4e324cca10

      InnoDB: Assertion failure in thread 140513694545664 in file row0sel.c line 3917
      InnoDB: Failing assertion: prebuilt->sql_stat_start || trx->state == 1
       
      # 2015-04-05T03:45:34 [2872] #3  <signal handler called>
      # 2015-04-05T03:45:34 [2872] #4  0x00007fcbe2cb7165 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
      # 2015-04-05T03:45:34 [2872] #5  0x00007fcbe2cba3e0 in *__GI_abort () at abort.c:92
      # 2015-04-05T03:45:34 [2872] #6  0x00000000009be1f2 in row_search_for_mysql (buf=0x7fcbba452578 "\377\377\217\217\217\217\217\217\217\217\217\217\217\217", mode=1, prebuilt=0x7fcbba548078, match_mode=0, direction=1) at 5.5/storage/xtradb/row/row0sel.c:3917
      # 2015-04-05T03:45:34 [2872] #7  0x0000000000977b63 in ha_innobase::general_fetch (this=0x7fcbba545078, buf=0x7fcbba452578 "\377\377\217\217\217\217\217\217\217\217\217\217\217\217", direction=1, match_mode=0) at 5.5/storage/xtradb/handler/ha_innodb.cc:7340
      # 2015-04-05T03:45:34 [2872] #8  0x0000000000977ce5 in ha_innobase::index_next (this=0x7fcbba545078, buf=0x7fcbba452578 "\377\377\217\217\217\217\217\217\217\217\217\217\217\217") at 5.5/storage/xtradb/handler/ha_innodb.cc:7390
      # 2015-04-05T03:45:34 [2872] #9  0x00000000005cfbae in handler::ha_index_next (this=0x7fcbba545078, buf=0x7fcbba452578 "\377\377\217\217\217\217\217\217\217\217\217\217\217\217") at 5.5/sql/sql_class.h:4251
      # 2015-04-05T03:45:34 [2872] #10 0x000000000068fac1 in join_read_next (info=0x7fcbc9e17128) at 5.5/sql/sql_select.cc:17855
      # 2015-04-05T03:45:34 [2872] #11 0x000000000068d8d0 in sub_select (join=0x7fcbc9e49388, join_tab=0x7fcbc9e17078, end_of_records=false) at 5.5/sql/sql_select.cc:16932
      # 2015-04-05T03:45:34 [2872] #12 0x000000000068d07c in do_select (join=0x7fcbc9e49388, fields=0x7fcbe4d95d10, table=0x0, procedure=0x0) at 5.5/sql/sql_select.cc:16575
      # 2015-04-05T03:45:34 [2872] #13 0x000000000066bce3 in JOIN::exec (this=0x7fcbc9e49388) at 5.5/sql/sql_select.cc:2873
      # 2015-04-05T03:45:34 [2872] #14 0x000000000066c4ed in mysql_select (thd=0x7fcbc9d53060, rref_pointer_array=0x7fcbc9d56cd0, tables=0x7fcbc9d7b2d8, wild_num=0, fields=..., conds=0x7fcbc9e49208, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=1342177408, result=0x7fcbc9e492c8, unit=0x7fcbc9d56380, select_lex=0x7fcbc9d56a60) at 5.5/sql/sql_select.cc:3094
      # 2015-04-05T03:45:34 [2872] #15 0x00000000006eaba6 in mysql_multi_update (thd=0x7fcbc9d53060, table_list=0x7fcbc9d7b2d8, fields=0x7fcbc9d56b78, values=0x7fcbc9d57000, conds=0x7fcbc9e49208, options=0, handle_duplicates=DUP_ERROR, ignore=false, unit=0x7fcbc9d56380, select_lex=0x7fcbc9d56a60, result=0x7fcbe4d962c8) at 5.5/sql/sql_update.cc:1438
      # 2015-04-05T03:45:34 [2872] #16 0x0000000000636d14 in mysql_execute_command (thd=0x7fcbc9d53060) at 5.5/sql/sql_parse.cc:2915
      # 2015-04-05T03:45:34 [2872] #17 0x000000000063ece2 in mysql_parse (thd=0x7fcbc9d53060, rawbuf=0x7fcbc9d7b078 "UPDATE `C` AS alias1 LEFT JOIN `D` AS alias2 ON ( alias2.`col_date_key` <= alias1.`col_date_key` ) SET alias2.`pk` = -16143 WHERE alias2.`col_varchar_nokey` NOT IN ( SELECT `col_varchar_nokey` FROM `DD` )", length=204, parser_state=0x7fcbe4d96670) at 5.5/sql/sql_parse.cc:5909
      # 2015-04-05T03:45:34 [2872] #18 0x0000000000632925 in dispatch_command (command=COM_QUERY, thd=0x7fcbc9d53060, packet=0x7fcbc9d58061 "UPDATE `C` AS alias1 LEFT JOIN `D` AS alias2 ON ( alias2.`col_date_key` <= alias1.`col_date_key` ) SET alias2.`pk` = -16143 WHERE alias2.`col_varchar_nokey` NOT IN ( SELECT `col_varchar_nokey` FROM `DD` )", packet_length=204) at 5.5/sql/sql_parse.cc:1079
      # 2015-04-05T03:45:34 [2872] #19 0x0000000000631ab1 in do_command (thd=0x7fcbc9d53060) at 5.5/sql/sql_parse.cc:793
      # 2015-04-05T03:45:34 [2872] #20 0x0000000000734122 in do_handle_one_connection (thd_arg=0x7fcbc9d53060) at 5.5/sql/sql_connect.cc:1266
      # 2015-04-05T03:45:34 [2872] #21 0x0000000000733be1 in handle_one_connection (arg=0x7fcbc9d53060) at 5.5/sql/sql_connect.cc:1181
      # 2015-04-05T03:45:34 [2872] #22 0x00007fcbe4aaab50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      # 2015-04-05T03:45:34 [2872] #23 0x00007fcbe2d6095d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      RQG command line

      perl ./runall-new.pl --grammar=1.yy --threads=3 --duration=300 --queries=100M  --engine=InnoDB --basedir=<your basedir> --vardir=<your vardir>

      RQG grammar 1.yy

      thread1:
        UPDATE `DD` 
        SET `pk` = _smallint 
        WHERE `col_varchar_key` = _char 
      ;
       
      thread2:
        UPDATE `DD` AS alias1, `E` AS alias2 
        SET alias1.`pk` = _smallint 
        WHERE alias1.`col_varchar_nokey` = alias2.`col_varchar_nokey`
      ;
       
      thread3:
        UPDATE `C` AS alias1 LEFT JOIN `D` AS alias2 
          ON ( alias2.`col_date_key` <= alias1.`col_date_key` ) 
        SET alias2.`pk` = _smallint 
        WHERE alias2.`col_varchar_nokey` NOT IN ( SELECT `col_varchar_nokey` FROM `DD` )
      ;

      Attachments

        Activity

          People

            jplindst Jan Lindström (Inactive)
            elenst Elena Stepanova
            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.