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

Wrong locking order of LOCK_log and LOCK_global_system_variables, potential deadlock of server

    XMLWordPrintable

Details

    Description

      Looks related to MDEV-29744, though is substantially different (different testcase, different versions affected, looks to be a new regression and the mutex order is reversed)

      # mysqld options required for replay: --log_bin
      SET GLOBAL binlog_checksum=0;
      INSTALL SONAME 'ha_spider';
      RESET MASTER;
      

      Leads to:

      CS 11.7.0 4016c905cbabea7f29ed282dc2125254c7c0d419 (Debug)

      Version: '11.7.0-MariaDB-debug-log'  socket: '/test/MD141024-mariadb-11.7.0-linux-x86_64-dbg/socket.sock'  port: 12847  MariaDB Server
      safe_mutex: Found wrong usage of mutex 'LOCK_log' and 'LOCK_global_system_variables'
      Mutex currently locked (in reverse order):
      LOCK_global_system_variables      /test/11.7_dbg/sql/sql_plugin.cc  line 3132
      LOCK_log                          /test/11.7_dbg/sql/log.cc  line 4449
      

      MTR Testcase:

      --source include/have_log_bin.inc
      SET GLOBAL binlog_checksum=0;
      INSTALL SONAME 'ha_spider';
      RESET MASTER;
      

      Found present in 11.4-11.7, though may have been introduced in 11.3. Not present in 11.2.

      Attachments

        Issue Links

          Activity

            People

              knielsen Kristian Nielsen
              Roel Roel Van de Paar
              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.