[MDEV-32588] InnoDB may hang when running out of buffer pool Created: 2023-10-26 Updated: 2023-10-31 Resolved: 2023-10-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.6, 10.10, 10.11, 11.0, 11.1, 11.2 |
| Fix Version/s: | 10.6.16, 10.10.7, 10.11.6, 11.0.4, 11.1.3, 11.2.2 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | corruption, crash, hang, race, regression | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
While running performance tests with a small buffer pool, I encountered an anomaly where InnoDB would hang because of running out of buffer pool. There would be some actually clean blocks at buf_pool.flush_list.start, but these would be skipped by buf_flush_LRU_list_batch(). The buf_pool.flush_list.end is being trimmed by periodic calls to buf_pool.get_oldest_modification(). I suspect that the entire buf_pool.LRU would be skipped because of being buffer-fixed, latched, or registered in buf_pool.flush_list due to the This seems to be a 10.6 regression due to
|
| Comments |
| Comment by Marko Mäkelä [ 2023-10-26 ] | |||||||||||||||||||||||||||||||||||
|
I think that the following patch fixes this.
Before | |||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2023-10-26 ] | |||||||||||||||||||||||||||||||||||
|
In my tests on a non-debug build, the race condition that is fixed by the second hunk of the patch caused a shutdown hang as well as a
in buf_pool_t::insert_into_flush_list() during a mtr_t::commit(). |