[MDEV-15443] Invalid wsrep XID or binlog position read from the rollback segment Created: 2018-03-01 Updated: 2018-03-07 Resolved: 2018-03-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera, Storage Engine - InnoDB |
| Affects Version/s: | 10.3.5 |
| Fix Version/s: | 10.3.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Teemu Ollakka | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The XID may not be read correctly from rollback segment header in the case if the rollback segment containing the highest trx id was not written by wsrep thread. For example, running the following MTR test in galera test suite will demonstrate the problem:
When the node_2 is started at the end of the test, the rollback segment wsrep seqnos look like the following (zero seqno means invalid wsrep XID):
The rest of the rsegs haven't been written into (have trx_id: 0). Now, the function
reads the XID from the rseg with highest trx id:
In the example dump above the highest trx id is in rseg 5, which does not contain a valid wsrep XID. As a result,
overwrites the previously found XID with zeroes and XID with all zeros is returned from this call. This leads to the following error
Expected result: Affects only 10.3, the test passes with 10.2. |
| Comments |
| Comment by Teemu Ollakka [ 2018-03-01 ] |
|
Submitted a pull request for the test case and a potential fix.in https://github.com/MariaDB/server/pull/633. |
| Comment by Thirunarayanan Balathandayuthapani [ 2018-03-04 ] |
|
marko Please review the patch https://github.com/MariaDB/server/commit/e7fd141786daae620693351b17e1f7d0b644c334 |
| Comment by Marko Mäkelä [ 2018-03-06 ] |
|
I developed a patch that is based on code submitted by teemu.ollakka and thiru. |