[MDEV-21845] InnoDB: Failing assertion: index->space == page_get_space_id(page) upon startup after restoring incremental backup Created: 2020-02-29  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: mariabackup, Storage Engine - InnoDB
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Marko Mäkelä
Resolution: Unresolved Votes: 1
Labels: None

Attachments: File mbackup_backup_0.log     File mbackup_backup_1.log     File mbackup_backup_2.log     File mbackup_backup_3.log     File mbackup_backup_4.log     File mbackup_backup_5.log     File mbackup_backup_6.log     File mbackup_backup_7.log     File mdev21845-backup0.tar.gz     File mdev21845-backup1.tar.gz     File mdev21845-backup2.tar.gz     File mdev21845-backup3.tar.gz     File mdev21845-backup4.tar.gz     File mdev21845-backup5.tar.gz     File mdev21845-backup6.tar.gz     File mdev21845-backup7.tar.gz    

 Description   

10.2 8382f106

2020-02-29 19:42:06 0x7f476c769700  InnoDB: Assertion failure in file /data/src/10.2/storage/innobase/btr/btr0btr.cc line 4746
InnoDB: Failing assertion: index->space == page_get_space_id(page)
 
#3  <signal handler called>
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#5  0x00007f476f95d42a in __GI_abort () at abort.c:89
#6  0x000055ca1d8140e4 in ut_dbg_assertion_failed (expr=0x55ca1ddf6008 "index->space == page_get_space_id(page)", file=0x55ca1ddf3d28 "/data/src/10.2/storage/innobase/btr/btr0btr.cc", line=4746) at /data/src/10.2/storage/innobase/ut/ut0dbg.cc:60
#7  0x000055ca1d82996e in btr_validate_level (index=0x7f46cc027870, trx=0x7f476d5ce140, level=1, lockout=false) at /data/src/10.2/storage/innobase/btr/btr0btr.cc:4746
#8  0x000055ca1d82b4af in btr_validate_index (index=0x7f46cc027870, trx=0x7f476d5ce140, lockout=false) at /data/src/10.2/storage/innobase/btr/btr0btr.cc:5233
#9  0x000055ca1d6162ee in ha_innobase::check (this=0x7f46cc01de38, thd=0x7f46cc000af0, check_opt=0x7f46cc005600) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:15044
#10 0x000055ca1d411bab in handler::ha_check (this=0x7f46cc01de38, thd=0x7f46cc000af0, check_opt=0x7f46cc005600) at /data/src/10.2/sql/handler.cc:4102
#11 0x000055ca1d2e9e7a in mysql_admin_table(THD *, TABLE_LIST *, HA_CHECK_OPT *, const char *, thr_lock_type, bool, bool, uint, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *), struct {...}, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *)) (thd=0x7f46cc000af0, tables=0x7f46cc0111a0, check_opt=0x7f46cc005600, operator_name=0x55ca1dc44ce4 "check", lock_type=TL_READ_NO_INSERT, org_open_for_modify=false, repair_table_use_frm=false, extra_open_options=32, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x55ca1d411a86 <handler::ha_check(THD*, st_ha_check_opt*)>, view_operator_func=0x55ca1d284ac8 <view_check(THD*, TABLE_LIST*, st_ha_check_opt*)>) at /data/src/10.2/sql/sql_admin.cc:803
#12 0x000055ca1d2ebfc2 in Sql_cmd_check_table::execute (this=0x7f46cc0117b8, thd=0x7f46cc000af0) at /data/src/10.2/sql/sql_admin.cc:1341
#13 0x000055ca1d190d3d in mysql_execute_command (thd=0x7f46cc000af0) at /data/src/10.2/sql/sql_parse.cc:5971
#14 0x000055ca1d195e26 in mysql_parse (thd=0x7f46cc000af0, rawbuf=0x7f46cc0110b8 "CHECK TABLE test.t7 EXTENDED", length=28, parser_state=0x7f476c768250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7739
#15 0x000055ca1d18417f in dispatch_command (command=COM_QUERY, thd=0x7f46cc000af0, packet=0x7f46cc0191a1 "", packet_length=28, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1831
#16 0x000055ca1d182ad3 in do_command (thd=0x7f46cc000af0) at /data/src/10.2/sql/sql_parse.cc:1384
#17 0x000055ca1d2d7b0f in do_handle_one_connection (connect=0x55ca260b4f30) at /data/src/10.2/sql/sql_connect.cc:1336
#18 0x000055ca1d2d787a in handle_one_connection (arg=0x55ca260b4f30) at /data/src/10.2/sql/sql_connect.cc:1241
#19 0x00007f47718dd4a4 in start_thread (arg=0x7f476c769700) at pthread_create.c:456
#20 0x00007f476fa11d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

To reproduce:

  • download and extract the attached mdev21845-backupX.tar.gz files, it will create backup_before_prepare_X with the corresponding X;
  • with mariabackup from 10.2, run

    bin/mariabackup --prepare --apply-log-only --target-dir=`pwd`/backup_before_prepare_0 
    bin/mariabackup --prepare --apply-log-only --target-dir=`pwd`/backup_before_prepare_0 --incremental-dir=`pwd`/backup_before_prepare_1
    bin/mariabackup --prepare --apply-log-only --target-dir=`pwd`/backup_before_prepare_0 --incremental-dir=`pwd`/backup_before_prepare_2
    bin/mariabackup --prepare --apply-log-only --target-dir=`pwd`/backup_before_prepare_0 --incremental-dir=`pwd`/backup_before_prepare_3
    bin/mariabackup --prepare --apply-log-only --target-dir=`pwd`/backup_before_prepare_0 --incremental-dir=`pwd`/backup_before_prepare_4
    bin/mariabackup --prepare --apply-log-only --target-dir=`pwd`/backup_before_prepare_0 --incremental-dir=`pwd`/backup_before_prepare_5
    bin/mariabackup --prepare --apply-log-only --target-dir=`pwd`/backup_before_prepare_0 --incremental-dir=`pwd`/backup_before_prepare_6
    bin/mariabackup --prepare --apply-log-only --target-dir=`pwd`/backup_before_prepare_0 --incremental-dir=`pwd`/backup_before_prepare_7
    

  • start the server with

    --innodb-compression-algorithm=none --innodb-page-size=4K --innodb-buffer-pool-size=512M --datadir=`pwd`/backup_before_prepare_0
    

  • execute

    CHECK TABLE test.t7 EXTENDED;
    

MariaBackup logs from creation of the first full backup and further incremental backups are attached.
The backups were created on a 10.2-based tree. The assertion failure after restoring these backups is reproducible on 10.2-10.5.


Generated at Thu Feb 08 09:10:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.