Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL)
Description
As reported in MDEV-13485, the function ibuf_remove_free_page() may be called while the caller is holding several mutexes or rw-locks. Because of this, this housekeeping loop may cause performance glitches for operations that involve tables that are stored in the InnoDB system tablespace. Deadlocks are also theoretically possible.
The worst impact of all is that due to the mutexes being held, calls to log_free_check() must be skipped during this housekeeping. This means that the cyclic InnoDB redo log may be overwritten. If the system crashes during this, it would be unable to recover.
The entry point to the problematic code is ibuf_free_excess_pages(). It would make sense to call it before acquiring any mutexes or rw-locks, in any DDL operation and in any 'pessimistic' operation that involves the system tablespace.
Attachments
Issue Links
- relates to
-
MDEV-25267 Reported latching order violation in ibuf_remove_free_page()
- Closed
-
MDEV-29905 Change buffer operations fail to check for log file overflow
- Closed
-
MDEV-11634 Improve the InnoDB change buffer
- Closed
-
MDEV-13485 MTR tests fail massively with --innodb-sync-debug
- Closed
-
MDEV-14643 InnoDB: Failing assertion: !cursor->index->is_committed()
- Closed