Crash on prepare partial backup with 5.6-based xtrabackup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
High
|
Sergei Glushchenko | ||
2.0 |
Invalid
|
Undecided
|
Unassigned | ||
2.1 |
Fix Released
|
High
|
Sergei Glushchenko | ||
2.2 |
Fix Released
|
High
|
Sergei Glushchenko |
Bug Description
Xtrabackup crashes when trying to remove absent table from InnoDB data
dictionary.
2014-07-04 18:11:07 7ffff7fe9720 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
InnoDB: Could not find a valid tablespace file for 'raptor/
InnoDB: It will be removed from the data dictionary.
QUERY PLAN FOR A SELECT NODE
Asc. search; sets row s-locks;
Table index "CLUST_IND" of table "SYS_TABLES"; exact m. 1, match 1, end conds 1
QUERY PLAN FOR A SELECT NODE
Asc. search; sets row s-locks;
Table index "CLUST_IND" of table "SYS_TABLES"; exact m. 1, match 1, end conds 1
2014-07-04 18:11:07 7ffff7fe9720 InnoDB: Error: page 14372 log sequence number 799059998470
InnoDB: is in the future! Current system log sequence number 798405234718.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://
InnoDB: for more information.
QUERY PLAN FOR A SELECT NODE
Asc. search; sets row s-locks;
Table index "FOR_IND" of table "SYS_FOREIGN"; exact m. 1, match 1, end conds 1
QUERY PLAN FOR A SELECT NODE
Asc. search; sets row s-locks;
Table index "ID_IND" of table "SYS_FOREIGN_COLS"; exact m. 1, match 1, end conds 1
QUERY PLAN FOR A SELECT NODE
Asc. search; sets row s-locks;
Table index "ID_IND" of table "SYS_FOREIGN"; exact m. 1, match 1, end conds 1
QUERY PLAN FOR A SELECT NODE
Asc. search; sets row s-locks;
Table index "CLUST_IND" of table "SYS_INDEXES"; exact m. 1, match 1, end conds 1
QUERY PLAN FOR A SELECT NODE
Asc. search; sets row s-locks;
Table index "CLUST_IND" of table "SYS_FIELDS"; exact m. 1, match 1, end conds 1
QUERY PLAN FOR A SELECT NODE
Asc. search; sets row s-locks;
Table index "CLUST_IND" of table "SYS_INDEXES"; exact m. 2, match 2, end conds 2
QUERY PLAN FOR A SELECT NODE
Asc. search; sets row s-locks;
Table index "CLUST_IND" of table "SYS_COLUMNS"; exact m. 1, match 1, end conds 1
QUERY PLAN FOR A SELECT NODE
Asc. search; sets row s-locks;
Table index "ID_IND" of table "SYS_TABLES"; exact m. 1, match 1, end conds 1
^C
Program received signal SIGINT, Interrupt.
pthread_
162 ../nptl/
in ../nptl/
(gdb) bt
#0 pthread_
#1 0x0000000000489217 in os_cond_wait (cond=0x15e81a0, fast_mutex=
at /home/vagrant/
#2 0x0000000000489791 in os_event_wait_low (event=0x15e8160, reset_sig_count=1)
at /home/vagrant/
#3 0x000000000050eed8 in sync_array_
at /home/vagrant/
#4 0x0000000000548fc6 in rw_lock_s_lock_spin (lock=0x7fffef4
file_
at /home/vagrant/
#5 0x00000000004b75a6 in rw_lock_s_lock_func (lock=0x7fffef4
file_
at /home/vagrant/
#6 0x00000000004b7c93 in pfs_rw_
file_
at /home/vagrant/
#7 0x00000000004c0f27 in buf_page_get_gen (space=0, zip_size=0, offset=478, rw_latch=1, guess=0x0, mode=10,
file=0xd91bd8 "/home/
mtr=
#8 0x00000000009ef35e in trx_undo_
at /home/vagrant/
#9 0x00000000009f2787 in trx_undo_
at /home/vagrant/
#10 0x00000000009f2846 in trx_undo_
at /home/vagrant/
#11 0x00000000009f2a3e in trx_undo_
index_
heap=0x1989690, old_vers=
at /home/vagrant/
#12 0x0000000000a0b632 in row_vers_
clust_
rec=
index=
at /home/vagrant/
#13 0x0000000000a0b9fa in row_vers_
rec=
index=
at /home/vagrant/
#14 0x000000000050054c in lock_sec_
rec=
index=
at /home/vagrant/
---Type <return> to continue, or q <return> to quit---
#15 0x000000000050afa8 in lock_rec_
rec=
index=
at /home/vagrant/
#16 0x000000000050b980 in lock_sec_
rec=
index=
at /home/vagrant/
#17 0x00000000009c9ad0 in sel_set_rec_lock (block=
rec=
index=
at /home/vagrant/
#18 0x00000000009ca99c in row_sel (node=0x1976998, thr=0x1981238)
at /home/vagrant/
#19 0x00000000009cb7e9 in row_sel_step (thr=0x1981238)
at /home/vagrant/
#20 0x000000000061116b in que_thr_step (thr=0x1981238)
at /home/vagrant/
#21 0x00000000006114aa in que_run_threads_low (thr=0x1981238)
at /home/vagrant/
#22 0x0000000000611674 in que_run_threads (thr=0x1981238)
at /home/vagrant/
#23 0x00000000006118da in que_eval_sql (info=0x1972658,
sql=0xccb430 "PROCEDURE DROP_TABLE_PROC () IS\nsys_foreign_id CHAR;\ntable_id CHAR;\nindex_id CHAR;\nforeign_id CHAR;\nfound INT;\nBEGIN\nSELECT ID INTO table_id\nFROM SYS_TABLES\nWHERE NAME = :table_name\nLOCK IN SHARE MODE"...,
reserve_
at /home/vagrant/
#24 0x000000000059fe62 in fil_remove_
at /home/vagrant/
#25 0x00000000005a0327 in fil_open_
tablename=
at /home/vagrant/
#26 0x00000000004930a1 in dict_load_table (name=0x19687f0 "raptor/
ignore_
at /home/vagrant/
#27 0x000000000049377d in dict_load_
at /home/vagrant/
#28 0x00000000005aa24a in dict_table_
at /home/vagrant/
#29 0x00000000005ab477 in dict_table_
at /home/vagrant/
#30 0x000000000061d99f in trx_resurrect_
---Type <return> to continue, or q <return> to quit---
at /home/vagrant/
#31 0x000000000061e17e in trx_lists_
at /home/vagrant/
#32 0x0000000000665c8b in trx_sys_
at /home/vagrant/
#33 0x0000000000687430 in innobase_
at /home/vagrant/
#34 0x0000000000450bb8 in innodb_init () at xtrabackup.cc:1438
#35 0x00000000004584dc in xtrabackup_
#36 0x0000000000459979 in main (argc=0, argv=0x15d02d8) at xtrabackup.cc:6035
(gdb)
Related branches
- Alexey Kopytov (community): Approve
-
Diff: 425 lines (+81/-43)2 files modifiedpatches/innodb56.patch (+46/-43)
test/t/bug1340717.sh (+35/-0)
- Alexey Kopytov (community): Approve
-
Diff: 71 lines (+40/-2)2 files modifiedstorage/innobase/fil/fil0fil.cc (+5/-2)
storage/innobase/xtrabackup/test/t/bug1340717.sh (+35/-0)
tags: | added: i44002 |
tags: | added: i44398 |
tags: | added: i44478 |
tags: | removed: i44478 |
Xtrabackup crashed while tried to delete unused tables. purge_sys if not initialized. Seems to be specific to innodb56. Related parts of code: init_at_ db_start invoked before trx_purge_ sys_create: init_at_ db_start( ); GET_LEN( trx_sys- >rw_trx_ list); sys_create( srv_n_purge_ threads, ib_bh); init_at_ db_start invokes trx_resurrect_ table_locks, which has been introduced in MySQL 5.6 (revno: 5045). Purpose of trx_resurrect_ table_locks to be discovered.
trx_sys_
comment from srv0start.cc:
ib_bh = trx_sys_
n_recovered_trx = UT_LIST_
/* The purge system needs to create the purge view and
therefore requires that the trx_sys is inited. */
trx_purge_
At the same time trx_lists_