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

THD::cleanup(): Assertion `!mdl_context.has_locks()' failed

Details

    Description

      Failure during wsrep_mode_strict_replication test:

      galera.wsrep_mode_strict_replication 'innodb' w1 [ fail ]  Found warnings/errors in server log file!
              Test ended at 2021-05-15 13:36:58
      line
      mariadbd: /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.6.1/sql/sql_class.cc:1590: void THD::cleanup(): Assertion `!mdl_context.has_locks()' failed.
      Attempting backtrace. You can use the following information to find out
      ^ Found warnings in /dev/shm/var/1/log/mysqld.1.err
      ok
      

      Attachments

        Issue Links

          Activity

            One more test failure caused by the same merge:

            galera_sr.mysql-wsrep-features#8 'innodb' [ fail ]
                    Test ended at 2021-05-18 03:51:33
             
            CURRENT_TEST: galera_sr.mysql-wsrep-features#8
            mysqltest: At line 37: query 'SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk')' failed: 1205: Lock wait timeout exceeded; try restarting transaction
             
            The result from queries just before the failure was:
            < snip >
            CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB;
            connection node_2;
            SELECT COUNT(*) = 13 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name LIKE 'test/%';
            COUNT(*) = 13
            1
            connection node_1;
            INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
            connection node_2;
            SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz');
            COUNT(f2) = 10000
            1
            UPDATE t1 SET f2 = 'abcdefjhk';
            connection node_1;
            SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk');
            

            sysprg Julius Goryavsky added a comment - One more test failure caused by the same merge: galera_sr.mysql-wsrep-features#8 'innodb' [ fail ] Test ended at 2021-05-18 03:51:33   CURRENT_TEST: galera_sr.mysql-wsrep-features#8 mysqltest: At line 37: query 'SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk')' failed: 1205: Lock wait timeout exceeded; try restarting transaction   The result from queries just before the failure was: < snip > CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB; connection node_2; SELECT COUNT(*) = 13 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name LIKE 'test/%'; COUNT(*) = 13 1 connection node_1; INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; connection node_2; SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz'); COUNT(f2) = 10000 1 UPDATE t1 SET f2 = 'abcdefjhk'; connection node_1; SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk');

            MDEV-25606 and MDEV-25651 are possible culprits according to the output of the following:

            git log --oneline 370b310b1d67ad42df96b75c3876fdcf67a8694f^..370b310b1d67ad42df96b75c3876fdcf67a8694f^2 sql
            

            marko Marko Mäkelä added a comment - MDEV-25606 and MDEV-25651 are possible culprits according to the output of the following: git log --oneline 370b310b1d67ad42df96b75c3876fdcf67a8694f^..370b310b1d67ad42df96b75c3876fdcf67a8694f^2 sql

            It looks like this affects 10.5 as well. I just got this failure locally:

            10.5 81402c131875c5fc2c3c4078bc12770304a48861 with a merge from 10.4

            galera.wsrep_strict_ddl 'innodb'         w5 [ fail ]  Found warnings/errors in server log file!
                    Test ended at 2021-05-18 09:06:34
            line
            mariadbd: /mariadb/10.5m/sql/sql_class.cc:1588: void THD::cleanup(): Assertion `!mdl_context.has_locks()' failed.
            

            Unfortunately, no stack trace or core dump was preserved.

            marko Marko Mäkelä added a comment - It looks like this affects 10.5 as well. I just got this failure locally: 10.5 81402c131875c5fc2c3c4078bc12770304a48861 with a merge from 10.4 galera.wsrep_strict_ddl 'innodb' w5 [ fail ] Found warnings/errors in server log file! Test ended at 2021-05-18 09:06:34 line mariadbd: /mariadb/10.5m/sql/sql_class.cc:1588: void THD::cleanup(): Assertion `!mdl_context.has_locks()' failed. Unfortunately, no stack trace or core dump was preserved.

            The last comment is not related to Jira entry case, as the test
            galera.wsrep_mode_strict_replication only exists in 10.6

            monty Michael Widenius added a comment - The last comment is not related to Jira entry case, as the test galera.wsrep_mode_strict_replication only exists in 10.6

            I tested galera_sr.mysql-wsrep-features#8 with latest 10.5 and it worked with me. Nothing that I can do related to that as there is no information of what failed and there is no stack trace in the comment.

            galera.wsrep_strict_ddl failed, will fix that.

            The reason for the failure in galera was that error handling was not done properly.
            Having macros that jumps to lablels that does not do error recovery is NOT A GOOD IDEA!
            Fixed by doing proper error recovery in case of WSREP falures

            monty Michael Widenius added a comment - I tested galera_sr.mysql-wsrep-features#8 with latest 10.5 and it worked with me. Nothing that I can do related to that as there is no information of what failed and there is no stack trace in the comment. galera.wsrep_strict_ddl failed, will fix that. The reason for the failure in galera was that error handling was not done properly. Having macros that jumps to lablels that does not do error recovery is NOT A GOOD IDEA! Fixed by doing proper error recovery in case of WSREP falures

            Pushed bug fix into 10.5 tree

            monty Michael Widenius added a comment - Pushed bug fix into 10.5 tree

            People

              monty Michael Widenius
              sysprg Julius Goryavsky
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.