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

Assertion `!table->s->tmp_table' failed in wait_while_table_is_used or server crash in MDL_ticket::has_stronger_or_equal_type

    XMLWordPrintable

Details

    Description

      Note: The bug is probably closely related to MDEV-19273, but since the assertion failures are different, I'll file it separately.

      CREATE SEQUENCE s;
      LOCK TABLES s READ;
      CREATE TEMPORARY TABLE s (a INT);
      DROP SEQUENCE s;
      

      10.3 e8dd18a4 non-debug

      #3  <signal handler called>
      #4  0x000055b3eaa8bc2c in MDL_ticket::has_stronger_or_equal_type (this=this@entry=0x0, type=type@entry=MDL_EXCLUSIVE) at /data/src/10.3/sql/mdl.cc:1720
      #5  0x000055b3eaa8db70 in MDL_context::upgrade_shared_lock (this=this@entry=0x7fdb60000ac8, mdl_ticket=0x0, new_type=new_type@entry=MDL_EXCLUSIVE, lock_wait_timeout=5) at /data/src/10.3/sql/mdl.cc:2330
      #6  0x000055b3ea95f1a5 in wait_while_table_is_used (thd=thd@entry=0x7fdb600009a8, table=0x7fdb60070768, function=function@entry=HA_EXTRA_NOT_USED) at /data/src/10.3/sql/sql_base.cc:1246
      #7  0x000055b3eaa2f3b4 in mysql_rm_table_no_locks (thd=thd@entry=0x7fdb600009a8, tables=tables@entry=0x7fdb6000f518, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=true, dont_log_query=<optimized out>, dont_free_locks=<optimized out>) at /data/src/10.3/sql/sql_table.cc:2487
      #8  0x000055b3eaa30010 in mysql_rm_table (thd=thd@entry=0x7fdb600009a8, tables=tables@entry=0x7fdb6000f518, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>) at /data/src/10.3/sql/sql_table.cc:2123
      #9  0x000055b3ea9b72e5 in mysql_execute_command (thd=thd@entry=0x7fdb600009a8) at /data/src/10.3/sql/sql_parse.cc:5054
      #10 0x000055b3ea9bd239 in mysql_parse (thd=thd@entry=0x7fdb600009a8, rawbuf=<optimized out>, length=15, parser_state=parser_state@entry=0x7fdbb813c630, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8091
      #11 0x000055b3ea9bfa85 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fdb600009a8, packet=packet@entry=0x7fdb600070a9 "DROP SEQUENCE s", packet_length=packet_length@entry=15, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1858
      #12 0x000055b3ea9c06f6 in do_command (thd=0x7fdb600009a8) at /data/src/10.3/sql/sql_parse.cc:1403
      #13 0x000055b3eaa85914 in do_handle_one_connection (connect=connect@entry=0x55b3eeaa9068) at /data/src/10.3/sql/sql_connect.cc:1402
      #14 0x000055b3eaa85a94 in handle_one_connection (arg=arg@entry=0x55b3eeaa9068) at /data/src/10.3/sql/sql_connect.cc:1308
      #15 0x000055b3eafee5d4 in pfs_spawn_thread (arg=0x55b3eea6a288) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #16 0x00007fdbbed0a4a4 in start_thread (arg=0x7fdbb813d700) at pthread_create.c:456
      #17 0x00007fdbbd252d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.3 e8dd18a4 debug

      mysqld: /data/src/10.3/sql/sql_base.cc:1241: bool wait_while_table_is_used(THD*, TABLE*, ha_extra_function): Assertion `!table->s->tmp_table' failed.
      190506 17:11:11 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007fdb7d595e67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55574bbbb2ba "!table->s->tmp_table", file=file@entry=0x55574bbbae00 "/data/src/10.3/sql/sql_base.cc", line=line@entry=1241, function=function@entry=0x55574bbbcac0 <wait_while_table_is_used(THD*, TABLE*, ha_extra_function)::__PRETTY_FUNCTION__> "bool wait_while_table_is_used(THD*, TABLE*, ha_extra_function)") at assert.c:92
      #7  0x00007fdb7d595f12 in __GI___assert_fail (assertion=0x55574bbbb2ba "!table->s->tmp_table", file=0x55574bbbae00 "/data/src/10.3/sql/sql_base.cc", line=1241, function=0x55574bbbcac0 <wait_while_table_is_used(THD*, TABLE*, ha_extra_function)::__PRETTY_FUNCTION__> "bool wait_while_table_is_used(THD*, TABLE*, ha_extra_function)") at assert.c:101
      #8  0x000055574afd5ab3 in wait_while_table_is_used (thd=0x7fdb20000b00, table=0x7fdb2008ad10, function=HA_EXTRA_NOT_USED) at /data/src/10.3/sql/sql_base.cc:1241
      #9  0x000055574b1322c1 in mysql_rm_table_no_locks (thd=0x7fdb20000b00, tables=0x7fdb200128d0, if_exists=false, drop_temporary=false, drop_view=false, drop_sequence=true, dont_log_query=false, dont_free_locks=false) at /data/src/10.3/sql/sql_table.cc:2487
      #10 0x000055574b13142f in mysql_rm_table (thd=0x7fdb20000b00, tables=0x7fdb200128d0, if_exists=false, drop_temporary=false, drop_sequence=true) at /data/src/10.3/sql/sql_table.cc:2123
      #11 0x000055574b06b683 in mysql_execute_command (thd=0x7fdb20000b00) at /data/src/10.3/sql/sql_parse.cc:5054
      #12 0x000055574b07514e in mysql_parse (thd=0x7fdb20000b00, rawbuf=0x7fdb20012808 "DROP SEQUENCE s", length=15, parser_state=0x7fdb731665f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8091
      #13 0x000055574b06219e in dispatch_command (command=COM_QUERY, thd=0x7fdb20000b00, packet=0x7fdb2015fe81 "DROP SEQUENCE s", packet_length=15, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1858
      #14 0x000055574b060bc3 in do_command (thd=0x7fdb20000b00) at /data/src/10.3/sql/sql_parse.cc:1403
      #15 0x000055574b1c8965 in do_handle_one_connection (connect=0x55574fa8ec60) at /data/src/10.3/sql/sql_connect.cc:1402
      #16 0x000055574b1c86dc in handle_one_connection (arg=0x55574fa8ec60) at /data/src/10.3/sql/sql_connect.cc:1308
      #17 0x000055574ba9d2c2 in pfs_spawn_thread (arg=0x55574f9d7600) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #18 0x00007fdb7f10a4a4 in start_thread (arg=0x7fdb73167700) at pthread_create.c:456
      #19 0x00007fdb7d652d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              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.