Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13637

InnoDB change buffer housekeeping can cause redo log overrun and possibly deadlocks

    XMLWordPrintable

Details

    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

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.