[MDEV-25457] Server crashes in row_undo_mod_clust_low upon rollback of read-only transaction Created: 2021-04-19 Updated: 2021-04-21 Resolved: 2021-04-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.2.38, 10.3.29, 10.4.19, 10.5.10 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Eugene Kosov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The failure started happening in its current form after this commit:
Before the patch, the test case would fail on UPDATE with an assertion It doesn't crash on non-debug builds on my machine, but with SIGSEGV it can be just the matter of luck (unless it happens in debug-specific code of course). The patch hasn't yet been merged into higher versions, so 10.3+ aren't affected yet. |
| Comments |
| Comment by Marko Mäkelä [ 2021-04-20 ] |
|
My intuition would say that if a transaction is already in progress, START TRANSACTION or BEGIN should do one of the following:
Based on the popularity of the function trx_start_if_not_started(), I am afraid that we have to go with the second or third choice. Transactions are controlled both on the SQL layer (for the purpose of metadata locks and replication) and the InnoDB layer (ROLLBACK, durability, MVCC). kevg, please describe in detail what currently happens during the START TRANSACTION READ ONLY. Please consider also what would happen if a XA transaction would be started while an implicitly started transaction is in progress. |
| Comment by Marko Mäkelä [ 2021-04-21 ] |
|
I applied the SIGSEGV fix of the debug assertion (and the test case to exercise it) from bb-10.2-kevgs to 10.3 when merging The patch is OK to push to 10.2 too. Apparently the only issue was that the debug assertion was trying to access dict_table_t via a null pointer. |