Different behaviour with 2.3 and 2.4 if it can not read first page of tablespace

Bug #1682821 reported by Shahriyar Rzayev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Confirmed
Medium
Unassigned
2.3
Confirmed
Medium
Unassigned

Bug Description

Description:
I have created a null folder under datadir and added some files there manually:

[shahriyar.rzaev@qaserver-02 null]$ ls -l
total 0
-rw-rw-r-- 1 shahriyar.rzaev shahriyar.rzaev 0 Apr 14 13:06 0x0.frm
-rw-rw-r-- 1 shahriyar.rzaev shahriyar.rzaev 0 Apr 14 13:06 0x0.ibd
-rw-rw-r-- 1 shahriyar.rzaev shahriyar.rzaev 0 Apr 14 12:51 db.opt
-rw-rw-r-- 1 shahriyar.rzaev shahriyar.rzaev 0 Apr 14 12:51 null.frm
-rw-rw-r-- 1 shahriyar.rzaev shahriyar.rzaev 0 Apr 14 12:51 null.ibd

Then tried to backup with 2.3:

/home/shahriyar.rzaev/Percona_Xtrabackups/xb_2.3/usr/local/xtrabackup/bin/xtrabackup --defaults-file=/home/shahriyar.rzaev/sandboxes/rsandbox_Percona-Server-5_6_35/master/my.sandbox.cnf --user=msandbox --password='msandbox' --target-dir=/home/shahriyar.rzaev/backup_dir/ps_5.6_master/full/2017-04-14_12-16-16 --backup --host=127.0.0.1 --port=23700

xtrabackup: Generating a list of tablespaces
InnoDB: Retry attempts for reading partial data failed.
InnoDB: Tried to read 16384 bytes at offset 0. Was only able to read 0.
2017-04-14 13:31:05 7ffff7fe0840 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: File (unknown): 'read' returned OS error 71. Cannot continue operation
2017-04-14 13:31:05 7ffff7fe0840 InnoDB: Assertion failure in thread 140737354008640 in file os0file.cc line 658
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.

(gdb) bt
+bt
#0 0x00007ffff5ce15d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff5ce2cc8 in __GI_abort () at abort.c:90
#2 0x0000000000808cb3 in os_file_handle_error_cond_exit (name=0x0, operation=0xdf8182 "read", should_exit=1, on_error_silent=0) at /home/shahriyar.rzaev/Percona_Xtrabackups/percona-xtrabackup_2.3/storage/innobase/os/os0file.cc:658
#3 0x0000000000808ce4 in os_file_handle_error (name=0x0, operation=0xdf8182 "read") at /home/shahriyar.rzaev/Percona_Xtrabackups/percona-xtrabackup_2.3/storage/innobase/os/os0file.cc:676
#4 0x000000000080a54a in os_file_read_func (file=12, buf=0x179c000, offset=0, n=16384) at /home/shahriyar.rzaev/Percona_Xtrabackups/percona-xtrabackup_2.3/storage/innobase/os/os0file.cc:2630
#5 0x00000000007eacec in fil_read_first_page (data_file=12, one_read_already=0, flags=0x7fffffffb6d8, space_id=0x7fffffffb6d0, min_flushed_lsn=0x7fffffffb6c8, max_flushed_lsn=0x7fffffffb6c8) at /home/shahriyar.rzaev/Percona_Xtrabackups/percona-xtrabackup_2.3/storage/innobase/fil/fil0fil.cc:1845
#6 0x00000000007ee622 in fil_validate_single_table_tablespace (tablename=0x1784ce8 "null/0x0", fsp=0x7fffffffb6a0) at /home/shahriyar.rzaev/Percona_Xtrabackups/percona-xtrabackup_2.3/storage/innobase/fil/fil0fil.cc:4118
#7 0x00000000007eeb60 in fil_load_single_table_tablespace (dbname=0x7fffffffb790 "null", filename=0x7fffffffc760 "0x0.ibd") at /home/shahriyar.rzaev/Percona_Xtrabackups/percona-xtrabackup_2.3/storage/innobase/fil/fil0fil.cc:4289
#8 0x00000000007ef4b6 in fil_load_single_table_tablespaces (pred=0x610c6f <xb_check_if_open_tablespace(char const*, char const*)>) at /home/shahriyar.rzaev/Percona_Xtrabackups/percona-xtrabackup_2.3/storage/innobase/fil/fil0fil.cc:4715
#9 0x0000000000610e8c in xb_load_tablespaces () at /home/shahriyar.rzaev/Percona_Xtrabackups/percona-xtrabackup_2.3/storage/innobase/xtrabackup/src/xtrabackup.cc:3317
#10 0x0000000000612b7b in xtrabackup_backup_func () at /home/shahriyar.rzaev/Percona_Xtrabackups/percona-xtrabackup_2.3/storage/innobase/xtrabackup/src/xtrabackup.cc:4231
#11 0x00000000006198c1 in main (argc=8, argv=0x7fffffffe088) at /home/shahriyar.rzaev/Percona_Xtrabackups/percona-xtrabackup_2.3/storage/innobase/xtrabackup/src/xtrabackup.cc:7380

With 2.4:

InnoDB: Number of pools: 1
170414 13:25:32 >> log scanned up to (40981675)
xtrabackup: Generating a list of tablespaces
InnoDB: Cannot read first page of './null/0x0.ibd' I/O error
InnoDB: Cannot read first page in datafile: ./null/0x0.ibd, Space ID:18446744073709551615, Flags: 0. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
InnoDB: Cannot read first page of './null/null.ibd' I/O error
InnoDB: Cannot read first page in datafile: ./null/null.ibd, Space ID:18446744073709551615, Flags: 0. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
InnoDB: Allocated tablespace ID 1 for mysql/innodb_table_stats, old maximum was 0
InnoDB: Cannot read first page of './root_owned/t1.ibd' I/O error

Tags: qa
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-787

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.