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

InnoDB: Failing assertion: table->quiesce == QUIESCE_START upon concurrent FLUSH on view

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
    • 10.6
    • Views
    • None

    Description

      If MDEV-26086 gets fixed, then probably this failure will go away, the second FLUSH will just have to wait on a lock; but if MDEV-26086 is ruled as intentional behavior, then the bug here will need to be fixed.

      The test case fails every time for me on current 10.6 debug and release builds, but it involves a race condition, so it's non-deterministic. Run with --repeat if it doesn't fail right away.

      --source include/have_innodb.inc
       
      CREATE TABLE t (a INT) ENGINE=InnoDB;
      CREATE ALGORITHM=TEMPTABLE VIEW v AS SELECT * FROM t;
       
      --connect (con1,localhost,root,,test)
      --send
      FLUSH TABLE v WITH READ LOCK;
      --connection default
      FLUSH TABLE t FOR EXPORT;
       
      # Cleanup
      --connection con1
      --reap
      --disconnect con1
      --connection default
      UNLOCK TABLES;
      DROP VIEW v;
      DROP TABLE t;
      

      10.6 59bc063d

      2021-07-03 18:40:05 0x7f6c63dff700  InnoDB: Assertion failure in file /data/src/10.6/storage/innobase/row/row0quiesce.cc line 689
      InnoDB: Failing assertion: table->quiesce == QUIESCE_START
       
      #6  0x0000560a1e54b748 in ut_dbg_assertion_failed (expr=0x560a1ec36198 "table->quiesce == QUIESCE_START", file=0x560a1ec35c48 "/data/src/10.6/storage/innobase/row/row0quiesce.cc", line=689) at /data/src/10.6/storage/innobase/ut/ut0dbg.cc:60
      #7  0x0000560a1e4ecf50 in row_quiesce_set_state (table=0x7f6c34101498, state=QUIESCE_COMPLETE, trx=0x7f6c690ce1e0) at /data/src/10.6/storage/innobase/row/row0quiesce.cc:689
      #8  0x0000560a1e4ec88e in row_quiesce_table_start (table=0x7f6c34101498, trx=0x7f6c690ce1e0) at /data/src/10.6/storage/innobase/row/row0quiesce.cc:563
      #9  0x0000560a1e2e6496 in ha_innobase::external_lock (this=0x7f6c342383a0, thd=0x7f6c34000db8, lock_type=0) at /data/src/10.6/storage/innobase/handler/ha_innodb.cc:15726
      #10 0x0000560a1de6e35e in handler::ha_external_lock (this=0x7f6c342383a0, thd=0x7f6c34000db8, lock_type=0) at /data/src/10.6/sql/handler.cc:7026
      #11 0x0000560a1dfb7a51 in lock_external (thd=0x7f6c34000db8, tables=0x7f6c34239568, count=1) at /data/src/10.6/sql/lock.cc:393
      #12 0x0000560a1dfb76f8 in mysql_lock_tables (thd=0x7f6c34000db8, sql_lock=0x7f6c34239548, flags=4096) at /data/src/10.6/sql/lock.cc:338
      #13 0x0000560a1dfb75ac in mysql_lock_tables (thd=0x7f6c34000db8, tables=0x7f6c34015d70, count=1, flags=4096) at /data/src/10.6/sql/lock.cc:301
      #14 0x0000560a1da19fea in lock_tables (thd=0x7f6c34000db8, tables=0x7f6c34015688, count=1, flags=4096) at /data/src/10.6/sql/sql_base.cc:5549
      #15 0x0000560a1da194da in open_and_lock_tables (thd=0x7f6c34000db8, options=..., tables=0x7f6c34015688, derived=false, flags=4096, prelocking_strategy=0x7f6c63dfdcf8) at /data/src/10.6/sql/sql_base.cc:5261
      #16 0x0000560a1dcbed70 in open_and_lock_tables (thd=0x7f6c34000db8, tables=0x7f6c34015688, derived=false, flags=4096, prelocking_strategy=0x7f6c63dfdcf8) at /data/src/10.6/sql/sql_base.h:278
      #17 0x0000560a1dcbff1c in flush_tables_with_read_lock (thd=0x7f6c34000db8, all_tables=0x7f6c34015688) at /data/src/10.6/sql/sql_reload.cc:585
      #18 0x0000560a1dac8709 in mysql_execute_command (thd=0x7f6c34000db8, is_called_from_prepared_stmt=false) at /data/src/10.6/sql/sql_parse.cc:5407
      #19 0x0000560a1dad0a85 in mysql_parse (thd=0x7f6c34000db8, rawbuf=0x7f6c340155c0 "FLUSH TABLE t FOR EXPORT", length=24, parser_state=0x7f6c63dfe480) at /data/src/10.6/sql/sql_parse.cc:8026
      #20 0x0000560a1dabceed in dispatch_command (command=COM_QUERY, thd=0x7f6c34000db8, packet=0x7f6c3400b879 "FLUSH TABLE t FOR EXPORT", packet_length=24, blocking=true) at /data/src/10.6/sql/sql_parse.cc:1896
      #21 0x0000560a1dabb889 in do_command (thd=0x7f6c34000db8, blocking=true) at /data/src/10.6/sql/sql_parse.cc:1404
      #22 0x0000560a1dc78d9b in do_handle_one_connection (connect=0x560a21485048, put_in_cache=true) at /data/src/10.6/sql/sql_connect.cc:1410
      #23 0x0000560a1dc78af7 in handle_one_connection (arg=0x560a21484ab8) at /data/src/10.6/sql/sql_connect.cc:1312
      #24 0x0000560a1e1e8c1b in pfs_spawn_thread (arg=0x560a21484b98) at /data/src/10.6/storage/perfschema/pfs.cc:2201
      #25 0x00007f6c6f0f4609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #26 0x00007f6c6ecc7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Reproducible on 10.6, debug- and non-debug builds, with temptable views. Same observations as in MDEV-26086 apply.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              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.