[MDEV-18641] "Resource deadlock avoided during COMMIT" when a node leaves the group gracefully Created: 2019-02-19 Updated: 2020-09-25 Resolved: 2020-09-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera |
| Affects Version/s: | 10.3.12 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Slawomir Lisznianski | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
Ubuntu 18.04.2 LTS |
||
| Issue Links: |
|
||||||||||||
| Description |
|
I have 3 nodes in the cluster (A, B, C) and a sysbench running the OLTP write-only test connecting only to node "A". When the node "B" is being shutdown gracefully with systemctl stop mariadb the sysbench is always immediately interrupted, showing the error lines below (varying number depending on the run). Expected: sysbench to be completely unaware of node "B" leaving the group.
Sysbench invocation:
Here is what any of the other nodes report when node B exits (during the test run):
|
| Comments |
| Comment by Jan Lindström (Inactive) [ 2019-05-09 ] | |||||||||||||||||||||||||||||||
|
Let me get this clear: So you have 3 machines A,B,C, right? Sysbench is executing transactions to node A right ? When you shutdown node B, sysbench exists, right ? At that moment there could be a transaction on node A that is replicating it write set to B and C but as B is shutdown it fails. Now, it could be that sysbench is not prepared to that failure. I do not know sysbench code that well as it is not part of our codebase. | |||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2019-05-09 ] | |||||||||||||||||||||||||||||||
|
I tested this with 10.3.15 using:
That will start 3 node Galera cluster on same machine. Then I started sysbench like
And after few seconds it started shutdown the node 2 with
sysbench did not stop or report any errors. | |||||||||||||||||||||||||||||||
| Comment by Slawomir Lisznianski [ 2019-05-09 ] | |||||||||||||||||||||||||||||||
|
sysbench shouldn't be exposed or be "prepared to handle" anything happening to B or C. As far as it's concerned there are no B or C. It communicates with A's IP alone. The cluster never looses a member ungracefully. When B or C are brought down (one at a time) for maintenance, remaining set (A+B or A+C) should continue w/o any errors reported to the client talking to A. Do you agree? We can try again to reproduce (it's been a while) but I want to double-check with you that we are conceptually on the same page. This aside, do you believe that between the version we tried (10.3.12) and yours (10.3.15) a relevant patch might have been applied? Thanks! | |||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2019-05-10 ] | |||||||||||||||||||||||||||||||
|
Conceptually I tried to reproduce the problem but could not. There is number of bug fixes between those two versions but I could not find anything that would clearly effect here. | |||||||||||||||||||||||||||||||
| Comment by Oleksii Kravchenko [ 2019-05-15 ] | |||||||||||||||||||||||||||||||
|
I get the same issue on MariaDB Galera Cluster 10.1.38.
| |||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2019-05-16 ] | |||||||||||||||||||||||||||||||
|
Can you share your configuration files and error logs from all nodes. Furthermore, can you repeat this if you use --wsrep-debug=ON ? I still think this is not a bug. Let me explain. Lets assume we have write transaction on node A. In commit Galera will send writeset of this transaction to nodes B and C. | |||||||||||||||||||||||||||||||
| Comment by Slawomir Lisznianski [ 2019-06-17 ] | |||||||||||||||||||||||||||||||
|
@Jan RE. "I still think this is not a bug. Let me explain." - Let me state for the record that a similar tech (MySQL Cluster) handles it gracefully. As long as the quorum remains it shouldn't really matter if either node B or C are shutdown or crash in the middle of a commit or have a network timeout. A client talking to node A should not be exposed to a wsrep-detected error under such conditions. To recap the conditions: node A is alive and B OR C are alive during the test. The majority are fine thus client should be fine too. If what you think was true, then increasing the number of nodes in the cluster (5, 7, etc) would increase the probability of a client exposed error, which would be counter-productive towards achieving fault-tolerance. | |||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2020-08-27 ] | |||||||||||||||||||||||||||||||
|
I suggest that you use more recent version of 10.3 and Galera library 25.3.30 and try to reproduce using --wsrep-debug=1 and if problem reproduces please provide full error logs from all nodes. |