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

Assertion `pfs->get_refcount() > 0' failed in release_table_share after a flow of DDL/DML

    Details

      Description

      Notes:
      The attached test case is for reproducing/debugging only, do not put it into the regression suite, create a proper one instead.
      The test case is ~800 queries consisting of seemingly random DDL and some DML. Some of queries are supposed to fail and do fail, which is why the test case starts with --disable_abort_on_error. Yet, I cannot remove anything from there, including the failing statements.
      The test fails for me every time, but if it doesn't for you, run with --repeat=N, it can still be non-deterministic, even though there is no obvious concurrency involved.
      Run in shm. The failure happens when it runs on disk, too, but it takes forever on disk (e.g. on my machine ~10 minutes on disk vs ~17 seconds in shm).
      Not reproducible on 10.3, although it's possible that the test case is just not good enough for 10.3.
      There is no crash or on a non-debug version; otherwise whether it behaves correctly or not, is hard to tell with such a test case.

      10.4 790b6f5a

      mysqld: /data/src/10.4/storage/perfschema/pfs_instr_class.cc:1380: void release_table_share(PFS_table_share*): Assertion `pfs->get_refcount() > 0' failed.
      190219 20:21:39 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f8bc86b5ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055fc4651b46c in release_table_share (pfs=0x7f8bc7cd6bc0) at /data/src/10.4/storage/perfschema/pfs_instr_class.cc:1380
      #9  0x000055fc46540fa2 in release_table_share_v1 (share=0x7f8bc7cd6bc0) at /data/src/10.4/storage/perfschema/pfs.cc:1586
      #10 0x000055fc461465d2 in tdc_delete_share_from_hash (element=0x7f8b70413f00) at /data/src/10.4/sql/table_cache.cc:518
      #11 0x000055fc46146f60 in tdc_purge (all=true) at /data/src/10.4/sql/table_cache.cc:722
      #12 0x000055fc45e408ea in purge_tables (purge_flag=false) at /data/src/10.4/sql/sql_base.cc:337
      #13 0x000055fc45e409fa in close_cached_tables (thd=0x7f8b68000b00, tables=0x0, wait_for_refresh=true, timeout=86400) at /data/src/10.4/sql/sql_base.cc:364
      #14 0x000055fc460877da in reload_acl_and_cache (thd=0x7f8b68000b00, options=4, tables=0x0, write_to_binlog=0x7f8bc006e9d0) at /data/src/10.4/sql/sql_reload.cc:339
      #15 0x000055fc45ee7453 in mysql_execute_command (thd=0x7f8b68000b00) at /data/src/10.4/sql/sql_parse.cc:5677
      #16 0x000055fc45eeefa0 in mysql_parse (thd=0x7f8b68000b00, rawbuf=0x7f8b68013e38 "FLUSH TABLES", length=12, parser_state=0x7f8bc006f1f0, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8129
      #17 0x000055fc45eda6da in dispatch_command (command=COM_QUERY, thd=0x7f8b68000b00, packet=0x7f8b6800a4c1 "FLUSH TABLES", packet_length=12, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1808
      #18 0x000055fc45ed8fe4 in do_command (thd=0x7f8b68000b00) at /data/src/10.4/sql/sql_parse.cc:1358
      #19 0x000055fc4604e247 in do_handle_one_connection (connect=0x55fc498cc1e0) at /data/src/10.4/sql/sql_connect.cc:1399
      #20 0x000055fc4604dfb8 in handle_one_connection (arg=0x55fc498cc1e0) at /data/src/10.4/sql/sql_connect.cc:1302
      #21 0x000055fc46541753 in pfs_spawn_thread (arg=0x55fc4992e370) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #22 0x00007f8bca38c494 in start_thread (arg=0x7f8bc0070700) at pthread_create.c:333
      #23 0x00007f8bc877293f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

        Attachments

          Activity

            People

            • Assignee:
              robertbindar Robert Bindar
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: