[MDEV-33275] buf_flush_LRU(): mysql_mutex_assert_owner(&buf_pool.mutex) failed Created: 2024-01-18  Updated: 2024-01-19  Resolved: 2024-01-19

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.11.3, 10.6.13, 10.8.8, 10.9.6, 10.10.4, 11.0, 11.1, 11.2, 11.3, 10.6.14, 10.6.15, 10.6.16, 10.11.4, 10.11.5, 10.11.6
Fix Version/s: 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3, 11.3.2, 11.4.1

Type: Bug Priority: Blocker
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: corruption, race, regression

Issue Links:
Problem/Incident
is caused by MDEV-26827 Make page flushing even faster Closed
Relates
relates to MDEV-33178 Random slave replication error, other... Open
relates to MDEV-33189 Server crash after reading outside of... Open
relates to MDEV-33208 InnoDB: Trying to access update undo ... Needs Feedback

 Description   

In MDEV-26827, an error was introduced in a rarely executed code path of the buf_flush_page_cleaner() thread. As a result, the function buf_flush_LRU() could be invoked while not holding buf_pool.mutex.

This may explain the failures that have been reported in MDEV-33189, MDEV-33208 and MDEV-33178. More testing is needed to be sure. I caught this bug by accident in a debug build:

mariadbd: /mariadb/10.6/storage/innobase/buf/buf0flu.cc:1787: ulint buf_flush_LRU(ulint, bool): Assertion `((&(&buf_pool.mutex)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&buf_pool.mutex)->m_mutex)->thread))' failed.

This bug can be worked around by setting innodb_adaptive_flushing=OFF.


Generated at Thu Feb 08 10:37:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.