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

Assertion failures in tdc_remove_table upon interrupted CREATE TABLE LIKE <sequence>

    XMLWordPrintable

Details

    Description

      Note: The failure currently happens for me every time, but the test case is still non-deterministic, run with --repeat=N if it doesn't fail right away.

      --connect (con1,localhost,root,,test)
      --let $kill_id= `SELECT CONNECTION_ID()`
       
      CREATE SEQUENCE s;
      --send
        CREATE TABLE t LIKE s;
       
      --connection default
      SELECT 1 FROM mysql.user LIMIT 0;
      eval KILL $kill_id;
       
      --source include/restart_mysqld.inc
       
      # Cleanup
      DROP TABLE t;
      DROP SEQUENCE s;
      

      10.3 396da1a7

      mysqld: /data/src/10.3/sql/table_cache.cc:1102: bool tdc_remove_table(THD*, enum_tdc_remove_table_type, const char*, const char*, bool): Assertion `remove_type == TDC_RT_REMOVE_UNUSED || thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name, MDL_EXCLUSIVE)' failed.
      190902 18:36:53 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007f8fd4a2ee67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55a4f45399b8 "remove_type == TDC_RT_REMOVE_UNUSED || thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name, MDL_EXCLUSIVE)", file=file@entry=0x55a4f4539328 "/data/src/10.3/sql/table_cache.cc", line=line@entry=1102, function=function@entry=0x55a4f4539dc0 <tdc_remove_table(THD*, enum_tdc_remove_table_type, char const*, char const*, bool)::__PRETTY_FUNCTION__> "bool tdc_remove_table(THD*, enum_tdc_remove_table_type, const char*, const char*, bool)") at assert.c:92
      #7  0x00007f8fd4a2ef12 in __GI___assert_fail (assertion=0x55a4f45399b8 "remove_type == TDC_RT_REMOVE_UNUSED || thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name, MDL_EXCLUSIVE)", file=0x55a4f4539328 "/data/src/10.3/sql/table_cache.cc", line=1102, function=0x55a4f4539dc0 <tdc_remove_table(THD*, enum_tdc_remove_table_type, char const*, char const*, bool)::__PRETTY_FUNCTION__> "bool tdc_remove_table(THD*, enum_tdc_remove_table_type, const char*, const char*, bool)") at assert.c:101
      #8  0x000055a4f3a7fd9b in tdc_remove_table (thd=0x7f8fb8000b00, remove_type=TDC_RT_REMOVE_ALL, db=0x7f8fb8012228 "test", table_name=0x7f8fb8011ba0 "s", kill_delayed_threads=false) at /data/src/10.3/sql/table_cache.cc:1100
      #9  0x000055a4f390d7f1 in mysql_rm_table_no_locks (thd=0x7f8fb8000b00, tables=0x7f8fb8011548, if_exists=true, drop_temporary=false, drop_view=false, drop_sequence=true, dont_log_query=true, dont_free_locks=true) at /data/src/10.3/sql/sql_table.cc:2477
      #10 0x000055a4f3915934 in mysql_create_table_no_lock (thd=0x7f8fb8000b00, db=0x7f8fb8011560, table_name=0x7f8fb8011570, create_info=0x7f8fcabb1580, alter_info=0x7f8fcabb14c0, is_trans=0x7f8fcabb1411, create_table_mode=0, table_list=0x7f8fb8011548) at /data/src/10.3/sql/sql_table.cc:5107
      #11 0x000055a4f39171b5 in mysql_create_like_table (thd=0x7f8fb8000b00, table=0x7f8fb8011548, src_table=0x7f8fb8011bd8, create_info=0x7f8fcabb2b30) at /data/src/10.3/sql/sql_table.cc:5644
      #12 0x000055a4f3927366 in Sql_cmd_create_table_like::execute (this=0x7f8fb8011528, thd=0x7f8fb8000b00) at /data/src/10.3/sql/sql_table.cc:11167
      #13 0x000055a4f3842212 in mysql_execute_command (thd=0x7f8fb8000b00) at /data/src/10.3/sql/sql_parse.cc:6024
      #14 0x000055a4f3847a63 in mysql_parse (thd=0x7f8fb8000b00, rawbuf=0x7f8fb8011458 "CREATE TABLE t LIKE s", length=21, parser_state=0x7f8fcabb35e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7830
      #15 0x000055a4f3834361 in dispatch_command (command=COM_QUERY, thd=0x7f8fb8000b00, packet=0x7f8fb8008c71 "CREATE TABLE t LIKE s", packet_length=21, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #16 0x000055a4f3832c88 in do_command (thd=0x7f8fb8000b00) at /data/src/10.3/sql/sql_parse.cc:1401
      #17 0x000055a4f39abc0c in do_handle_one_connection (connect=0x55a4f66357d0) at /data/src/10.3/sql/sql_connect.cc:1403
      #18 0x000055a4f39ab96e in handle_one_connection (arg=0x55a4f66357d0) at /data/src/10.3/sql/sql_connect.cc:1308
      #19 0x000055a4f438d09c in pfs_spawn_thread (arg=0x55a4f6591200) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #20 0x00007f8fd65a34a4 in start_thread (arg=0x7f8fcabb4700) at pthread_create.c:456
      #21 0x00007f8fd4aebd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Query (0x7f8fb8011458): CREATE TABLE t LIKE s
      Connection ID (thread ID): 5
      Status: KILL_SERVER
      

      Couldn't reproduce on 10.4 or 10.5 on some reason.

      Attachments

        Activity

          People

            wlad Vladislav Vaintroub
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.