|
Rollback marks the index as corrupted. At the same time, purge is working on the same index. It leads to assertion failure
`index->is_btree() || index->is_ibuf()`
Pasting stack trace:
Thread 3 received signal SIGABRT, Aborted.
|
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
|
(rr) where
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x00007f4ef5dd9859 in __GI_abort () at abort.c:79
|
#2 0x00007f4ef5dd9729 in __assert_fail_base (fmt=0x7f4ef5f6f588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
|
assertion=0x55a743b65420 "index->is_btree() || index->is_ibuf()",
|
file=0x55a743b60c00 "/data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/btr/btr0sea.cc", line=1060, function=<optimized out>)
|
at assert.c:92
|
#3 0x00007f4ef5deaf36 in __GI___assert_fail (assertion=assertion@entry=0x55a743b65420 "index->is_btree() || index->is_ibuf()",
|
file=file@entry=0x55a743b60c00 "/data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/btr/btr0sea.cc", line=line@entry=1060,
|
function=function@entry=0x55a743b65380 "bool btr_search_guess_on_hash(dict_index_t*, btr_search_t*, const dtuple_t*, ulint, ulint, btr_cur_t*, mtr_t*)") at assert.c:101
|
#4 0x000055a742d16237 in btr_search_guess_on_hash (index=0x6160031c9c08, info=info@entry=0x61a0006b95c0, tuple=tuple@entry=0x61900038f008,
|
mode=mode@entry=4, latch_mode=<optimized out>, cursor=cursor@entry=0x7f4ed2572610, mtr=<optimized out>)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/include/dict0mem.h:1207
|
#5 0x000055a742ce9016 in btr_cur_t::search_leaf (this=this@entry=0x7f4ed2572610, tuple=tuple@entry=0x61900038f008, mode=mode@entry=PAGE_CUR_LE,
|
latch_mode=latch_mode@entry=BTR_PURGE_LEAF, mtr=mtr@entry=0x7f4ed2572af0)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/include/btr0cur.h:744
|
#6 0x000055a742ad682e in btr_pcur_open (mtr=0x7f4ed2572af0, cursor=0x7f4ed2572610, latch_mode=BTR_PURGE_LEAF, mode=PAGE_CUR_LE,
|
tuple=0x61900038f008) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/include/btr0pcur.h:431
|
#7 row_search_index_entry (entry=entry@entry=0x61900038f008, mode=BTR_PURGE_LEAF, pcur=pcur@entry=0x7f4ed2572610, mtr=mtr@entry=0x7f4ed2572af0)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0row.cc:1281
|
#8 0x000055a742ab9325 in row_purge_remove_sec_if_poss_leaf (node=node@entry=0x61a00000e508, index=index@entry=0x6160031c9c08,
|
entry=entry@entry=0x61900038f008) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/include/dict0mem.h:1220
|
#9 0x000055a742abe14b in row_purge_remove_sec_if_poss (entry=0x61900038f008, index=0x6160031c9c08, node=0x61a00000e508)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0purge.cc:571
|
#10 row_purge_del_mark (node=node@entry=0x61a00000e508) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0purge.cc:619
|
#11 0x000055a742abecbd in row_purge_record_func (node=node@entry=0x61a00000e508, undo_rec=undo_rec@entry=0x621000057ad8 "",
|
thr=thr@entry=0x61600005a4c0, updated_extern=<optimized out>)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0purge.cc:1189
|
#12 0x000055a742abf451 in row_purge (node=node@entry=0x61a00000e508, undo_rec=undo_rec@entry=0x621000057ad8 "", thr=thr@entry=0x61600005a4c0)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0purge.cc:1250
|
#13 0x000055a742abfd6d in row_purge_step (thr=thr@entry=0x61600005a4c0)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0purge.cc:1313
|
#14 0x000055a742975d56 in que_thr_step (thr=0x61600005a4c0) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/que/que0que.cc:597
|
#15 que_run_threads_low (thr=thr@entry=0x61600005a4c0) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/que/que0que.cc:653
|
#16 0x000055a7429760c4 in que_run_threads (thr=thr@entry=0x61600005a4c0)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/que/que0que.cc:673
|
#17 0x000055a742b6ad20 in srv_task_execute () at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/srv/srv0srv.cc:1599
|
#18 0x000055a742b6af13 in purge_worker_callback () at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/srv/srv0srv.cc:1843
|
--Type <RET> for more, q to quit, c to continue without paging--
|
#19 0x000055a7430289c7 in tpool::task_group::execute (this=0x55a745115500 <purge_task_group>, t=t@entry=0x55a745115440 <purge_worker_task>)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/tpool/task_group.cc:55
|
#20 0x000055a743028c3b in tpool::task::execute (this=0x55a745115440 <purge_worker_task>)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/tpool/task.cc:32
|
#21 0x000055a74301fd44 in tpool::thread_pool_generic::worker_main (this=0x618000000880, thread_var=0x630000010400)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/tpool/tpool_generic.cc:576
|
#22 0x000055a7430230e0 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89
|
#23 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (
|
__fn=<optimized out>) at /usr/include/c++/9/bits/invoke.h:95
|
#24 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/9/thread:244
|
#25 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/9/thread:251
|
#26 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/9/thread:195
|
#27 0x00007f4ef61e8de4 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
|
#28 0x00007f4ef6303609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#29 0x00007f4ef5ed6293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
|
Alter table rollback marks the index as corrupted. Alter table does lock=shared. That's important because it marks the online status
as 0 always. So there is no need for purge to work on the indexes.
Thread 16 hit Hardware watchpoint 1: -location index->type
|
|
Old value = 18
|
New value = 2
|
0x000055a742a35357 in row_merge_drop_indexes (trx=0x7f4eea049140, table=table@entry=0x6180000dcd08, locked=<optimized out>,
|
alter_trx=0x7f4eea046540) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0merge.cc:4129
|
4129 index->type |= DICT_CORRUPT;
|
(rr) where
|
#0 0x000055a742a35357 in row_merge_drop_indexes (trx=0x7f4eea049140, table=table@entry=0x6180000dcd08, locked=<optimized out>,
|
alter_trx=0x7f4eea046540) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0merge.cc:4129
|
#1 0x000055a742710bd0 in innobase_rollback_sec_index (user_table=0x6180000dcd08, table=table@entry=0x619000919198, locked=<optimized out>,
|
trx=<optimized out>, alter_trx=<optimized out>)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/handler/handler0alter.cc:8904
|
#2 0x000055a74272ac81 in rollback_inplace_alter_table (ha_alter_info=ha_alter_info@entry=0x7f4ec125cdc0, table=<optimized out>,
|
prebuilt=0x621000309988) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/handler/handler0alter.cc:9041
|
#3 0x000055a742709c69 in ha_innobase::commit_inplace_alter_table (this=<optimized out>, altered_table=<optimized out>,
|
ha_alter_info=<optimized out>, commit=<optimized out>)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/handler/handler0alter.cc:11032
|
#4 0x000055a741d0e08f in handler::ha_commit_inplace_alter_table (this=0x61d0009344b8, altered_table=altered_table@entry=0x7f4ec125d4c0,
|
ha_alter_info=ha_alter_info@entry=0x7f4ec125cdc0, commit=commit@entry=false)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/sql/handler.cc:5268
|
#5 0x000055a7416ec492 in mysql_inplace_alter_table (thd=thd@entry=0x62b00020d218, table_list=<optimized out>, table=table@entry=0x619000919198,
|
altered_table=<optimized out>, ha_alter_info=<optimized out>, target_mdl_request=<optimized out>, ddl_log_state=<optimized out>,
|
trigger_param=<optimized out>, alter_ctx=<optimized out>, partial_alter=<optimized out>, start_alter_id=<optimized out>,
|
if_exists=<optimized out>) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/sql/sql_table.cc:7848
|
#6 0x000055a741724f00 in mysql_alter_table (thd=thd@entry=0x62b00020d218, new_db=new_db@entry=0x62b000211cf0,
|
new_name=new_name@entry=0x62b000212140, create_info=0x7f4ec125f800, table_list=<optimized out>, table_list@entry=0x629000e38498,
|
recreate_info=<optimized out>, alter_info=<optimized out>, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>,
|
if_exists=<optimized out>) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/sql/sql_table.cc:10782
|
#7 0x000055a7418b156b in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x62b00020d218)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/sql/structs.h:568
|
#8 0x000055a741439e60 in mysql_execute_command (thd=thd@entry=0x62b00020d218,
|
is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/sql/sql_parse.cc:5994
|
#9 0x000055a7413f0cbd in mysql_parse (thd=thd@entry=0x62b00020d218, rawbuf=<optimized out>, length=<optimized out>,
|
parser_state=parser_state@entry=0x7f4ec1261130) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/sql/sql_parse.cc:8019
|
#10 0x000055a74141f457 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62b00020d218,
|
packet=packet@entry=0x6290028b9219 " ALTER TABLE t1 ADD UNIQUE KEY IF NOT EXISTS `Marvão_uidx2` ( col_string /*!100800 DESC */, col_text(9) /*!100800 ASC */ ), ALGORITHM = NOCOPY, LOCK = SHARED /* E_R Thread5 QNO 6248 CON_ID 329 */ ", packet_length=packet_length@entry=198,
|
blocking=blocking@entry=true) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/sql/sql_class.h:1389
|
#11 0x000055a74142613e in do_command (thd=0x62b00020d218, blocking=blocking@entry=true)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/sql/sql_parse.cc:1407
|
#12 0x000055a74189a1f1 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x6080000035b8, put_in_cache=put_in_cache@entry=true)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/sql/sql_connect.cc:1416
|
#13 0x000055a74189ad3a in handle_one_connection (arg=0x6080000035b8) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/sql/sql_connect.cc:1318
|
#14 0x00007f4ef6303609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#15 0x00007f4ef5ed6293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
When index is being marked as corrupted, thread 3 does the following:
|
(rr) t 3
|
[Switching to thread 3 (Thread 4186224.4186593)]
|
#0 0x000055a742dba5fe in dfield_check_typed (field=0x61900038f040)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/data/data0data.cc:160
|
160 {
|
(rr) where
|
#0 0x000055a742dba5fe in dfield_check_typed (field=0x61900038f040)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/data/data0data.cc:160
|
#1 0x000055a742dbab00 in dtuple_check_typed (tuple=tuple@entry=0x61900038f008)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/data/data0data.cc:187
|
#2 0x000055a742ce840c in btr_cur_t::search_leaf (this=this@entry=0x7f4ed2572610, tuple=tuple@entry=0x61900038f008, mode=mode@entry=PAGE_CUR_LE,
|
latch_mode=latch_mode@entry=BTR_PURGE_LEAF, mtr=mtr@entry=0x7f4ed2572af0)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/btr/btr0cur.cc:950
|
#3 0x000055a742ad682e in btr_pcur_open (mtr=0x7f4ed2572af0, cursor=0x7f4ed2572610, latch_mode=BTR_PURGE_LEAF, mode=PAGE_CUR_LE,
|
tuple=0x61900038f008) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/include/btr0pcur.h:431
|
#4 row_search_index_entry (entry=entry@entry=0x61900038f008, mode=BTR_PURGE_LEAF, pcur=pcur@entry=0x7f4ed2572610, mtr=mtr@entry=0x7f4ed2572af0)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0row.cc:1281
|
#5 0x000055a742ab9325 in row_purge_remove_sec_if_poss_leaf (node=node@entry=0x61a00000e508, index=index@entry=0x6160031c9c08,
|
entry=entry@entry=0x61900038f008) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/include/dict0mem.h:1220
|
#6 0x000055a742abe14b in row_purge_remove_sec_if_poss (entry=0x61900038f008, index=0x6160031c9c08, node=0x61a00000e508)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0purge.cc:571
|
#7 row_purge_del_mark (node=node@entry=0x61a00000e508) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0purge.cc:619
|
#8 0x000055a742abecbd in row_purge_record_func (node=node@entry=0x61a00000e508, undo_rec=undo_rec@entry=0x621000057ad8 "",
|
thr=thr@entry=0x61600005a4c0, updated_extern=<optimized out>)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0purge.cc:1189
|
#9 0x000055a742abf451 in row_purge (node=node@entry=0x61a00000e508, undo_rec=undo_rec@entry=0x621000057ad8 "", thr=thr@entry=0x61600005a4c0)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0purge.cc:1250
|
#10 0x000055a742abfd6d in row_purge_step (thr=thr@entry=0x61600005a4c0)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/row/row0purge.cc:1313
|
#11 0x000055a742975d56 in que_thr_step (thr=0x61600005a4c0) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/que/que0que.cc:597
|
#12 que_run_threads_low (thr=thr@entry=0x61600005a4c0) at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/que/que0que.cc:653
|
#13 0x000055a7429760c4 in que_run_threads (thr=thr@entry=0x61600005a4c0)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/que/que0que.cc:673
|
#14 0x000055a742b6ad20 in srv_task_execute () at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/srv/srv0srv.cc:1599
|
#15 0x000055a742b6af13 in purge_worker_callback () at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/storage/innobase/srv/srv0srv.cc:1843
|
#16 0x000055a7430289c7 in tpool::task_group::execute (this=0x55a745115500 <purge_task_group>, t=t@entry=0x55a745115440 <purge_worker_task>)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/tpool/task_group.cc:55
|
#17 0x000055a743028c3b in tpool::task::execute (this=0x55a745115440 <purge_worker_task>)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/tpool/task.cc:32
|
#18 0x000055a74301fd44 in tpool::thread_pool_generic::worker_main (this=0x618000000880, thread_var=0x630000010400)
|
at /data/Server/bb-10.8-thiru_fixing_MDEV-30183/tpool/tpool_generic.cc:576
|
#19 0x000055a7430230e0 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89
|
|