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

Deadlock at unlocking tables when local server and replication write to same table

    XMLWordPrintable

Details

    Description

      We have a daisy-chain replication with 3 masters. Since the upgrade from 10.1 to 10.2.9 we get deadlocks 1-2 times a week on one specific table (varies from 0 to 500 entries) which is written by the local server and also by the replication. The replication stucks at the state "Unlocking tables" and stops the whole replication. It is not possible to kill the process within MariaDB, you have to kill the whole mysql-process with kill -9.

      There are no errors in error-log. A recent upgrade from 10.2.9 to 10.2.10 did not solve the problem. Any ideas?

      • Configuration

      log-slave-updates
      log_bin_trust_function_creators = 1
      log-bin = /var/log/mysql/mysqld-bin
      max_binlog_size = 10M
      binlog_format = STATEMENT
      relay-log = /var/log/mysql/mysqld-relay-bin
      max_relay_log_size = 10M
      

      • Stucked Process

            Id: 11
          User: system user
          Host: 
            db: database
       Command: Slave_SQL
          Time: 34937
         State: Unlocking tables
          Info: UPDATE `Table` SET `a` = 'b', `c` = 'd' ...
      Progress: 0.000
      

      • Workaround at Deadlock

      systemctl stop mariadb
      kill -9 `cat /var/lib/mysql/*.pid`
      systemctl start mariadb
      

      Attachments

        1. 20171208-deadlock.gdb
          333 kB
        2. 20171208-processlist.txt
          4 kB
        3. 20171213-deadlock.gdb
          114 kB
        4. 20171213-deadlock-after-stop.gdb
          37 kB
        5. 20171213-processlist.txt
          4 kB
        6. screenshot-1.png
          screenshot-1.png
          2 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alex2 Alex
              Votes:
              4 Vote for this issue
              Watchers:
              5 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.