Bug #63196 | set innodb_adaptive_hash_index=0 hangs server | ||
---|---|---|---|
Submitted: | 11 Nov 2011 6:19 | Modified: | 17 Jul 2013 14:14 |
Reporter: | Mark Callaghan | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: InnoDB Plugin storage engine | Severity: | S1 (Critical) |
Version: | 5.1.52 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | adaptive, hang, hash, innodb |
[11 Nov 2011 6:19]
Mark Callaghan
[11 Nov 2011 6:19]
Mark Callaghan
And this is a summary of the other thread stacks 38 pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,os_aio_simulated_handle,fil_aio_wait,io_handler_thread,start_thread,clone,?? 11 pthread_cond_wait@@GLIBC_2.3.2,MYSQL_BIN_LOG::wait_for_update,mysql_binlog_send,dispatch_command,do_command,handle_one_connection,start_thread,clone,?? 10 pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,sync_array_wait_event,rw_lock_s_lock_spin,rw_lock_s_lock_func,row_mysql_freeze_data_dictionary_func,row_undo,row_undo_step,que_thr_step,que_run_threads_low,que_run_threads,trx_general_rollback_for_mysql,row_mysql_handle_errors,row_insert_for_mysql,ha_innobase::write_row,handler::ha_write_row,write_record,mysql_insert,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection,start_thread,clone,?? 6 pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,sync_array_wait_event,rw_lock_s_lock_spin,rw_lock_s_lock_func,mtr_s_lock_func,btr_cur_search_to_nth_level,btr_pcur_open_func,row_search_index_entry,row_purge_remove_sec_if_poss_low,row_purge,row_purge_step,que_thr_step,que_run_threads_low,que_run_threads,trx_purge_worker,srv_purge_worker_thread,start_thread,clone,?? 4 read,my_real_read,my_net_read,do_command,handle_one_connection,start_thread,clone,?? 1 select,os_thread_sleep,sync_array_print_long_waits,srv_error_monitor_thread,start_thread,clone,?? 1 select,os_thread_sleep,srv_monitor_thread,start_thread,clone,?? 1 select,os_thread_sleep,srv_LRU_dump_restore_thread,start_thread,clone,?? 1 select,os_thread_sleep,srv_lock_timeout_thread,start_thread,clone,?? 1 pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,sync_array_wait_event,rw_lock_x_lock_low,rw_lock_x_lock_func,row_mysql_lock_data_dictionary_func,ha_innobase::info,get_schema_tables_record,get_all_tables,get_schema_tables_result,JOIN::exec,mysql_select,handle_select,execute_sqlcom_select,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection,start_thread,clone,?? 1 pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,sync_array_wait_event,rw_lock_x_lock_func,buf_pool_drop_hash_index,btr_search_disable,sys_var_pluginvar::update,set_var::update,sql_set_variables,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection,start_thread,clone,?? 1 pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,sync_array_wait_event,rw_lock_s_lock_spin,rw_lock_s_lock_func,mtr_s_lock_func,btr_cur_search_to_nth_level,row_ins_index_entry_low,row_ins_index_entry,row_ins_index_entry_step,row_ins,row_ins_step,row_insert_for_mysql,ha_innobase::write_row,handler::ha_write_row,write_record,mysql_insert,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection,start_thread,clone,?? 1 pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,sync_array_wait_event,rw_lock_s_lock_spin,rw_lock_s_lock_func,mtr_s_lock_func,btr_cur_search_to_nth_level,btr_pcur_open_func,row_search_index_entry,row_purge_remove_sec_if_poss_low,row_purge,row_purge_step,que_thr_step,que_run_threads_low,que_run_threads,trx_purge,srv_purge_thread,start_thread,clone,?? 1 pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,sync_array_wait_event,rw_lock_s_lock_spin,rw_lock_s_lock_func,buf_page_get_gen,btr_search_drop_page_hash_when_freed,fseg_free_page_low,fseg_free_page,btr_compress,btr_cur_compress_if_useful,btr_cur_pessimistic_delete,row_purge_remove_sec_if_poss_low,row_purge,row_purge_step,que_thr_step,que_run_threads_low,que_run_threads,trx_purge_worker,srv_purge_worker_thread,start_thread,clone,?? 1 pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,sync_array_wait_event,rw_lock_s_lock_spin,buf_flush_page,buf_flush_try_neighbors,buf_flush_batch,srv_master_thread,start_thread,clone,?? 1 pthread_cond_timedwait@@GLIBC_2.3.2,kill_server,kill_server_thread,start_thread,clone,?? 1 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,THD::init,THD::THD,handle_connections_sockets,main 1 do_sigwait,sigwait,signal_hand,start_thread,clone,??
[11 Nov 2011 6:28]
Sunny Bains
pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,sync_array_wait_event,rw_lock_s_lock_spin,rw_lock_s_lock_func,mtr_s_lock_func,btr_cur_search_to_nth_level,btr_pcur_open_func,row_search_index_entry,row_purge_remove_sec_if_poss_low,row_purge,row_purge_step,que_thr_step,que_run_threads_low,que_run_threads,trx_purge_worker,srv_purge_worker_thread,start_thread,clone,?? This doesn't look like Oracle code: trx_purge_worker srv_purge_worker_thread
[11 Nov 2011 6:30]
Mark Callaghan
Sure it is. It just isn't 5.1.52 code. That is the innodb multi-threaded purge patch. I think it originated from one of your branches and then you redid it. Note that without this patch we might not be running mysql today.
[11 Nov 2011 6:36]
Sunny Bains
Which branch, do you remember? The reason is that I don't remember writing a patch that worked like this. All versions of MT purge have used the work queue. So, I'm curious. All worker threads always call trx_purge() and always have, I don't recall having a special function trx_purge_worker().
[11 Nov 2011 6:47]
Mark Callaghan
You would have to ask Percona. I thought that an official branch (trunk or something) was the basis for their patch. I don't want to take credit away from them for code they might have originated though. But when I needed multi-threaded purge, their patch was much easier to port than the official fix in 5.6.
[11 Nov 2011 6:52]
MySQL Verification Team
could this be related? http://bugs.mysql.com/bug.php?id=59225 (Deadlock between DML and innodb_adaptive_hash_index=OFF)
[11 Nov 2011 6:53]
Sunny Bains
ok, then it is not our patch. I can see why back porting the 5.6 patch is more difficult. The kernel mutex split and code reorganisation would make it problematic. Though I don't think purge is related to this bug.
[11 Nov 2011 8:55]
MySQL Verification Team
i got a hang. check thread 23.
Attachment: bug63196_5.5.17_hang.txt (text/plain), 195.44 KiB.
[11 Nov 2011 9:05]
MySQL Verification Team
thread apply all bt full
Attachment: bug63196_5.5.17_hang_thread_apply_all_bt_full.txt.zip (application/octet-stream, text), 49.28 KiB.
[11 Nov 2011 14:56]
MySQL Verification Team
same testcase as above, with 5.5.13, also hangup after a while.
Attachment: gdb_5.5.13_hang_stacks.txt (text/plain), 201.64 KiB.
[11 Nov 2011 15:11]
MySQL Verification Team
repeated a hang quicker on 5.1.59+plugin.... stacks.
Attachment: gdb_5.1.59_plugin_hang_stacks.txt (text/plain), 115.82 KiB.
[14 Nov 2011 4:50]
MySQL Verification Team
this is not repeatable on mysql-trunk after 48 hours.
[17 Jul 2013 14:14]
MySQL Verification Team
Apparently the bug is not repeatable on current versions due to the fix for http://bugs.mysql.com/bug.php?id=62487 having fixed this issue also.