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

Mariabackup --prepare --incremental sets file size incorrectly

    XMLWordPrintable

Details

    • 10.2.10

    Description

      In Mariabackup --prepare --incremental, the file sizes are not being set correctly. Non-incremental restore (and InnoDB crash recovery) was fixed by me in MDEV-11556.
      Percona Xtrabackup (as well as Oracle’s backup product) work around this problem by silently extending files when applying redo log records.

      This has been witnessed once with the original test that was supplied to MDEV-13807.
      The committed version of the test inserts fewer records and might not repeat this.

      An excerpt from the buildbot log:

      InnoDB: Starting final batch to recover 5 pages from redo log
       
      xtrabackup: starting shutdown with innodb_fast_shutdown = 1
      InnoDB: Starting shutdown...
      InnoDB: Some resources were not cleaned up in shutdown: threads 0, events 18, os_mutexes 16, os_fast_mutexes 34
      InnoDB: Shutdown completed; log sequence number 1632600
      170915 23:51:29 completed OK!
      D:/win32-debug/build/extra/mariabackup/Debug/mariabackup.exe based on MariaDB server 10.1.27-MariaDB Win32 (AMD64) 
      incremental backup from 1629454 is enabled.
      xtrabackup: cd to D:\win32-debug\build\mysql-test\var\2\tmp\backup\
      xtrabackup: This target seems to be already prepared with --apply-log-only.
      xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(9560649)
      xtrabackup: using the following InnoDB configuration for recovery:
      xtrabackup:   innodb_data_home_dir = .\
      xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
      xtrabackup:   innodb_log_group_home_dir = D:\win32-debug\build\mysql-test\var\2\tmp\backup_inc1\
      xtrabackup:   innodb_log_files_in_group = 1
      xtrabackup:   innodb_log_file_size = 2097152
      InnoDB: Completed initialization of buffer pool
      abort() has been called170915 23:51:31 [ERROR] mysqld got exception 0x80000003 ;
      This could be because you hit a bug. It is also possible that this binary
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      mariabackup.exe!my_sigabrt_handler()[my_thr_init.c:488]
      mariabackup.exe!raise()[signal.cpp:516]
      mariabackup.exe!abort()[abort.cpp:64]
      mariabackup.exe!ib_logf()[ha_innodb.cc:21967]
      mariabackup.exe!fil_report_invalid_page_access()[fil0fil.cc:6102]
      mariabackup.exe!_fil_io()[fil0fil.cc:6335]
      mariabackup.exe!buf_read_page_low()[buf0rea.cc:250]
      mariabackup.exe!buf_read_recv_pages()[buf0rea.cc:1105]
      mariabackup.exe!recv_read_in_area()[log0recv.cc:1857]
      mariabackup.exe!recv_apply_hashed_log_recs()[log0recv.cc:1929]
      mariabackup.exe!innobase_start_or_create_for_mysql()[srv0start.cc:2661]
      mariabackup.exe!innodb_init()[xtrabackup.cc:1735]
      mariabackup.exe!xtrabackup_prepare_func()[xtrabackup.cc:5789]
      mariabackup.exe!main()[xtrabackup.cc:6665]
      mariabackup.exe!invoke_main()[exe_common.inl:64]
      mariabackup.exe!__scrt_common_main_seh()[exe_common.inl:259]
      mariabackup.exe!__scrt_common_main()[exe_common.inl:302]
      mariabackup.exe!mainCRTStartup()[exe_main.cpp:17]
      KERNEL32.DLL!BaseThreadInitThunk()
      ntdll.dll!RtlInitializeExceptionChain()
      ntdll.dll!RtlInitializeExceptionChain()
      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      information that should help you find out what is causing the crash.
      mysqltest: At line 33: exec of 'D:/win32-debug/build/extra/mariabackup/Debug/mariabackup.exe --prepare --apply-log-only --target-dir=D:/win32-debug/build/mysql-test/var/2/tmp/backup --incremental-dir=D:/win32-debug/build/mysql-test/var/2/tmp/backup_inc1 ' failed, error: 255, status: 255, errno: 2
      Output from before failure:
      # expect NOT FOUND
       
       
       
      The result from queries just before the failure was:
      call mtr.add_suppression("InnoDB: New log files created");
      CREATE TABLE t(a varchar(60)) ENGINE INNODB;
      start transaction;
      INSERT INTO t VALUES(1);
      start transaction;
      INSERT INTO t select uuid() from seq_1_to_100000;
      NOT FOUND /Rollback of trx with id / in current_test 
      # expect NOT FOUND
      

      This reveals another problem (MDEV-13821) that is unique to Mariabackup 10.1: the messages from the ib_logf() call is lost. In Mariabackup 10.2, all ib::logger output is visible.
      The problem is obvious from the message that fil_report_invalid_page_access() was trying to display.

      Mariabackup 10.2 uses the same logic for restoring incremental backups. That bug is present in Mariabackup 10.2 as well.

      Attachments

        Issue Links

          Activity

            People

              wlad Vladislav Vaintroub
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.