InnoDB with shm buffer pool crashes after recovery
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
High
|
Unassigned |
Bug Description
I do next steps:
- kill mysqld;
- remove shm segment
- start mysqld ( it creates new shm segment)
- InnoDB performs recovery
when recovery finished and we start load on server , InnoDB crashes.
There is bt from gdb and core file.
I have core file and binary.
Thread 1 (Thread 10616):
#0 mem_heap_
file_
#1 0x0000000000707a36 in mem_heap_add_block (heap=0x2acb641
#2 0x0000000000707db8 in mem_heap_alloc (heap=0x8, data=0x2ac65e4c
#3 mem_heap_dup (heap=0x8, data=0x2ac65e4c
#4 0x000000000075544e in trx_undo_rec_copy (roll_ptr=..., heap=0x2acb641b
#5 trx_undo_
#6 0x00000000007554da in trx_undo_
at trx/trx0rec.c:1398
#7 0x00000000007573ce in trx_undo_
index_
offsets=
#8 0x000000000074741b in row_vers_
mtr=0x599f1a00, index=0x2acb680
in_
#9 0x000000000073e821 in row_search_
prebuilt=
#10 0x00000000006e5165 in ha_innobase:
buf=
find_
#11 0x0000000000656ee9 in handler:
buf=
key=
#12 0x00000000005e2897 in join_read_const (tab=0x2acb1f0e
#13 0x00000000005eb9dd in join_read_
#14 0x00000000005ec3f6 in make_join_
---Type <return> to continue, or q <return> to quit---
keyuse_
#15 0x00000000005ede07 in JOIN::optimize (this=0x2acb1f0
#16 0x00000000005f7101 in mysql_select (thd=0x2acb6804
wild_num=0, fields=..., conds=0x2acb1f0
select_
#17 0x00000000005f7b55 in handle_select (thd=0x2acb6804
setup_
#18 0x00000000005864b1 in execute_
#19 0x0000000000589721 in mysql_execute_
#20 0x0000000000603520 in Prepared_
open_
#21 0x00000000006056f4 in Prepared_
packet=<value optimized out>, packet_end=<value optimized out>) at sql_prepare.cc:3554
#22 0x0000000000605a09 in mysqld_stmt_execute (thd=0x2acb6804
packet_
#23 0x000000000058fc61 in dispatch_command (command=
packet=
#24 0x0000000000590e30 in do_command (thd=0x2acb6804
#25 0x0000000000582d17 in handle_
#26 0x0000003d2760673d in ?? ()
#27 0x0000000000000000 in ?? ()
Related branches
- Vadim Tkachenko: Approve
- Fred Linhoss (community): Approve (documentation)
-
Diff: 291 lines (+77/-39)1 file modifiedinnodb_buffer_pool_shm.patch (+77/-39)
- Vadim Tkachenko: Approve
-
Diff: 178 lines (+32/-15)1 file modifiedinnodb_buffer_pool_shm.patch (+32/-15)
Changed in percona-server: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Yasufumi Kinoshita (yasufumi-kinoshita) |
Changed in percona-server: | |
status: | Fix Committed → Confirmed |
Changed in percona-server: | |
status: | Confirmed → Fix Committed |
Changed in percona-server: | |
milestone: | none → 5.1.50-12.1 |
Changed in percona-server: | |
status: | Fix Committed → Fix Released |
Issue is repeated very well.
Second time I've got message:
thd: 0x2acb5c09b890 bugs.mysql. com bugs.mysql. com
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...
InnoDB: Error: trying to access update undo rec field 1895425 in index "PRIMARY" of table "tpcc"."warehouse"
InnoDB: but index has only 11 fields
InnoDB: Submit a detailed bug report to http://
InnoDB: Run also CHECK TABLE "tpcc"."warehouse"
InnoDB: n_fields = 4, i = 1, ptr 0x2acb40e42911
InnoDB: Error: trying to access update undo rec for table tpcc/warehouse
InnoDB: but the table id in the undo record is wrong
InnoDB: Submit a detailed bug report to http://
InnoDB: Run also CHECK TABLE tpcc/warehouse
InnoDB: table tpcc/warehouse, index PRIMARY, n_uniq 1
InnoDB: undo rec address 0x2acb40e428f8, type 12 cmpl_info 1
InnoDB: undo rec table id 0 66, index table id 0 49
and stacktrace:
(gdb) bt create_ block (heap=0x2acb4c1 06950, n=1048576, type=0, name=0x2acb4c10 6958 <Address 0x2acb4c106958 out of bounds>, line=528) at mem/mem0mem.c:357 06950, n=1048576) at mem/mem0mem.c:446 aca6, len=18446744073 709540186) at ./include/ mem0mem. ic:186 aca6, len=18446744073 709540186) at mem/mem0mem.c:125 6950) at ./include/ trx0rec. ic:110 get_undo_ rec_low (roll_ptr=..., heap=0x2acb4c10 6950) at trx/trx0rec.c:1360 get_undo_ rec (roll_ptr=..., trx_id=..., undo_rec= 0x59c71768, heap=0x2acb4c10 6950) prev_version_ build (index_ rec=0x2ac65e270 880 <Address 0x2ac65e270880 out of bounds>, mtr=<value optimized out>, rec=0x2ac65e270880 <Address 0x2ac65e270880 out of bounds>, index=0x2aca9c0 2c788, 0x59c71ea0, heap=0x2acb4c10 6950, old_vers= 0x59c71828) at trx/trx0rec.c:1483 build_for_ consistent_ read (rec=0x2ac65e270880 <Address 0x2ac65e270880 out of bounds>, 2c788, offsets=0x59c721d0, view=0x2acb5401 5aa8, offset_ heap=0x59c721d8 , heap=0x2acb4c10 6800, old_vers= 0x59c721c8) at row/row0vers.c:559 for_mysql (buf=0x2acb40dad4c0 <Address 0x2acb40dad4c0 out of bounds>, mode=2, 0x2acb40dade48, match_mode=1, direction=0) at row/row0sel.c:4247 :index_ read (this=0x2acb40d ad0a0, 0x2acb40dad4c0 <Address 0x2acb40dad4c0 out of bounds>, key_ptr=<value optimized out>, key_len=<value optimized out>, flag=HA_ READ_KEY_ EXACT) at handler/ ha_innodb. cc:5801 :index_ read_idx_ map (this=0x2acb40d ad0a0, 0x2acb40dad4c0 <Address 0x2acb40dad4c0 out of bounds>, index=<value optimized out>, 0x2acb406500a0 <Address 0x2acb406500a0 out of bounds>, keypart_map=1, find_flag= HA_READ_ KEY_EXACT) at handler.cc:4428 89...
#0 mem_heap_
file_
#1 0x0000000000707a36 in mem_heap_add_block (heap=0x2acb4c1
#2 0x0000000000707db8 in mem_heap_alloc (heap=0x8, data=0x2ac6546f
#3 mem_heap_dup (heap=0x8, data=0x2ac6546f
#4 0x000000000075544e in trx_undo_rec_copy (roll_ptr=..., heap=0x2acb4c10
#5 trx_undo_
#6 0x00000000007554da in trx_undo_
at trx/trx0rec.c:1398
#7 0x00000000007573ce in trx_undo_
index_
offsets=
#8 0x000000000074741b in row_vers_
mtr=0x59c71a00, index=0x2aca9c0
in_
#9 0x000000000073e821 in row_search_
prebuilt=
#10 0x00000000006e5165 in ha_innobase:
buf=
find_
#11 0x0000000000656ee9 in handler:
buf=
key=
#12 0x00000000005e2