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

Deadlock found when trying to get lock during applying

Details

    Description

      cluster got frozen after joiner node hit the following error:

      2023-07-10  2:20:50 10 [ERROR] Slave SQL: Could not execute Write_rows_compressed_v1 event on table db.tablex; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log FIRST, end_log_pos 1583, Internal MariaDB error code: 1213
      2023-07-10  2:20:50 103 [ERROR] Slave SQL: Could not execute Write_rows_v1 event on table db.tablex; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log FIRST, end_log_pos 772, Internal MariaDB error code: 1213
      2023-07-10  2:20:50 10 [Warning] WSREP: Event 3 Write_rows_compressed_v1 apply failed: 149, seqno 45474182196
      2023-07-10  2:20:50 103 [Warning] WSREP: Event 3 Write_rows_v1 apply failed: 149, seqno 45474182201
      2023-07-10  2:20:50 0 [Note] WSREP: Member 0(fx114_db3) initiates vote on e4e16f9c-8779-11eb-b356-c3718f5f11e0:45474182196,8b5f5fd24a23838b:  Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213;
      2023-07-10  2:20:50 0 [Note] WSREP: Member 2(fx114_db2) responds to vote on e4e16f9c-8779-11eb-b356-c3718f5f11e0:45474182196,0000000000000000: Success
      2023-07-10  2:20:50 0 [Warning] WSREP: Received bogus VOTE message: 45474182196.0, from node f3b6f9e7-1ea8-11ee-bb0a-5bd84ee8291e, expected > 45474389658. Ignoring.
      2023-07-10  2:20:50 0 [Note] WSREP: Member 1(fx114_db1) responds to vote on e4e16f9c-8779-11eb-b356-c3718f5f11e0:45474182196,0000000000000000: Success
      2023-07-10  2:20:50 0 [Warning] WSREP: Received bogus VOTE message: 45474182196.0, from node cc3e6460-1ea6-11ee-88f2-4a01f1fdd917, expected > 45474389637. Ignoring.
      2023-07-10  2:24:49 0 [Note] /usr/local/libexec/mariadbd (initiated by: unknown): Normal shutdown
      2023-07-10  2:24:49 0 [Note] WSREP: Shutdown replication
      2023-07-10  2:24:49 0 [Note] WSREP: Server status change joined -> disconnecting
      

      An user noted that the following command didn't work in that state and Graceful shutdown executed on each node have no effect. Only possible way to stop the nodes is with kill -9.

      SET GLOBAL wsrep_provider_options='pc.bootstrap=YES' ;
      SET GLOBAL wsrep_provider_options="evs.evict=1de97dad-f609-11e5-8a50-ce2e621b0c42";
      

      Attachments

        Issue Links

          Activity

            allen.lee@mariadb.com Allen Lee (Inactive) created issue -
            allen.lee@mariadb.com Allen Lee (Inactive) made changes -
            Field Original Value New Value
            Summary eadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log FIRST, end_log_pos xxx, Internal MariaDB error code: 1213 Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log FIRST, end_log_pos xxx, Internal MariaDB error code: 1213
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Yurchenko Alexey made changes -
            Assignee Alexey [ yurchenko ]
            Yurchenko Alexey made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Yurchenko Alexey added a comment -

            allen.lee@mariadb.com,

            Could you please check if there are any tables which might be referencing db.tablex through foreign keys?

            Yurchenko Alexey added a comment - allen.lee@mariadb.com , Could you please check if there are any tables which might be referencing db.tablex through foreign keys?
            Yurchenko Alexey made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            julien.fritsch Julien Fritsch made changes -
            Status Stalled [ 10000 ] Needs Feedback [ 10501 ]
            julien.fritsch Julien Fritsch made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s N/A [ 14700 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Resolution Incomplete [ 4 ]
            Status Needs Feedback [ 10501 ] Closed [ 6 ]
            juan.vera Juan made changes -
            Resolution Incomplete [ 4 ]
            Status Closed [ 6 ] Stalled [ 10000 ]
            Richard Richard Stracke made changes -
            julien.fritsch Julien Fritsch made changes -
            Status Stalled [ 10000 ] Needs Feedback [ 10501 ]
            YK Yakov Kushnirsky made changes -
            Status Needs Feedback [ 10501 ] Open [ 1 ]
            julien.fritsch Julien Fritsch made changes -
            Assignee Alexey [ yurchenko ] Yakov Kushnirsky [ JIRAUSER48657 ]
            julien.fritsch Julien Fritsch made changes -
            Status Open [ 1 ] Needs Feedback [ 10501 ]

            posted DDL, variables and logs to MENT. Will delete and close when no longer needed.

            YK Yakov Kushnirsky added a comment - posted DDL, variables and logs to MENT. Will delete and close when no longer needed.
            YK Yakov Kushnirsky made changes -
            Status Needs Feedback [ 10501 ] Open [ 1 ]
            YK Yakov Kushnirsky made changes -
            Assignee Yakov Kushnirsky [ JIRAUSER48657 ] Alexey [ yurchenko ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s N/A [ 14700 ]
            julien.fritsch Julien Fritsch made changes -
            julien.fritsch Julien Fritsch made changes -
            janlindstrom Jan Lindström made changes -
            Assignee Alexey [ yurchenko ] Jan Lindström [ JIRAUSER53125 ]
            janlindstrom Jan Lindström made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            janlindstrom Jan Lindström made changes -
            Assignee Jan Lindström [ JIRAUSER53125 ] Seppo Jaakola [ seppo ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            janlindstrom Jan Lindström made changes -
            Assignee Seppo Jaakola [ seppo ] Jan Lindström [ JIRAUSER53125 ]
            janlindstrom Jan Lindström made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            janlindstrom Jan Lindström added a comment - https://github.com/MariaDB/server/pull/3315
            janlindstrom Jan Lindström made changes -
            Assignee Jan Lindström [ JIRAUSER53125 ] Marko Mäkelä [ marko ]
            Status Stalled [ 10000 ] In Review [ 10002 ]
            janlindstrom Jan Lindström added a comment - marko Review comments addressed on https://github.com/MariaDB/server/commit/9327ab46864a17b8bc66bd324a025c3d6b5292c2
            janlindstrom Jan Lindström made changes -
            Summary Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log FIRST, end_log_pos xxx, Internal MariaDB error code: 1213 Deadlock found when trying to get lock during applying
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Jan Lindström [ JIRAUSER53125 ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            janlindstrom Jan Lindström added a comment - https://github.com/MariaDB/server/pull/3315
            janlindstrom Jan Lindström made changes -
            Assignee Jan Lindström [ JIRAUSER53125 ] Julius Goryavsky [ sysprg ]
            Status Stalled [ 10000 ] In Review [ 10002 ]
            janlindstrom Jan Lindström made changes -
            sysprg Julius Goryavsky made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            sysprg Julius Goryavsky added a comment - Fix merged with head revision: https://github.com/MariaDB/server/commit/ee974ca5e0f00e928873179c5dfc2f040ab5aefd
            sysprg Julius Goryavsky made changes -
            issue.field.resolutiondate 2024-06-19 13:35:25.0 2024-06-19 13:35:24.838
            sysprg Julius Goryavsky made changes -
            Fix Version/s 10.6.19 [ 29833 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            JIraAutomate JiraAutomate made changes -
            Fix Version/s 10.11.9 [ 29834 ]
            Fix Version/s 11.1.6 [ 29835 ]
            Fix Version/s 11.2.5 [ 29836 ]
            Fix Version/s 11.4.3 [ 29837 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202047 202128 201581
            Zendesk active tickets 201581
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk active tickets 201581

            People

              sysprg Julius Goryavsky
              allen.lee@mariadb.com Allen Lee (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              13 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.