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

safe_mutex: Found wrong usage of mutex 'LOCK_thd_data' and 'THR_LOCK_myisam', server with WSREP hangs

    XMLWordPrintable

Details

    Description

      Note: It is filed separately from MDEV-22458 for the sake of a different mutex combination, specific to MyISAM. The test case has send/reap, and thus may be non-deterministic. The concurrency is added as it seems to be necessary for producing the mutex error message, hang is reproducible without it. I suppose send/reap can be removed from the test case for the regression suite.

      --source include/galera_cluster.inc
       
      CREATE TABLE t1 (a INT) ENGINE=MyISAM;
       
      --connect (con1,localhost,root,,test)
      --let $con1= `SELECT CONNECTION_ID()`
       
      --connection default
      --send
          INSERT INTO t1 VALUES (1),(2),(3),(4);
      --connection con1
          INSERT INTO t1 VALUES (5),(6),(7),(8);
      --connection default
      --reap
      --error ER_TARGET_NOT_EXPLAINABLE
      eval SHOW EXPLAIN FOR $con1;
      DROP TABLE t1;
      --connection con1
      SELECT 1;
       
      # Cleanup
      --disconnect con1
      

      Server hangs upon SELECT. The error log shows this:

      10.4 7f03a933

      safe_mutex: Found wrong usage of mutex 'LOCK_thd_data' and 'THR_LOCK_myisam'
      Mutex currently locked (in reverse order):
      THR_LOCK_myisam                   /data/src/10.4/storage/myisam/mi_close.c  line 35
      LOCK_thd_data                     /data/src/10.4/sql/sql_parse.cc  line 9017
      

      Reproducible on 10.4, 10.5.
      Not reproducible on 10.3.

      Attachments

        Issue Links

          Activity

            People

              jplindst Jan Lindström (Inactive)
              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.