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

Assertion `open_tables == 0 && temporary_tables == 0 && derived_tables == 0 && lock == 0 && locked_tables_mode == LTM_NONE && m_reprepare_observer == __null' failed in THD::restore_backup_open_tables_state

    XMLWordPrintable

Details

    Description

      # mysqld options required for replay: --log-bin
      SET SQL_MODE='';
      SET SESSION binlog_format=1;
      CREATE TABLE t (a INT);
      LOCK TABLES t WRITE;
      CREATE OR REPLACE TABLE t (c INT DEFAULT NULL, ROW_START BIGINT UNSIGNED GENERATED ALWAYS AS ROW START INVISIBLE, ROW_END BIGINT UNSIGNED GENERATED ALWAYS AS ROW END INVISIBLE, PERIOD FOR SYSTEM_TIME (ROW_START, ROW_END)) WITH system VERSIONING;
      SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
      INSERT INTO t (c) VALUES (1);
      

      Leads to:

      10.6.0 5d4599f9750140f92cfdbbe4d292ae1b8dd456f8 (Debug)

      mysqld: /test/10.6_dbg/sql/sql_class.cc:4493: void THD::restore_backup_open_tables_state(Open_tables_backup*): Assertion `open_tables == 0 && temporary_tables == 0 && derived_tables == 0 && lock == 0 && locked_tables_mode == LTM_NONE && m_reprepare_observer == __null' failed.
      

      10.6.0 5d4599f9750140f92cfdbbe4d292ae1b8dd456f8 (Debug)

      Core was generated by `/test/MD211020-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x154ab0339700 (LWP 1850646))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000556b77bd2021 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x0000556b77319321 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000154aba7ed859 in __GI_abort () at abort.c:79
      #6  0x0000154aba7ed729 in __assert_fail_base (fmt=0x154aba983588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x556b77d2f098 "open_tables == 0 && temporary_tables == 0 && derived_tables == 0 && lock == 0 && locked_tables_mode == LTM_NONE && m_reprepare_observer == __null", file=0x556b77d2e410 "/test/10.6_dbg/sql/sql_class.cc", line=4493, function=<optimized out>) at assert.c:92
      #7  0x0000154aba7fef36 in __GI___assert_fail (assertion=assertion@entry=0x556b77d2f098 "open_tables == 0 && temporary_tables == 0 && derived_tables == 0 && lock == 0 && locked_tables_mode == LTM_NONE && m_reprepare_observer == __null", file=file@entry=0x556b77d2e410 "/test/10.6_dbg/sql/sql_class.cc", line=line@entry=4493, function=function@entry=0x556b77d2f058 "void THD::restore_backup_open_tables_state(Open_tables_backup*)") at assert.c:101
      #8  0x0000556b76fe37d7 in THD::restore_backup_open_tables_state (this=this@entry=0x154a54000db8, backup=backup@entry=0x154a540214f0) at /test/10.6_dbg/sql/sql_class.cc:4493
      #9  0x0000556b76fcbd29 in close_log_table (thd=0x154a54000db8, backup=0x154a540214f0) at /test/10.6_dbg/sql/sql_base.cc:9118
      #10 0x0000556b7716c925 in TR_table::~TR_table (this=0x154ab0337650, __in_chrg=<optimized out>) at /test/10.6_dbg/sql/table.cc:9514
      #11 0x0000556b77332ea4 in ha_commit_trans (thd=thd@entry=0x154a54000db8, all=all@entry=false) at /test/10.6_dbg/sql/handler.cc:1662
      #12 0x0000556b771c47f2 in trans_commit_stmt (thd=thd@entry=0x154a54000db8) at /test/10.6_dbg/sql/transaction.cc:472
      #13 0x0000556b7705cb55 in mysql_execute_command (thd=thd@entry=0x154a54000db8) at /test/10.6_dbg/sql/sql_parse.cc:5864
      #14 0x0000556b77042fd2 in mysql_parse (thd=thd@entry=0x154a54000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x154ab03383d0) at /test/10.6_dbg/sql/sql_parse.cc:7833
      #15 0x0000556b770510c7 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x154a54000db8, packet=packet@entry=0x154a54008e09 "INSERT INTO t (c) VALUES (1)", packet_length=packet_length@entry=28) at /test/10.6_dbg/sql/sql_class.h:1253
      #16 0x0000556b770543d2 in do_command (thd=0x154a54000db8) at /test/10.6_dbg/sql/sql_parse.cc:1343
      #17 0x0000556b771ae994 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x556b7b5ab248, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #18 0x0000556b771af09b in handle_one_connection (arg=arg@entry=0x556b7b5ab248) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #19 0x0000556b77662abb in pfs_spawn_thread (arg=0x556b7b526e08) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #20 0x0000154abacfb609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #21 0x0000154aba8ea293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.3.26 (dbg), 10.4.16 (dbg), 10.5.7 (dbg), 10.6.0 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.48 (dbg), 10.1.48 (opt), 10.2.35 (dbg), 10.2.35 (opt), 10.3.26 (opt), 10.4.16 (opt), 10.5.7 (opt), 10.6.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.