|
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.
|