Description:
The MySQL server crashes in attachable transaction destructor while running component_keyring_file.mysql_ts_alter_encrypt_1 MTR test with high number of parallel workers (bigger that number of available CPU cores)
#0 0x00007fdda7d13d78 in pthread_kill () from /lib64/libpthread.so.0
#1 0x000000000496df8d in my_write_core (sig=6) at ~/mysql-8.0/mysys/stacktrace.cc:308
#2 0x00000000035a8802 in handle_fatal_signal (sig=6) at ~/mysql-8.0/sql/signal_handler.cc:171
#3 <signal handler called>
#4 0x00007fdda734f9d5 in raise () from /lib64/libc.so.6
#5 0x00007fdda73388a4 in abort () from /lib64/libc.so.6
#6 0x00007fdda7338789 in __assert_fail_base.cold () from /lib64/libc.so.6
#7 0x00007fdda7348026 in __assert_fail () from /lib64/libc.so.6
#8 0x00000000032dee45 in THD::Attachable_trx::~Attachable_trx (this=0x7fdce8025d30, __in_chrg=<optimized out>) at ~/mysql-8.0/sql/sql_class.cc:262
#9 0x00000000032def3a in THD::Attachable_trx::~Attachable_trx (this=0x7fdce8025d30, __in_chrg=<optimized out>) at ~/mysql-8.0/sql/sql_class.cc:298
#10 0x00000000032e4a1c in THD::end_attachable_transaction (this=0x7fdce8001040) at ~/mysql-8.0/sql/sql_class.cc:1854
#11 0x00000000047374f4 in dd::Transaction_ro::~Transaction_ro (this=0x7fdda01e7f00, __in_chrg=<optimized out>) at ~/mysql-8.0/sql/dd/impl/transaction_impl.h:138
#12 0x000000000482fb1d in dd::cache::Storage_adapter::get<dd::Item_name_key, dd::Abstract_table> (thd=0x7fdce8001040, key=..., isolation=ISO_READ_COMMITTED, bypass_core_registry=false, object=0x7fdda01e8010)
at ~/mysql-8.0/sql/dd/impl/cache/storage_adapter.cc:167
#13 0x000000000482a7d6 in dd::cache::Shared_dictionary_cache::get_uncached<dd::Item_name_key, dd::Abstract_table> (this=0x8011aa0 <dd::cache::Shared_dictionary_cache::instance()::s_cache>, thd=0x7fdce8001040,
key=..., isolation=ISO_READ_COMMITTED, object=0x7fdda01e8010) at ~/mysql-8.0/sql/dd/impl/cache/shared_dictionary_cache.cc:113
#14 0x000000000482a5c4 in dd::cache::Shared_dictionary_cache::get<dd::Item_name_key, dd::Abstract_table> (this=0x8011aa0 <dd::cache::Shared_dictionary_cache::instance()::s_cache>, thd=0x7fdce8001040, key=...,
element=0x7fdda01e8088) at ~/mysql-8.0/sql/dd/impl/cache/shared_dictionary_cache.cc:98
#15 0x0000000004758a33 in dd::cache::Dictionary_client::acquire<dd::Item_name_key, dd::Abstract_table> (this=0x7fdce80049b0, key=..., object=0x7fdda01e80f8, local_committed=0x7fdda01e80f7,
local_uncommitted=0x7fdda01e80f6) at ~/mysql-8.0/sql/dd/impl/cache/dictionary_client.cc:883
#16 0x0000000004739a08 in dd::cache::Dictionary_client::acquire<dd::Abstract_table> (this=0x7fdce80049b0, schema_name="performance_schema", object_name="session_status", object=0x7fdda01e8298)
at ~/mysql-8.0/sql/dd/impl/cache/dictionary_client.cc:1321
#17 0x00000000032b5933 in get_table_share (thd=0x7fdce8001040, db=0x7fdce800b5f8 "performance_schema", table_name=0x7fdce800b610 "session_status", key=0x7fdce800e4cf "performance_schema", key_length=34,
open_view=true, open_secondary=false) at ~/mysql-8.0/sql/sql_base.cc:765
#18 0x00000000032b6038 in get_table_share_with_discover (thd=0x7fdce8001040, table_list=0x7fdce800e108, key=0x7fdce800e4cf "performance_schema", key_length=34, open_secondary=false, error=0x7fdda01e876c)
at ~/mysql-8.0/sql/sql_base.cc:881
#19 0x00000000032bb4b3 in open_table (thd=0x7fdce8001040, table_list=0x7fdce800e108, ot_ctx=0x7fdda01e8a40) at ~/mysql-8.0/sql/sql_base.cc:3199
#20 0x00000000032bf4be in open_and_process_table (thd=0x7fdce8001040, lex=0x7fdce8004010, tables=0x7fdce800e108, counter=0x7fdce8004068, prelocking_strategy=0x7fdda01e8b68, has_prelocking_list=false,
ot_ctx=0x7fdda01e8a40) at ~/mysql-8.0/sql/sql_base.cc:5027
#21 0x00000000032c0dbc in open_tables (thd=0x7fdce8001040, start=0x7fdda01e8b10, counter=0x7fdce8004068, flags=0, prelocking_strategy=0x7fdda01e8b68)
at ~/mysql-8.0/sql/sql_base.cc:5819
#22 0x00000000032c26ca in open_tables_for_query (thd=0x7fdce8001040, tables=0x7fdce8022d28, flags=0) at ~/mysql-8.0/sql/sql_base.cc:6696
#23 0x000000000343ef86 in Sql_cmd_dml::prepare (this=0x7fdce800ae80, thd=0x7fdce8001040) at ~/mysql-8.0/sql/sql_select.cc:367
#24 0x000000000343f8b0 in Sql_cmd_dml::execute (this=0x7fdce800ae80, thd=0x7fdce8001040) at ~/mysql-8.0/sql/sql_select.cc:522
#25 0x0000000003457009 in Sql_cmd_show::execute (this=0x7fdce800ae80, thd=0x7fdce8001040) at ~/mysql-8.0/sql/sql_show.cc:205
#26 0x0000000003458bd0 in Sql_cmd_show_status::execute (this=0x7fdce800ae80, thd=0x7fdce8001040) at ~/mysql-8.0/sql/sql_show.cc:748
#27 0x00000000033c5a56 in mysql_execute_command (thd=0x7fdce8001040, first_level=true) at ~/mysql-8.0/sql/sql_parse.cc:4412
#28 0x00000000033c7941 in dispatch_sql_command (thd=0x7fdce8001040, parser_state=0x7fdda01eaae0) at ~/mysql-8.0/sql/sql_parse.cc:5000
#29 0x00000000033be27a in dispatch_command (thd=0x7fdce8001040, com_data=0x7fdda01ebb80, command=COM_QUERY) at ~/mysql-8.0/sql/sql_parse.cc:1841
#30 0x00000000033bc7d3 in do_command (thd=0x7fdce8001040) at ~/mysql-8.0/sql/sql_parse.cc:1320
#31 0x0000000003592ff5 in handle_connection (arg=0xa5343c0) at ~/mysql-8.0/sql/conn_handler/connection_handler_per_thread.cc:301
#32 0x000000000519fdbe in pfs_spawn_thread (arg=0xa4d3b50) at ~/mysql-8.0/storage/perfschema/pfs.cc:2898
#33 0x00007fdda7d0c3f9 in start_thread () from /lib64/libpthread.so.0
#34 0x00007fdda7413b53 in clone () from /lib64/libc.so.6
How to repeat:
./mtr --repeat=500 --parallel=20 component_keyring_file.mysql_ts_alter_encrypt_1