[MDEV-28731] Race condition on log checkpoint Created: 2022-06-02 Updated: 2022-06-03 Resolved: 2022-06-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup, Storage Engine - InnoDB |
| Affects Version/s: | 10.5.3, 10.6.0, 10.5, 10.6, 10.7, 10.8, 10.9 |
| Fix Version/s: | 10.5.17, 10.6.9, 10.7.5, 10.8.4, 10.9.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | corruption, recovery, rr-profile-analyzed | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
This was found while testing
The corresponding source code is:
The assertion fails, because log_sys.flush_order_mutex is not being held, even though it is supposed to be. This could lead to incorrect log checkpoints being written, that is, invalid crash recovery or backup. The fix is simple:
The flag mtr_t::m_made_dirty will inform mtr_t::commit() to acquire the mutex. |
| Comments |
| Comment by Marko Mäkelä [ 2022-06-03 ] | |||||||||
|
Even after this fix, we got a failure on FreeBSD 13.0 that I was not able to repeat:
The failure looks like this:
The test is not encrypting the log; it is testing recovery of encrypted tables when the keys are missing. |