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

Assertion 'space->free_limit == 0 || space->free_limit == free_limit'

    Details

      Description

      The following assertion could fail during InnoDB crash recovery or mariabackup --prepare if data files with unflushed changes were closed by fil_system->LRU and later reopened due to pending I/O:

      10.2 bb4f4b3a1b6c9287fcef6a6d290fd228e8a181f1

      mariabackup: /mariadb/10.2/storage/innobase/fil/fil0fil.cc:582: bool fil_node_t::read_page0(bool): Assertion `space->free_limit == 0 || space->free_limit == free_limit' failed.
      

      It is possible that this has been broken ever since MariaDB 10.2.2, which incorporated the InnoDB changes from MySQL 5.7.9. The fil_space_t fields are a recent addition.

      The problem is that the function fil_node_t::read_page0() is replacing the up-to-date metadata with an old version of page 0 that is being reread from the file. A more up-to-date page 0 still exists in the buffer pool, not flushed yet.

      This crash was initially reported in MDEV-19346 with a nondeterministic test case, but it should be unrelated to the original topic of MDEV-19346.

      In MDEV-16526, perhaps we could make it so that before files are closed, an attempt to write back any unflushed changes will be performed.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: