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

InnoDB: Cannot apply log to [page id: space=152, page number=0] of corrupted file

    XMLWordPrintable

Details

    Description

      We got a recovery failure due to MDEV-24626:

      10.6 3a566de22db6990faf213f483a722645c1ad8b9e

      2021-06-23 17:19:30 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=161810155,161810155
      2021-06-23 17:19:30 0 [ERROR] InnoDB: Cannot apply log to [page id: space=152, page number=0] of corrupted file './test/H.ibd'
      2021-06-23 17:19:30 0 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[1447] with error Data structure corruption
      

      To retrieve the data (due to large redo log file, it is too large to be attached here):

      ssh sdp 'tar cjf - -C /data/Results/1624453151/Marko1/dev/shm/vardir/1624453151/163/1 data' | tar xjf -
      

      The problem is around here:

      diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc
      index 16250928845..3e602297363 100644
      --- a/storage/innobase/log/log0recv.cc
      +++ b/storage/innobase/log/log0recv.cc
      @@ -806,8 +806,10 @@ bool recv_sys_t::recover_deferred(recv_sys_t::map::iterator &p,
         recv_spaces_t::iterator it{recv_spaces.find(first.space())};
         ut_ad(it != recv_spaces.end());
       
      -  if (!first.page_no() && p->second.state == page_recv_t::RECV_WILL_NOT_READ)
      +  if (!first.page_no())
         {
      +    ut_ad(p->second.state == page_recv_t::RECV_WILL_NOT_READ ||
      +          p->second.state == page_recv_t::RECV_NOT_PROCESSED);
           mtr_t mtr;
           buf_block_t *block= recover_low(first, p, mtr, free_block);
           ut_ad(block == free_block);
      

      The state is not RECV_WILL_NOT_READ, as expected. The RECV_NOT_PROCESSED was inserted here:

      #0  recv_sys_t::add (this=0x564e77653838 <recv_sys>, page_id={m_id = 652835028992}, start_lsn=161999632, lsn=161999940, l=0x7f90f08b2d05 "8\200\030", len=9)
          at /mariadb/10.6-merge/storage/innobase/log/log0recv.cc:1974
      #1  0x0000564e7684a73e in recv_sys_t::parse (this=0x564e77653838 <recv_sys>, checkpoint_lsn=161810155, store=0x7ffe6fbb46fc, apply=true) at /mariadb/10.6-merge/storage/innobase/log/log0recv.cc:2393
      #2  0x0000564e7685b186 in recv_scan_log_recs (store=0x7ffe6fbb46fc, log_block=0x7f90f0a96000 '\245' <repeats 200 times>..., checkpoint_lsn=161810155, start_lsn=161940992, end_lsn=162006528, 
          contiguous_lsn=0x7ffe6fbb4a28, group_scanned_lsn=0x564e77f23208 <log_sys+520>) at /mariadb/10.6-merge/storage/innobase/log/log0recv.cc:3460
      #3  0x0000564e76853608 in recv_group_scan_log_recs (checkpoint_lsn=161810155, contiguous_lsn=0x7ffe6fbb4a28, last_phase=false) at /mariadb/10.6-merge/storage/innobase/log/log0recv.cc:3543
      #4  0x0000564e768520ac in recv_recovery_from_checkpoint_start (flush_lsn=41238) at /mariadb/10.6-merge/storage/innobase/log/log0recv.cc:3946
      

      Attachments

        Issue Links

          Activity

            People

              mleich Matthias Leich
              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.