[MDEV-28043] Race condition between mtr_t::commit() and checkpoint Created: 2022-03-11 Updated: 2022-03-17 Resolved: 2022-03-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | N/A |
| Fix Version/s: | 10.9.0, 10.8.3 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | corruption, race, recovery, rr-profile-analyzed | ||
| Environment: |
GNU/Linux with mmap() based redo log on /dev/shm |
||
| Issue Links: |
|
||||||||
| Description |
|
When
It is not safe to release the exclusive log_sys.latch between finish_write() and ReleaseBlocks. Because we have no portable operation that would downgrade the latch from exclusive to shared, we must retain that exclusive latch until the end of the critical section in mtr_t::commit(). I debugged an rr replay trace of this:
From the end of the start, we have Thread 3 hitting an assertion failure:
Before that, we had Thread 24 inserting the unexpectedly old block to buf_pool.flush_list, and before that, Thread 3 updating the checkpoint LSN to the too new value. |
| Comments |
| Comment by Matthias Leich [ 2022-03-14 ] |
|
origin/bb-10.8- |