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

Assertion `table.get_ref_count() <= 1' failed in dberr_t trx_t::drop_table

    XMLWordPrintable

Details

    Description

      I've set versions tentatively to 10.6+, as that's where the failure has been recently observed in concurrent tests. Please adjust if needed.

      10.11 2b8dc7668a21c88568f2848dffd5f9ce725eae9e

      mysqld: /data/MDEV-33104/10.11/storage/innobase/dict/drop.cc:156: dberr_t trx_t::drop_table(const dict_table_t&): Assertion `table.get_ref_count() <= 1' failed.
       
      (rr) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x0000320b2a5e1859 in __GI_abort () at abort.c:79
      #2  0x0000320b2a5e1729 in __assert_fail_base (fmt=0x320b2a777588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55a9c67b314d "table.get_ref_count() <= 1", 
          file=0x55a9c67b2e68 "/data/MDEV-33104/10.11/storage/innobase/dict/drop.cc", line=156, function=<optimized out>) at assert.c:92
      #3  0x0000320b2a5f2fd6 in __GI___assert_fail (assertion=0x55a9c67b314d "table.get_ref_count() <= 1", file=0x55a9c67b2e68 "/data/MDEV-33104/10.11/storage/innobase/dict/drop.cc", line=156, 
          function=0x55a9c67b3108 "dberr_t trx_t::drop_table(const dict_table_t&)") at assert.c:101
      #4  0x000055a9c60ca387 in trx_t::drop_table (this=0x3a38709ec380, table=...) at /data/MDEV-33104/10.11/storage/innobase/dict/drop.cc:156
      #5  0x000055a9c5dc255d in commit_try_rebuild (ha_alter_info=0x70776ede9ef0, ctx=0x1523bc0dd2b8, altered_table=0x70776ede9fb0, old_table=0x321c5801e228, statistics_exist=true, trx=0x3a38709ec380, 
          table_name=0x321c58028c0a "D") at /data/MDEV-33104/10.11/storage/innobase/handler/handler0alter.cc:10337
      #6  0x000055a9c5db0e09 in ha_innobase::commit_inplace_alter_table (this=0x321c58108690, altered_table=0x70776ede9fb0, ha_alter_info=0x70776ede9ef0, commit=true)
          at /data/MDEV-33104/10.11/storage/innobase/handler/handler0alter.cc:11482
      #7  0x000055a9c5a2f9b0 in handler::ha_commit_inplace_alter_table (this=0x321c58108690, altered_table=0x70776ede9fb0, ha_alter_info=0x70776ede9ef0, commit=true) at /data/MDEV-33104/10.11/sql/handler.cc:5292
      #8  0x000055a9c57941a5 in mysql_inplace_alter_table (thd=0x1523bc002558, table_list=0x1523bc014c88, table=0x321c5801e228, altered_table=0x70776ede9fb0, ha_alter_info=0x70776ede9ef0, 
          target_mdl_request=0x70776edea7a0, ddl_log_state=0x70776ede9eb0, trigger_param=0x70776edea380, alter_ctx=0x70776edeb370, partial_alter=@0x70776ede9db6: false, start_alter_id=@0x70776ede9df0: 0, 
          if_exists=false) at /data/MDEV-33104/10.11/sql/sql_table.cc:7870
      #9  0x000055a9c579dcb4 in mysql_alter_table (thd=0x1523bc002558, new_db=0x1523bc0070c0, new_name=0x1523bc007520, create_info=0x70776edec200, table_list=0x1523bc014c88, recreate_info=0x70776edec070, 
          alter_info=0x70776edec090, order_num=0, order=0x0, ignore=false, if_exists=false) at /data/MDEV-33104/10.11/sql/sql_table.cc:11015
      #10 0x000055a9c5848ece in Sql_cmd_alter_table::execute (this=0x1523bc0153a0, thd=0x1523bc002558) at /data/MDEV-33104/10.11/sql/sql_alter.cc:688
      #11 0x000055a9c56874b7 in mysql_execute_command (thd=0x1523bc002558, is_called_from_prepared_stmt=false) at /data/MDEV-33104/10.11/sql/sql_parse.cc:6075
      #12 0x000055a9c568cf44 in mysql_parse (thd=0x1523bc002558, rawbuf=0x1523bc014b40 "/* WRK-5 QNO 4822 */  ALTER TABLE `simple_db`.`D` FORCE", length=55, parser_state=0x70776eded340)
          at /data/MDEV-33104/10.11/sql/sql_parse.cc:8080
      #13 0x000055a9c5679cd3 in dispatch_command (command=COM_QUERY, thd=0x1523bc002558, packet=0x1523bc00c7d9 "/* WRK-5 QNO 4822 */  ALTER TABLE `simple_db`.`D` FORCE ", packet_length=56, blocking=true)
          at /data/MDEV-33104/10.11/sql/sql_parse.cc:1894
      #14 0x000055a9c56788d0 in do_command (thd=0x1523bc002558, blocking=true) at /data/MDEV-33104/10.11/sql/sql_parse.cc:1407
      #15 0x000055a9c583e029 in do_handle_one_connection (connect=0x55a9c8eeedf8, put_in_cache=true) at /data/MDEV-33104/10.11/sql/sql_connect.cc:1415
      #16 0x000055a9c583ddb5 in handle_one_connection (arg=0x55a9c8eeedf8) at /data/MDEV-33104/10.11/sql/sql_connect.cc:1317
      #17 0x00007dee5aebe609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #18 0x0000320b2a6de133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      I have an impression that the failure started happening not very long ago (but probably before Q4 2023 release). However, it's not impossible that its appearance was triggered not by code changes but by some test changes.

      Effect on non-debug builds:
      So far I haven't observed any visible problem on a non-debug build (no hang etc).

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              7 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.