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

Assertion oldest_lsn >= log_sys.last_checkpoint_lsn failed in log_checkpoint()

    XMLWordPrintable

    Details

      Description

      Every now and then, especially in IMPORT TABLESPACE tests, we encounter an assertion failure in log_checkpoint():

      10.5

      #7  0x000055cadaf300cb in log_checkpoint ()
          at /mariadb/10.5-MDEV-12353/storage/innobase/log/log0log.cc:1367
      1367		ut_ad(oldest_lsn >= log_sys.last_checkpoint_lsn);
      (gdb) i lo
      oldest_lsn = 93891
      flush_lsn = <optimized out>
      end_lsn = <optimized out>
      do_write = <optimized out>
      

      (gdb) p log_sys.last_checkpoint_lsn
      $1 = 93906
      (gdb) p log_sys.next_checkpoint_lsn
      $2 = 93906
      (gdb) p log_sys.last_checkpoint_lsn-oldest_lsn
      $3 = 15
      (gdb) p log_sys.lsn
      $4 = {<std::__atomic_base<unsigned long>> = {_M_i = 121116}, <No data fields>}

       

      The difference is more than the size of FILE_CHECKPOINT record, which is 12 bytes.

      If I understand it correctly, the the assertion is reporting that the previous checkpoint was too long ago, and we were not actually crash-safe. This is an indication that a log_free_check() call is missing. I do not see any call to in row0import.cc. The function row_import_for_mysql() is writing a small amount of redo log in trx_undo_assign().

      I have the feeling that this is related to either MDEV-12353 changing the redo log format, or MDEV-21534 improving the log write speed.

      One affected test is encryption.innodb-checksum-algorithm, but there probably are others.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: