stack trace to analyze for hang: See stacktraces below: t 55 gdb) bt #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225 #1 0x0000000004845444 in native_cond_timedwait (cond=0x7f3858000dc0, mutex=0x7f3858003fc8, abstime=0x7f3928296040) at /home/mohit.joshi/8.0.17-merge/include/thr_cond.h:100 #2 0x00000000048457b5 in safe_cond_timedwait (cond=0x7f3858000dc0, mp=0x7f3858003fa0, abstime=0x7f3928296040, file=0x5468d58 "/home/mohit.joshi/8.0.17-merge/sql/mdl.cc", line=1820) at /home/mohit.joshi/8.0.17-merge/mysys/thr_cond.cc:113 #3 0x00000000032bc671 in my_cond_timedwait (cond=0x7f3858000dc0, mp=0x7f3858000d90, abstime=0x7f3928296040, file=0x5468d58 "/home/mohit.joshi/8.0.17-merge/sql/mdl.cc", line=1820) at /home/mohit.joshi/8.0.17-merge/include/thr_cond.h:147 #4 0x00000000032bccd9 in inline_mysql_cond_timedwait (that=0x7f3858000dc0, mutex=0x7f3858000d90, abstime=0x7f3928296040, src_file=0x5468d58 "/home/mohit.joshi/8.0.17-merge/sql/mdl.cc", src_line=1820) at /home/mohit.joshi/8.0.17-merge/include/mysql/psi/mysql_cond.h:222 #5 0x00000000032be0e0 in MDL_wait::timed_wait (this=0x7f3858000d90, owner=0x7f3858000d00, abs_timeout=0x7f3928296040, set_status_on_timeout=true, wait_state_name=0x7958c00 ) at /home/mohit.joshi/8.0.17-merge/sql/mdl.cc:1820 #6 0x00000000032c035f in MDL_context::acquire_lock (this=0x7f3858000d90, mdl_request=0x7f3928296280, lock_wait_timeout=31536000) at /home/mohit.joshi/8.0.17-merge/sql/mdl.cc:3484 #7 0x00000000032c0783 in MDL_context::acquire_locks (this=0x7f3858000d90, mdl_requests=0x7f3928296240, lock_wait_timeout=31536000) at /home/mohit.joshi/8.0.17-merge/sql/mdl.cc:3616 #8 0x00000000045be3b3 in dd::acquire_mdl (thd=0x7f3858000d00, lock_namespace=MDL_key::TABLESPACE, schema_name=0x6060c7d "", table_name=0x7f38ac006288 "undo_001", no_wait=false, lock_wait_timeout=31536000, lock_type=MDL_EXCLUSIVE, lock_duration=MDL_EXPLICIT, out_mdl_ticket=0x7f3928296530) at /home/mohit.joshi/8.0.17-merge/sql/dd/impl/dictionary_impl.cc:448 #9 0x00000000045be5e1 in dd::acquire_exclusive_tablespace_mdl (thd=0x7f3858000d00, tablespace_name=0x7f38ac006288 "undo_001", no_wait=false, ticket=0x7f3928296530, for_trx=false) at /home/mohit.joshi/8.0.17-merge/sql/dd/impl/dictionary_impl.cc:490 #10 0x0000000004e95257 in Fil_system::encryption_rotate_in_a_shard (this=0x7f3958041788, shard=0x7f39582e71b8) at /home/mohit.joshi/8.0.17-merge/storage/innobase/fil/fil0fil.cc:9506 #11 0x0000000004e953cc in Fil_system::encryption_rotate_all (this=0x7f3958041788) at /home/mohit.joshi/8.0.17-merge/storage/innobase/fil/fil0fil.cc:9536 #12 0x0000000004e9541d in fil_encryption_rotate () at /home/mohit.joshi/8.0.17-merge/storage/innobase/fil/fil0fil.cc:9548 #13 0x0000000004944721 in innobase_encryption_key_rotation () at /home/mohit.joshi/8.0.17-merge/storage/innobase/handler/ha_innodb.cc:4328 #14 0x00000000033f6de1 in Rotate_innodb_master_key::execute (this=0x7f3858088c80) at /home/mohit.joshi/8.0.17-merge/sql/sql_alter_instance.cc:108 #15 0x00000000033eba3f in Sql_cmd_alter_instance::execute (this=0x7f3858099b60, thd=0x7f3858000d00) at /home/mohit.joshi/8.0.17-merge/sql/sql_admin.cc:1667 #16 0x00000000034e8bb7 in mysql_execute_command (thd=0x7f3858000d00, first_level=true) at /home/mohit.joshi/8.0.17-merge/sql/sql_parse.cc:4637 #17 0x00000000034eb6b2 in mysql_parse (thd=0x7f3858000d00, parser_state=0x7f3928297bf0, update_userstat=false) at /home/mohit.joshi/8.0.17-merge/sql/sql_parse.cc:5445 #18 0x00000000034dfba3 in dispatch_command (thd=0x7f3858000d00, com_data=0x7f3928298ca0, command=COM_QUERY) at /home/mohit.joshi/8.0.17-merge/sql/sql_parse.cc:1805 #19 0x00000000034ddf95 in do_command (thd=0x7f3858000d00) at /home/mohit.joshi/8.0.17-merge/sql/sql_parse.cc:1299 #20 0x00000000036ce5af in handle_connection (arg=0x9bde840) at /home/mohit.joshi/8.0.17-merge/sql/conn_handler/connection_handler_per_thread.cc:308 #21 0x0000000005015669 in pfs_spawn_thread (arg=0x9c7aac0) at /home/mohit.joshi/8.0.17-merge/storage/perfschema/pfs.cc:2855 #22 0x00007f3975aa06ba in start_thread (arg=0x7f3928299700) at pthread_create.c:333 #23 0x00007f3973e5441d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 (gdb) ================ t37 bt #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185 #1 0x0000000004aea436 in os_event::wait (this=0x7d91a88 ) at /home/mohit.joshi/8.0.17-merge/storage/innobase/include/os0event.h:187 #2 0x0000000004ae91f8 in os_event::wait_low (this=0x7d91a88 , reset_sig_count=3) at /home/mohit.joshi/8.0.17-merge/storage/innobase/os/os0event.cc:138 #3 0x0000000004ae98c8 in os_event_wait_low (event=0x7d91a88 , reset_sig_count=3) at /home/mohit.joshi/8.0.17-merge/storage/innobase/os/os0event.cc:372 #4 0x0000000004c3df0d in sync_array_wait_event (arr=0x7f395800ac98, cell=@0x7f3928207d08: 0x7f395f916368) at /home/mohit.joshi/8.0.17-merge/storage/innobase/sync/sync0arr.cc:444 #5 0x000000000499fc1f in TTASEventMutex::wait (this=0x7d91a80 , filename=0x66fa850 "/home/mohit.joshi/8.0.17-merge/storage/innobase/log/log0ddl.cc", line=1615, spin=4) at /home/mohit.joshi/8.0.17-merge/storage/innobase/include/ut0mutex.ic:89 #6 0x000000000499bae1 in TTASEventMutex::spin_and_try_lock (this=0x7d91a80 , max_spins=60, max_delay=6, filename=0x66fa850 "/home/mohit.joshi/8.0.17-merge/storage/innobase/log/log0ddl.cc", line=1615) at /home/mohit.joshi/8.0.17-merge/storage/innobase/include/ib0mutex.h:662 #7 0x0000000004995c63 in TTASEventMutex::enter (this=0x7d91a80 , max_spins=30, max_delay=6, filename=0x66fa850 "/home/mohit.joshi/8.0.17-merge/storage/innobase/log/log0ddl.cc", line=1615) at /home/mohit.joshi/8.0.17-merge/storage/innobase/include/ib0mutex.h:556 #8 0x000000000498fa28 in PolicyMutex >::enter (this=0x7d91a80 , n_spins=30, n_delay=6, name=0x66fa850 "/home/mohit.joshi/8.0.17-merge/storage/innobase/log/log0ddl.cc", line=1615) at /home/mohit.joshi/8.0.17-merge/storage/innobase/include/ib0mutex.h:766 #9 0x000000000498a297 in mutex_enter_func > > (mutex=0x7d91a80 , file=0x66fa850 "/home/mohit.joshi/8.0.17-merge/storage/innobase/log/log0ddl.cc", line=1615) at /home/mohit.joshi/8.0.17-merge/storage/innobase/include/ut0mutex.h:127 #10 0x0000000004a79318 in Log_DDL::replay_delete_space_log (this=0x7f39588b76b8, space_id=4294967150, file_path=0x7f385411a208 "./undo_001.ibu") at /home/mohit.joshi/8.0.17-merge/storage/innobase/log/log0ddl.cc:1615 #11 0x0000000004a78d8c in Log_DDL::replay (this=0x7f39588b76b8, record=...) at /home/mohit.joshi/8.0.17-merge/storage/innobase/log/log0ddl.cc:1508 #12 0x0000000004a78957 in Log_DDL::replay_by_thread_id (this=0x7f39588b76b8, thread_id=26) at /home/mohit.joshi/8.0.17-merge/storage/innobase/log/log0ddl.cc:1439 #13 0x0000000004a79d68 in Log_DDL::post_ddl (this=0x7f39588b76b8, thd=0x7f3854000d00) at /home/mohit.joshi/8.0.17-merge/storage/innobase/log/log0ddl.cc:1766 #14 0x0000000004946f06 in innobase_post_ddl (thd=0x7f3854000d00) at /home/mohit.joshi/8.0.17-merge/storage/innobase/handler/ha_innodb.cc:5129 #15 0x00000000035e1cba in (anonymous namespace)::complete_stmt >(THD *, handlerton *, , bool, bool) (thd=0x7f3854000d00, hton=0x9c4ba80, dr=, using_trans=true, dont_write_to_binlog=true) at /home/mohit.joshi/8.0.17-merge/sql/sql_tablespace.cc:185 #16 0x00000000035e0417 in Sql_cmd_drop_undo_tablespace::execute (this=0x7f3854157030, thd=0x7f3854000d00) at /home/mohit.joshi/8.0.17-merge/sql/sql_tablespace.cc:1620 #17 0x00000000034e8bb7 in mysql_execute_command (thd=0x7f3854000d00, first_level=true) at /home/mohit.joshi/8.0.17-merge/sql/sql_parse.cc:4637 #18 0x00000000034eb6b2 in mysql_parse (thd=0x7f3854000d00, parser_state=0x7f3928209bf0, update_userstat=false) at /home/mohit.joshi/8.0.17-merge/sql/sql_parse.cc:5445 #19 0x00000000034dfba3 in dispatch_command (thd=0x7f3854000d00, com_data=0x7f392820aca0, command=COM_QUERY) at /home/mohit.joshi/8.0.17-merge/sql/sql_parse.cc:1805 #20 0x00000000034ddf95 in do_command (thd=0x7f3854000d00) at /home/mohit.joshi/8.0.17-merge/sql/sql_parse.cc:1299 #21 0x00000000036ce5af in handle_connection (arg=0x9bea960) at /home/mohit.joshi/8.0.17-merge/sql/conn_handler/connection_handler_per_thread.cc:308 #22 0x0000000005015669 in pfs_spawn_thread (arg=0x9c7a900) at /home/mohit.joshi/8.0.17-merge/storage/perfschema/pfs.cc:2855 #23 0x00007f3975aa06ba in start_thread (arg=0x7f392820b700) at pthread_create.c:333 #24 0x00007f3973e5441d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 (gdb) f 16 #16 0x00000000035e0417 in Sql_cmd_drop_undo_tablespace::execute (this=0x7f3854157030, thd=0x7f3854000d00) at /home/mohit.joshi/8.0.17-merge/sql/sql_tablespace.cc:1620 1620 if (complete_stmt( (gdb) p thd->m_query_string $3 = {str = 0x7f38541565d8 "DROP UNDO TABLESPACE undo_001", length = 29}