Bug #100887 MySQL hang

Submitted: 18 Sep 2020 11:10 Modified: 19 Sep 2020 2:12
Reporter: 玉 盛 Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.7.26 OS:CentOS (7.5.1804)
Assigned to: CPU Architecture:x86

[18 Sep 2020 11:10] 玉 盛
Description:
Fri Sep 18 13:10:38 CST 2020
   3997 __lll_lock_wait(libpthread.so.0),_L_lock_1093(libpthread.so.0),pthread_mutex_lock(libpthread.so.0),native_mutex_lock(thr_mutex.h:84),my_mutex_lock(thr_mutex.h:84),inline_mysql_mutex_lock(thr_mutex.h:84),THD::init(thr_mutex.h:84),THD::THD(sql_class.cc:1315),Channel_info::create_thd(channel_info.cc:32),Channel_info_tcpip_socket::create_thd(socket_connection.cc:222),init_new_thd(connection_handler_per_thread.cc:183),handle_connection(connection_handler_per_thread.cc:183),pfs_spawn_thread(pfs.cc:2190),start_thread(libpthread.so.0),clone(libc.so.6)
    242 __lll_lock_wait(libpthread.so.0),_L_lock_1093(libpthread.so.0),pthread_mutex_lock(libpthread.so.0),native_mutex_lock(thr_mutex.h:84),my_mutex_lock(thr_mutex.h:84),inline_mysql_mutex_lock(thr_mutex.h:84),THD::init(thr_mutex.h:84),THD::cleanup_connection(sql_class.cc:1859),dispatch_command(sql_parse.cc:1426),do_command(sql_parse.cc:1053),handle_connection(connection_handler_per_thread.cc:318),pfs_spawn_thread(pfs.cc:2190),start_thread(libpthread.so.0),clone(libc.so.6)
     18 __io_getevents_0_4(libaio.so.1),LinuxAIOHandler::collect(os0file.cc:2801),LinuxAIOHandler::poll(os0file.cc:2961),os_aio_linux_handler(os0file.cc:3017),os_aio_handler(os0file.cc:3017),fil_aio_wait(fil0fil.cc:6362),io_handler_thread(srv0start.cc:337),start_thread(libpthread.so.0),clone(libc.so.6)
     12 __lll_lock_wait(libpthread.so.0),_L_lock_1093(libpthread.so.0),pthread_mutex_lock(libpthread.so.0),native_mutex_lock(thr_mutex.h:84),my_mutex_lock(thr_mutex.h:84),inline_mysql_mutex_lock(thr_mutex.h:84),THD::init(thr_mutex.h:84),THD::THD(sql_class.cc:1315),Channel_info::create_thd(channel_info.cc:32),Channel_info_local_socket::create_thd(socket_connection.cc:169),init_new_thd(connection_handler_per_thread.cc:183),handle_connection(connection_handler_per_thread.cc:183),pfs_spawn_thread(pfs.cc:2190),start_thread(libpthread.so.0),clone(libc.so.6)
      6 __lll_lock_wait(libpthread.so.0),_L_lock_1093(libpthread.so.0),pthread_mutex_lock(libpthread.so.0),native_mutex_lock(thr_mutex.h:84),my_mutex_lock(thr_mutex.h:84),inline_mysql_mutex_lock(thr_mutex.h:84),Item_func_get_system_var::val_int(thr_mutex.h:84),Item_func_get_system_var::val_str(item_func.cc:7589),get_system_var(item_func.cc:8314),PTI_variable_aux_3d::itemize(parse_tree_items.h:770),PTI_expr_with_alias::itemize(parse_tree_items.cc:194),contextualize(parse_tree_helpers.h:70),PT_select_item_list::contextualize(parse_tree_helpers.h:70),PT_select_options_and_item_list::contextualize(parse_tree_nodes.h:2211),PT_select_part2::contextualize(parse_tree_nodes.h:2281),PT_select_init2::contextualize(parse_tree_nodes.h:2406),PT_select::contextualize(parse_tree_nodes.h:2443),MYSQLparse(sql_yacc.yy:1722),parse_sql(sql_parse.cc:7476),mysql_parse(sql_parse.cc:5792),dispatch_command(sql_parse.cc:1532),do_command(sql_parse.cc:1053),handle_connection(connection_handler_per_thread.cc:318),pfs_spawn_thread(pfs.cc:2190),start_thread(libpthread.so.0),clone(libc.so.6)
      4 nanosleep(libpthread.so.0),os_thread_sleep(os0thread.cc:303),buf_lru_manager_sleep_if_needed(buf0flu.cc:3570),buf_lru_manager(buf0flu.cc:3570),start_thread(libpthread.so.0),clone(libc.so.6)
      3 pthread_cond_wait,wait(os0event.h:156),os_event::wait_low(os0event.h:156),os_event_wait_low(os0event.cc:328),srv_worker_thread(srv0srv.cc:3026),start_thread(libpthread.so.0),clone(libc.so.6)
      3 pthread_cond_wait,wait(os0event.h:156),os_event::wait_low(os0event.h:156),os_event_wait_low(os0event.cc:328),buf_flush_page_cleaner_worker(buf0flu.cc:3531),start_thread(libpthread.so.0),clone(libc.so.6)
      3 __lll_lock_wait(libpthread.so.0),_L_lock_1093(libpthread.so.0),pthread_mutex_lock(libpthread.so.0),native_mutex_lock(thr_mutex.h:84),my_mutex_lock(thr_mutex.h:84),inline_mysql_mutex_lock(thr_mutex.h:84),Item_func_get_system_var::fix_length_and_dec(thr_mutex.h:84),Item_func::fix_fields(item_func.cc:246),setup_fields(sql_base.cc:9070),st_select_lex::prepare(sql_resolver.cc:190),handle_query(sql_select.cc:133),execute_sqlcom_select(sql_parse.cc:5471),mysql_execute_command(sql_parse.cc:2998),mysql_parse(sql_parse.cc:5905),dispatch_command(sql_parse.cc:1532),do_command(sql_parse.cc:1053),handle_connection(connection_handler_per_thread.cc:318),pfs_spawn_thread(pfs.cc:2190),start_thread(libpthread.so.0),clone(libc.so.6)
      1 sigwait(libpthread.so.0),signal_hand(mysqld.cc:2370),pfs_spawn_thread(pfs.cc:2190),start_thread(libpthread.so.0),clone(libc.so.6)
      1 sigwaitinfo(libc.so.6),timer_notify_thread_func(posix_timers.c:77),pfs_spawn_thread(pfs.cc:2190),start_thread(libpthread.so.0),clone(libc.so.6)
      1 pthread_cond_wait,wait(os0event.h:156),os_event::wait_low(os0event.h:156),os_event_wait_low(os0event.cc:328),srv_purge_coordinator_suspend(srv0srv.cc:3187),srv_purge_coordinator_thread(srv0srv.cc:3187),start_thread(libpthread.so.0),clone(libc.so.6)

How to repeat:
      1 pthread_cond_wait,wait(os0event.h:156),os_event::wait_low(os0event.h:156),os_event_wait_low(os0event.cc:328),buf_resize_thread(buf0buf.cc:3027),start_thread(libpthread.so.0),clone(libc.so.6)
      1 pthread_cond_wait,wait(os0event.h:156),os_event::wait_low(os0event.h:156),os_event_wait_low(os0event.cc:328),buf_dump_thread(buf0dump.cc:782),start_thread(libpthread.so.0),clone(libc.so.6)
      1 pthread_cond_wait,native_cond_wait(thr_cond.h:140),my_cond_wait(thr_cond.h:140),inline_mysql_cond_wait(thr_cond.h:140),wait_for_slave_connection(thr_cond.h:140),Ack_receiver::run(thr_cond.h:140),ack_receive_handler(semisync_master_ack_receiver.cc:35),pfs_spawn_thread(pfs.cc:2190),start_thread(libpthread.so.0),clone(libc.so.6)
      1 pthread_cond_wait,native_cond_wait(thr_cond.h:140),my_cond_wait(thr_cond.h:140),inline_mysql_cond_wait(thr_cond.h:140),compress_gtid_table(thr_cond.h:140),pfs_spawn_thread(pfs.cc:2190),start_thread(libpthread.so.0),clone(libc.so.6)
      1 pthread_cond_timedwait,os_event::timed_wait(os0event.cc:81),os_event::wait_time_low(os0event.cc:208),os_event_wait_time_low(os0event.cc:311),srv_monitor_thread(srv0srv.cc:1942),start_thread(libpthread.so.0),clone(libc.so.6)
      1 pthread_cond_timedwait,os_event::timed_wait(os0event.cc:81),os_event::wait_time_low(os0event.cc:208),os_event_wait_time_low(os0event.cc:311),srv_error_monitor_thread(srv0srv.cc:2102),start_thread(libpthread.so.0),clone(libc.so.6)
      1 pthread_cond_timedwait,os_event::timed_wait(os0event.cc:81),os_event::wait_time_low(os0event.cc:208),os_event_wait_time_low(os0event.cc:311),pc_sleep_if_needed(buf0flu.cc:2767),buf_flush_page_cleaner_coordinator(buf0flu.cc:2767),start_thread(libpthread.so.0),clone(libc.so.6)
      1 pthread_cond_timedwait,os_event::timed_wait(os0event.cc:81),os_event::wait_time_low(os0event.cc:208),os_event_wait_time_low(os0event.cc:311),lock_wait_timeout_thread(lock0wait.cc:573),start_thread(libpthread.so.0),clone(libc.so.6)
      1 pthread_cond_timedwait,os_event::timed_wait(os0event.cc:81),os_event::wait_time_low(os0event.cc:208),os_event_wait_time_low(os0event.cc:311),ib_wqueue_timedwait(ut0wqueue.cc:160),fts_optimize_thread(fts0opt.cc:2900),start_thread(libpthread.so.0),clone(libc.so.6)
      1 pthread_cond_timedwait,os_event::timed_wait(os0event.cc:81),os_event::wait_time_low(os0event.cc:208),os_event_wait_time_low(os0event.cc:311),dict_stats_thread(dict0stats_bg.cc:428),start_thread(libpthread.so.0),clone(libc.so.6)
      1 pthread_cond_timedwait,native_cond_timedwait(thr_cond.h:129),my_cond_timedwait(thr_cond.h:129),inline_mysql_cond_timedwait(thr_cond.h:129),audit_log_flush(thr_cond.h:129),audit_log_flush_worker(thr_cond.h:129),start_thread(libpthread.so.0),clone(libc.so.6)
      1 poll(libc.so.6),Mysqld_socket_listener::listen_for_connection_event(socket_connection.cc:876),connection_event_loop(connection_acceptor.h:66),mysqld_main(connection_acceptor.h:66),__libc_start_main(libc.so.6),_start
      1 nanosleep(libpthread.so.0),os_thread_sleep(os0thread.cc:303),srv_master_sleep(srv0srv.cc:2812),srv_master_thread(srv0srv.cc:2812),start_thread(libpthread.so.0),clone(libc.so.6)
      1 __lll_lock_wait(libpthread.so.0),_L_lock_1093(libpthread.so.0),pthread_mutex_lock(libpthread.so.0),native_mutex_lock(thr_mutex.h:84),my_mutex_lock(thr_mutex.h:84),inline_mysql_mutex_lock(thr_mutex.h:84),System_variable::init(thr_mutex.h:84),PFS_system_variable_cache::do_materialize_session(pfs_variable.cc:342),materialize_session(pfs_variable.h:568),table_variables_by_thread::rnd_next(pfs_variable.h:568),ha_perfschema::rnd_next(ha_perfschema.cc:351),handler::ha_rnd_next(handler.cc:3152),find_all_keys(filesort.cc:985),filesort(filesort.cc:985),create_sort_index(sql_executor.cc:3697),QEP_TAB::sort_table(sql_executor.cc:3697),join_init_read_record(sql_executor.cc:2487),sub_select(sql_executor.cc:1277),do_select(sql_executor.cc:950),JOIN::exec(sql_executor.cc:950),handle_query(sql_select.cc:185),execute_sqlcom_select(sql_parse.cc:5471),mysql_execute_command(sql_parse.cc:2998),mysql_parse(sql_parse.cc:5905),dispatch_command(sql_parse.cc:1532),do_command(sql_parse.cc:1053),handle_connection(connection_handler_per_thread.cc:318),pfs_spawn_thread(pfs.cc:2190),start_thread(libpthread.so.0),clone(libc.so.6)
      1 __lll_lock_wait(libpthread.so.0),_L_lock_1093(libpthread.so.0),pthread_mutex_lock(libpthread.so.0),native_mutex_lock(thr_mutex.h:84),my_mutex_lock(thr_mutex.h:84),inline_mysql_mutex_lock(thr_mutex.h:84),cleanup_variables(thr_mutex.h:84),plugin_thdvar_init(sql_plugin.cc:3347),THD::init(sql_class.cc:1632),THD::cleanup_connection(sql_class.cc:1859),dispatch_command(sql_parse.cc:1426),do_command(sql_parse.cc:1053),handle_connection(connection_handler_per_thread.cc:318),pfs_spawn_thread(pfs.cc:2190),start_thread(libpthread.so.0),clone(libc.so.6)
[18 Sep 2020 14:16] MySQL Verification Team
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.mysql.com/how-to-report.php to provide a repeatable test case. Also try last released version 7.7.31.

If you can provide more information, feel free to add it to this bug .

Thank you for your interest in MySQL.
[19 Sep 2020 2:12] 玉 盛
I'll try my best to reproduce the problem first
What happens is that the database suddenly fails to create new connections and existing connections fail to respond to requests. You cannot connect to the database through mysql-cli and there is nothing in error log,/var/log/message etc..

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 2.204 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.