Failing assertion: block->page.space == page_get_space_id(page_align(ptr))
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
New
|
Undecided
|
Unassigned | ||
MySQL Server |
Unknown
|
Unknown
|
|||
Percona Server moved to https://jira.percona.com/projects/PS |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Also filed as http://
Stack trace with XtraDB:
Percona XtraDB (http://
InnoDB: Assertion failure in thread 140213844621056 in file buf0buf.c line 2317
InnoDB: Failing assertion: block->page.space == page_get_
#5 0x00007f86239eeb0b in __GI_abort () at abort.c:92
#6 0x0000000000ae1dc2 in buf_block_
#7 0x0000000000ae1e81 in buf_block_align (ptr=0x7f8618c14000 "") at storage/
#8 0x0000000000b8fa2b in mtr_memo_
#9 0x0000000000b55951 in ibuf_bitmap_
#10 0x0000000000b5cec9 in ibuf_merge_
#11 0x0000000000ae6490 in buf_page_
#12 0x0000000000afae83 in buf_read_page_low (err=0x7f861466
#13 0x0000000000afb33e in buf_read_page (space=10, zip_size=0, offset=3, trx=0x0) at storage/
#14 0x0000000000ae26dd in buf_page_get_gen (space=10, zip_size=0, offset=3, rw_latch=3, guess=0x0, mode=10, file=0xe1d978 "storage/
#15 0x0000000000ac2794 in btr_cur_
#16 0x0000000000a52c6e in btr_pcur_
#17 0x0000000000a5a608 in row_search_
#18 0x0000000000a18e45 in ha_innobase:
#19 0x0000000000a19a84 in ha_innobase:
#20 0x0000000000a19c6c in ha_innobase:
#21 0x00000000005a73b4 in handler:
#22 0x00000000008e0d5f in rr_sequential (info=0x3c4da70) at sql/records.cc:452
#23 0x00000000006653fc in join_init_
#24 0x0000000000663538 in sub_select (join=0x3c4c9e0, join_tab=0x3c4d9c0, end_of_
#25 0x0000000000662e4b in do_select (join=0x3c4c9e0, fields=0x3b4b910, table=0x0, procedure=0x0) at sql/sql_
#26 0x0000000000643831 in JOIN::exec (this=0x3c4c9e0) at sql/sql_
#27 0x000000000064402d in mysql_select (thd=0x3b48da0, rref_pointer_
#28 0x000000000063ac15 in handle_select (thd=0x3b48da0, lex=0x3b4b078, result=0x3c4c9c0, setup_tables_
#29 0x0000000000613ee5 in execute_
#30 0x000000000060ca2a in mysql_execute_
#31 0x000000000061674d in mysql_parse (thd=0x3b48da0, rawbuf=0x3c4c168 "SELECT * FROM t1", length=16, parser_
#32 0x0000000000609fc3 in dispatch_command (command=COM_QUERY, thd=0x3b48da0, packet=0x3c44951 "", packet_length=16) at sql/sql_
#33 0x000000000060927a in do_command (thd=0x3b48da0) at sql/sql_
#34 0x000000000070a69f in do_handle_
#35 0x000000000070a08a in handle_
#36 0x0000000000bffcbf in pfs_spawn_thread (arg=0x3cbf360) at storage/
#37 0x00007f8624725efc in start_thread (arg=0x7f861466
Stack trace with InnoDB plugin:
InnoDB: 1.1.8 started
InnoDB: Assertion failure in thread 139991125931776 in file buf0buf.c line 2080
InnoDB: Failing assertion: block->page.space == page_get_
#3 <signal handler called>
#4 0x00007f5249d4c3a5 in __GI_raise (sig=6) at ../nptl/
#5 0x00007f5249d4fb0b in __GI_abort () at abort.c:92
#6 0x00007f523f036e62 in buf_block_
#7 0x00007f523f036f21 in buf_block_align (ptr=0x7f523ecc8000 "") at storage/
#8 0x00007f523f0d72db in mtr_memo_
#9 0x00007f523f09ba34 in ibuf_bitmap_
#10 0x00007f523f0a2f6b in ibuf_merge_
#11 0x00007f523f03aef0 in buf_page_
#12 0x00007f523f04dbc8 in buf_read_page_low (err=0x7f523955
#13 0x00007f523f04e0f2 in buf_read_page (space=1, zip_size=0, offset=3) at storage/
#14 0x00007f523f0375b4 in buf_page_get_gen (space=1, zip_size=0, offset=3, rw_latch=3, guess=0x0, mode=10, file=0x7f523f208828 "storage/
#15 0x00007f523f015c7c in btr_cur_
#16 0x00007f523f1581bd in btr_pcur_
#17 0x00007f523f15f1fe in row_search_
#18 0x00007f523f10dbe6 in ha_innodb:
#19 0x00007f523f10e71c in ha_innodb:
#20 0x00007f523f10e904 in ha_innodb::rnd_next (this=0x4541428, buf=0x4549338 "\377") at storage/
#21 0x00000000005a73b4 in handler:
#22 0x00000000008e0d5f in rr_sequential (info=0x43eb000) at sql/records.cc:452
#23 0x00000000006653fc in join_init_
#24 0x0000000000663538 in sub_select (join=0x43e9f70, join_tab=0x43eaf50, end_of_
#25 0x0000000000662e4b in do_select (join=0x43e9f70, fields=0x42ea620, table=0x0, procedure=0x0) at sql/sql_
#26 0x0000000000643831 in JOIN::exec (this=0x43e9f70) at sql/sql_
#27 0x000000000064402d in mysql_select (thd=0x42e7ab0, rref_pointer_
#28 0x000000000063ac15 in handle_select (thd=0x42e7ab0, lex=0x42e9d88, result=0x43e9f50, setup_tables_
#29 0x0000000000613ee5 in execute_
#30 0x000000000060ca2a in mysql_execute_
#31 0x000000000061674d in mysql_parse (thd=0x42e7ab0, rawbuf=0x43e96f8 "SELECT * FROM t1", length=16, parser_
#32 0x0000000000609fc3 in dispatch_command (command=COM_QUERY, thd=0x42e7ab0, packet=0x43e2fc1 "", packet_length=16) at sql/sql_
#33 0x000000000060927a in do_command (thd=0x42e7ab0) at sql/sql_
#34 0x000000000070a69f in do_handle_
#35 0x000000000070a08a in handle_
#36 0x0000000000bffcbf in pfs_spawn_thread (arg=0x455c9d0) at storage/
#37 0x00007f524aa86efc in start_thread (arg=0x7f523955
#38 0x00007f5249df959d in clone () at ../sysdeps/
Some pointers may be invalid and cause the dump to abort.
Query (0x2e0ed48): SELECT * FROM t1
Connection ID (thread ID): 2
Status: NOT_KILLED
maria/5.5
bzr version-info
revision-id: <email address hidden>
date: 2012-06-24 09:10:11 -0700
revno: 3458
Also reproducible on Percona server
bzr version-info
revision-id: <email address hidden>
date: 2012-06-21 14:36:22 +0200
build-date: 2012-06-25 01:46:37 +0400
revno: 270
# Test case:
# (sometimes it takes a couple of attempts)
--source include/
SET GLOBAL innodb_
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
--let $datadir = `SELECT @@datadir`
--copy_file $datadir/
ALTER TABLE t1 DISCARD TABLESPACE;
--error ER_GET_ERRNO
SELECT * FROM t1;
--move_file $datadir/
ALTER TABLE t1 IMPORT TABLESPACE;
SELECT * FROM t1;
DROP TABLE t1;
# End of test case
description: | updated |
description: | updated |
summary: |
- Failing assertion: index->id == btr_page_get_index_id(page) in - btr0cur.c:865 + Failing assertion: block->page.space == + page_get_space_id(page_align(ptr)) |
This is not a bug as the backup of the ibd file is probably not clean (the test case doesn't ensure it).
Quoting from manual ( http:// dev.mysql. com/doc/ mysql-enterpris e-backup/ 3.5/en/ partial. restoring. single. html ):
If you have a *clean* backup of an .ibd file, you can restore it to the MySQL installation from which it originated as follows:
In this context, a clean.ibd file backup means:
There are no uncommitted modifications by transactions in the .ibd file.
There are no unmerged insert buffer entries in the .ibd file.
Purge has removed all delete-marked index records from the .ibd file.
mysqld has flushed all modified pages of the .ibd file from the buffer pool to the file.
You can make such a clean backup .ibd file with the following method:
Stop all activity from the mysqld server and commit all transactions.
Wait until SHOW INNODB STATUS shows that there are no active transactions in the database, and the main thread status of InnoDB is Waiting for server activity. Then you can make a copy of the .ibd file.
Another method for making a clean copy of an .ibd file is to use ibbackup:
Use ibbackup to back up the InnoDB installation.
Run ibbackup --apply-log to create a consistent version of the backup database.
Start a second (dummy) mysqld server on the backup and let it clean up the .ibd files in the backup. Wait for the cleanup to end.
Shut down the dummy mysqld server.
Take a clean .ibd file from the backup.