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

Assertion `!m_freed_pages' failed in mtr_t::start upon dropping temporary table

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      SET @scrub= @@INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED;
       
      SET GLOBAL INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED= 1;
      CREATE TEMPORARY TABLE tmp ENGINE=InnoDB AS SELECT 1;
      DROP TABLE tmp;
       
      # Cleanup
      SET GLOBAL INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED= @scrub;
      

      10.6 de4030e4d

      mariadbd: /data/src/10.6-bug/storage/innobase/mtr/mtr0mtr.cc:88: void mtr_t::start(): Assertion `!m_freed_pages' failed.
      230131 18:28:30 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fbb8ddf4662 in __GI___assert_fail (assertion=0x5567bb58130a "!m_freed_pages", file=0x5567bb581250 "/data/src/10.6-bug/storage/innobase/mtr/mtr0mtr.cc", line=88, function=0x5567bb5812f6 "void mtr_t::start()") at assert.c:101
      #8  0x00005567bac84124 in mtr_t::start (this=0x7fbb881857c0) at /data/src/10.6-bug/storage/innobase/mtr/mtr0mtr.cc:88
      #9  0x00005567bae05286 in btr_drop_temporary_table (table=...) at /data/src/10.6-bug/storage/innobase/btr/btr0btr.cc:1252
      #10 0x00005567bab8e2dc in ha_innobase::delete_table (this=0x7fbb28015dc0, name=0x7fbb2822da48 "/mnt8t/src/10.6-bug/mysql-test/var/tmp/mysqld.1/#sql-temptable-2fdb89-4-f") at /data/src/10.6-bug/storage/innobase/handler/ha_innodb.cc:13470
      #11 0x00005567ba765c2d in hton_drop_table (hton=0x5567bdb4cdd8, path=0x7fbb2822da48 "/mnt8t/src/10.6-bug/mysql-test/var/tmp/mysqld.1/#sql-temptable-2fdb89-4-f") at /data/src/10.6-bug/sql/handler.cc:576
      #12 0x00005567ba68cb32 in THD::rm_temporary_table (this=0x7fbb28000db8, base=0x5567bdb4cdd8, path=0x7fbb2822da48 "/mnt8t/src/10.6-bug/mysql-test/var/tmp/mysqld.1/#sql-temptable-2fdb89-4-f") at /data/src/10.6-bug/sql/temporary_tables.cc:705
      #13 0x00005567ba68eb41 in THD::free_tmp_table_share (this=0x7fbb28000db8, share=0x7fbb2822d498, delete_table=true) at /data/src/10.6-bug/sql/temporary_tables.cc:1468
      #14 0x00005567ba68c9be in THD::drop_temporary_table (this=0x7fbb28000db8, table=0x7fbb28224b38, is_trans=0x7fbb8818649e, delete_table=true) at /data/src/10.6-bug/sql/temporary_tables.cc:673
      #15 0x00005567ba4c183f in mysql_rm_table_no_locks (thd=0x7fbb28000db8, tables=0x7fbb280156b0, current_db=0x7fbb28000e58, ddl_log_state=0x7fbb88186570, if_exists=false, drop_temporary=false, drop_view=false, drop_sequence=false, dont_log_query=false, dont_free_locks=false) at /data/src/10.6-bug/sql/sql_table.cc:1298
      #16 0x00005567ba4c0ed1 in mysql_rm_table (thd=0x7fbb28000db8, tables=0x7fbb280156b0, if_exists=false, drop_temporary=false, drop_sequence=false, dont_log_query=false) at /data/src/10.6-bug/sql/sql_table.cc:1046
      #17 0x00005567ba3d57db in mysql_execute_command (thd=0x7fbb28000db8, is_called_from_prepared_stmt=false) at /data/src/10.6-bug/sql/sql_parse.cc:4952
      #18 0x00005567ba3df76b in mysql_parse (thd=0x7fbb28000db8, rawbuf=0x7fbb28015600 "DROP TABLE tmp", length=14, parser_state=0x7fbb881873a0) at /data/src/10.6-bug/sql/sql_parse.cc:8019
      #19 0x00005567ba3cbd82 in dispatch_command (command=COM_QUERY, thd=0x7fbb28000db8, packet=0x7fbb2800b8b9 "DROP TABLE tmp", packet_length=14, blocking=true) at /data/src/10.6-bug/sql/sql_parse.cc:1896
      #20 0x00005567ba3ca75b in do_command (thd=0x7fbb28000db8, blocking=true) at /data/src/10.6-bug/sql/sql_parse.cc:1409
      #21 0x00005567ba586c93 in do_handle_one_connection (connect=0x5567be0ba9a8, put_in_cache=true) at /data/src/10.6-bug/sql/sql_connect.cc:1416
      #22 0x00005567ba586a03 in handle_one_connection (arg=0x5567be0ba5f8) at /data/src/10.6-bug/sql/sql_connect.cc:1318
      #23 0x00005567baaa467a in pfs_spawn_thread (arg=0x5567be001ac8) at /data/src/10.6-bug/storage/perfschema/pfs.cc:2201
      #24 0x00007fbb8e2d2ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #25 0x00007fbb8debfaef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      The failure started happening on 10.6 after this commit

      Author: Marko Mäkelä
      Date:   Tue Jan 24 14:09:21 2023 +0200
       
          MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT
      

      No obvious immediate problem on a non-debug build.

      Attachments

        Activity

          People

            marko Marko Mäkelä
            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.