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

Server crashes in check_view_single_update on concurrent DDL/DML flow with views and triggers

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 10.0.13
    • N/A
    • N/A
    • None
    • 10.0.20

    Description

      #2  0x000000000085b11c in handle_fatal_signal (sig=11) at 10.0/sql/signal_handler.cc:262
      #3  <signal handler called>
      #4  0x000000000064341a in check_view_single_update (fields=..., values=0x7f22ec01f598, view=0x7f22ec049a78, map=0x7f22ff7af068, insert=true) at 10.0/sql/sql_insert.cc:155
      #5  0x00000000006438a8 in check_insert_fields (thd=0x7f22eee07070, table_list=0x7f22ec049a78, fields=..., values=..., check_unique=false, fields_and_values_from_different_maps=false, map=0x7f22ff7af068) at 10.0/sql/sql_insert.cc:270
      #6  0x0000000000646384 in mysql_prepare_insert (thd=0x7f22eee07070, table_list=0x7f22ec049a78, table=0x0, fields=..., values=0x7f22ec01f598, update_fields=..., update_values=..., duplic=DUP_ERROR, where=0x7f22ff7af228, select_insert=false, check_fields=true, abort_on_warning=false) at 10.0/sql/sql_insert.cc:1432
      #7  0x0000000000644612 in mysql_insert (thd=0x7f22eee07070, table_list=0x7f22ec049a78, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at 10.0/sql/sql_insert.cc:733
      #8  0x000000000066544e in mysql_execute_command (thd=0x7f22eee07070) at 10.0/sql/sql_parse.cc:3437
      #9  0x00000000009a2a76 in sp_instr_stmt::exec_core (this=0x7f22ec01f658, thd=0x7f22eee07070, nextp=0x7f22ff7b01e4) at 10.0/sql/sp_head.cc:3194
      #10 0x00000000009a21cf in sp_lex_keeper::reset_lex_and_exec_core (this=0x7f22ec01f698, thd=0x7f22eee07070, nextp=0x7f22ff7b01e4, open_tables=false, instr=0x7f22ec01f658) at 10.0/sql/sp_head.cc:2964
      #11 0x00000000009a2788 in sp_instr_stmt::execute (this=0x7f22ec01f658, thd=0x7f22eee07070, nextp=0x7f22ff7b01e4) at 10.0/sql/sp_head.cc:3113
      #12 0x000000000099e36c in sp_head::execute (this=0x7f22ec048088, thd=0x7f22eee07070, merge_da_on_success=false) at 10.0/sql/sp_head.cc:1366
      #13 0x000000000099ee89 in sp_head::execute_trigger (this=0x7f22ec048088, thd=0x7f22eee07070, db_name=0x7f22e9cbb5d8, table_name=0x7f22e9cbb5e8, grant_info=0x7f22edcfb388) at 10.0/sql/sp_head.cc:1692
      #14 0x0000000000728012 in Table_triggers_list::process_triggers (this=0x7f22edcfb288, thd=0x7f22eee07070, event=TRG_EVENT_INSERT, time_type=TRG_ACTION_AFTER, old_row_is_record1=true) at 10.0/sql/sql_trigger.cc:2103
      #15 0x000000000064759b in write_record (thd=0x7f22eee07070, table=0x7f22ec4a9470, info=0x7f22ff7b06b0) at 10.0/sql/sql_insert.cc:1853
      #16 0x000000000064501f in mysql_insert (thd=0x7f22eee07070, table_list=0x7f22ee81b238, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at 10.0/sql/sql_insert.cc:960
      #17 0x000000000066544e in mysql_execute_command (thd=0x7f22eee07070) at 10.0/sql/sql_parse.cc:3437
      #18 0x000000000066d9d1 in mysql_parse (thd=0x7f22eee07070, rawbuf=0x7f22ee81b088 "INSERT INTO `table10_myisam_int_autoinc` ( `pk` ) VALUES ( NULL )", length=65, parser_state=0x7f22ff7b1500) at 10.0/sql/sql_parse.cc:6412
      #19 0x0000000000660308 in dispatch_command (command=COM_QUERY, thd=0x7f22eee07070, packet=0x7f22eee0d071 "INSERT INTO `table10_myisam_int_autoinc` ( `pk` ) VALUES ( NULL )", packet_length=65) at 10.0/sql/sql_parse.cc:1307
      #20 0x000000000065f659 in do_command (thd=0x7f22eee07070) at 10.0/sql/sql_parse.cc:1004
      #21 0x0000000000783d1f in do_handle_one_connection (thd_arg=0x7f22eee07070) at 10.0/sql/sql_connect.cc:1379
      #22 0x0000000000783a72 in handle_one_connection (arg=0x7f22eee07070) at 10.0/sql/sql_connect.cc:1293
      #23 0x00007f231b13fe9a in start_thread (arg=0x7f22ff7b2700) at pthread_create.c:308
      #24 0x00007f231a03431d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      Stack trace from:

      revision-id: jplindst@mariadb.org-20140825103533-p9jodvh91r9tueo1
      revno: 4362
      branch-nick: 10.0

      RQG grammar (crash.yy):

      query:
              insert | insert | insert | insert | insert |
              insert | insert | insert | insert | insert |
              insert | insert | insert | insert | insert |
              insert | insert | insert | insert | insert | ddl ;
       
      thread2:
              create_or_replace;
       
      thread3:
              create_or_replace;
       
      create_or_replace:
              create_or_replace_as_select |
              create_or_replace_like ;
       
      create_or_replace_as_select:
              CREATE OR REPLACE TABLE `tmp` AS SELECT * FROM _table[invariant] ; 
       
      create_or_replace_like:
              CREATE OR REPLACE TEMPORARY TABLE `tmp` LIKE _basetable[invariant] ; INSERT INTO `tmp` SELECT * FROM _basetable[invariant] ; LOCK TABLE _basetable[invariant] WRITE ; CREATE OR REPLACE TABLE _basetable[invariant] LIKE `tmp`; INSERT INTO _basetable[invariant] SELECT * FROM `tmp`; UNLOCK TABLES ;
       
      insert:
              INSERT INTO _table ( _field ) VALUES ( NULL ) ; 
       
      ddl:
              CREATE TRIGGER _letter trigger_time trigger_event ON _table FOR EACH ROW BEGIN insert ; insert ; END ;
       
      trigger_time:
              BEFORE | AFTER ;
       
      trigger_event:
              INSERT | UPDATE ;

      RQG data template (crash.zz):

      $tables = {
              rows => [10],
              partitions => [ undef , 'KEY (pk) PARTITIONS 2' ],
              pk => [ undef, 'int auto_increment' ]
      };
       
      $fields = {
              types => [ 'int' ],
      };
       
      $data = {
              numbers => [ 'digit', 'null', undef ],
      }

      RQG command line:

      perl ./runall-new.pl  --threads=32 --duration=600 --queries=100M --reporters=QueryTimeout  --views --grammar=crash.yy --gendata=crash.zz --engine=MyISAM  --basedir1=<basedir> --vardir1=<vardir>

      Note: the issue is sporadic, you might have to run the test several times. If you are using lp:~elenst/randgen-mariadb-patches, you can do it automatically this way:

      perl ./runall-trials.pl  --threads=32 --duration=600 --queries=100M --reporters=QueryTimeout  --views --grammar=crash.yy --gendata=crash.zz --engine=MyISAM --trials=10  --basedir1=<basedir> --vardir1=<vardir>

      If you are using the main lp:randgen tree, just re-run the test manually.

      Attachments

        Activity

          People

            monty Michael Widenius
            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.