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

Server crashes in thd_get_ha_data on CREATE OR REPLACE TABLE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • 10.0.10
    • None
    • None

    Description

      Variant 1: deterministic test involving TokuDB

      CREATE TABLE t1 (a INT);
      CREATE TABLE t2 (a INT) ENGINE=TokuDB;
      CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2;

      #4  0x0000000000634ce5 in thd_get_ha_data (thd=0x7f98843cc070, hton=0x7f988b3f8a70) at 10.0/sql/sql_class.cc:636
      #5  0x0000000000929920 in binlog_reset_cache (thd=0x7f98843cc070) at 10.0/sql/log.cc:2059
      #6  0x000000000065e6ba in select_create::abort_result_set (this=0x7f98679a2068) at 10.0/sql/sql_insert.cc:4348
      #7  0x00000000006a6192 in handle_select (thd=0x7f98843cc070, lex=0x7f98843cfcb0, result=0x7f98679a2068, setup_tables_done_option=0) at 10.0/sql/sql_select.cc:378
      #8  0x000000000067430b in mysql_execute_command (thd=0x7f98843cc070) at 10.0/sql/sql_parse.cc:3032
      #9  0x000000000067d6db in mysql_parse (thd=0x7f98843cc070, rawbuf=0x7f98679a1088 "CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2", length=46, parser_state=0x7f988d823610) at 10.0/sql/sql_parse.cc:6447
      #10 0x00000000006704a8 in dispatch_command (command=COM_QUERY, thd=0x7f98843cc070, packet=0x7f98802da071 "CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2", packet_length=46) at 10.0/sql/sql_parse.cc:1308
      #11 0x000000000066f84a in do_command (thd=0x7f98843cc070) at 10.0/sql/sql_parse.cc:1005
      #12 0x0000000000789f02 in do_handle_one_connection (thd_arg=0x7f98843cc070) at 10.0/sql/sql_connect.cc:1379
      #13 0x0000000000789c55 in handle_one_connection (arg=0x7f98843cc070) at 10.0/sql/sql_connect.cc:1293
      #14 0x0000000000a2f27c in pfs_spawn_thread (arg=0x7f987ff9fa30) at 10.0/storage/perfschema/pfs.cc:1853
      #15 0x00007f988d457b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #16 0x00007f988b962a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
      #17 0x0000000000000000 in ?? ()


      Variant 2: concurrent test with KILL QUERY (without TokuDB)

      RQG grammar (bug.yy):

      query_init:
      	CREATE TABLE IF NOT EXISTS `t1` (`f1` INT) ENGINE=InnoDB;
       
      query:
      	INSERT INTO `t1` VALUES ( _digit ) |
      	DELETE FROM `t1` WHERE `f1` < _digit LIMIT 1 ;
       
      thread3:
      	CREATE OR REPLACE TABLE `t2` AS SELECT * FROM `t1`; 
       
      thread4:
      	KILL QUERY CONNECTION_ID()-1 | query ;

      RQG command line (starts the server):

      perl ./runall.pl --threads=8 --duration=120 --queries=100M --skip-gendata  --grammar=bug.yy  --basedir=<basedir>

      Or, if the server is already running on port 3306:

      perl ./gentest.pl --threads=8 --duration=120 --queries=100M   --grammar=bug.yy   --dsn="dbi:mysql:host=127.0.0.1:port=3306:user=root:database=test"

      # 2014-03-22T15:15:59 #3  <signal handler called>
      # 2014-03-22T15:15:59 #4  0x0000000000602445 in thd_get_ha_data (thd=0x7fedeae15070, hton=0x7fedfa7df270) at 10.0/sql/sql_class.cc:636
      # 2014-03-22T15:15:59 #5  0x000000000090a199 in binlog_reset_cache (thd=0x7fedeae15070) at 10.0/sql/log.cc:2059
      # 2014-03-22T15:15:59 #6  0x000000000062cb48 in select_create::abort_result_set (this=0x7fede385a088) at 10.0/sql/sql_insert.cc:4348
      # 2014-03-22T15:15:59 #7  0x0000000000676192 in handle_select (thd=0x7fedeae15070, lex=0x7fedeae18cb0, result=0x7fede385a088, setup_tables_done_option=0) at 10.0/sql/sql_select.cc:378
      # 2014-03-22T15:15:59 #8  0x0000000000642a09 in mysql_execute_command (thd=0x7fedeae15070) at 10.0/sql/sql_parse.cc:3032
      # 2014-03-22T15:15:59 #9  0x000000000064bf8a in mysql_parse (thd=0x7fedeae15070, rawbuf=0x7fede3859088 "CREATE OR REPLACE TABLE `t2` AS SELECT * FROM `t1`", length=50, parser_state=0x7fedfdda25c0) at 10.0/sql/sql_parse.cc:6447
      # 2014-03-22T15:15:59 #10 0x000000000063ea82 in dispatch_command (command=COM_QUERY, thd=0x7fedeae15070, packet=0x7fedeaed0071 "CREATE OR REPLACE TABLE `t2` AS SELECT * FROM `t1`", packet_length=50) at 10.0/sql/sql_parse.cc:1308
      # 2014-03-22T15:15:59 #11 0x000000000063dddd in do_command (thd=0x7fedeae15070) at 10.0/sql/sql_parse.cc:1005
      # 2014-03-22T15:15:59 #12 0x0000000000763337 in do_handle_one_connection (thd_arg=0x7fedeae15070) at 10.0/sql/sql_connect.cc:1379
      # 2014-03-22T15:15:59 #13 0x000000000076309d in handle_one_connection (arg=0x7fedeae15070) at 10.0/sql/sql_connect.cc:1293
      # 2014-03-22T15:15:59 #14 0x0000000000d67356 in pfs_spawn_thread (arg=0x7fedf0ff2710) at 10.0/storage/perfschema/pfs.cc:1853
      # 2014-03-22T15:15:59 #15 0x00007fedff1cff6e in start_thread (arg=0x7fedfdda3700) at pthread_create.c:311
      # 2014-03-22T15:15:59 #16 0x00007fedfe0b49cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

      Stack traces from:

      revision-id: knielsen@knielsen-hq.org-20140321123055-8ch69qymsj1xqmw4
      date: 2014-03-21 13:30:55 +0100
      build-date: 2014-03-22 15:17:33 +0400
      revno: 4076
      branch-nick: 10.0

      Attachments

        Activity

          People

            monty Michael Widenius
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.