Bug #99094 coredump when install information schema plugin
Description:
MySQL Server core when install information schema plugin:
020-03-27T04:44:49.815113Z 9 [Note] [MY-010733] [Server] Shutting down plugin 'EXAMPLE_I_S'
safe_mutex: Trying to lock mutex at /home/louis/gdb-cluster/mysql-server/sql/sql_plugin.cc, line 971, when the mutex was already locked at /home/louis/gdb-cluster/mysql-server/sql/sql_plugin.cc, line 1317 in thread T@9
04:44:49 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7fb13003b000
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7fb1e4ccad20 thread_stack 0x46000
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x43) [0x5579410d6ad5]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(handle_fatal_signal+0x299) [0x55794025ccd5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7fb1f1cbf730]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b) [0x7fb1f136b7bb]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121) [0x7fb1f1356535]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(safe_mutex_lock(safe_mutex_t*, bool, char const*, unsigned int)+0x129) [0x5579410da8da]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(+0x5995d6e) [0x5579400aad6e]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(+0x5995fca) [0x5579400aafca]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(plugin_lock_by_name(THD*, MYSQL_LEX_CSTRING const&, int)+0x73) [0x5579400accd7]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(ha_resolve_by_name_raw(THD*, MYSQL_LEX_CSTRING const&)+0x28) [0x55793fbcf433]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(+0x54e0c42) [0x55793fbf5c42]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(open_table_def(THD*, TABLE_SHARE*, dd::Table const&)+0x75) [0x55793fbfd335]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(get_table_share(THD*, char const*, char const*, char const*, unsigned long, bool, bool)+0x825) [0x55793ff1076c]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(+0x57fbbb2) [0x55793ff10bb2]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(open_table(THD*, TABLE_LIST*, Open_table_context*)+0xe90) [0x55793ff15f0b]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(+0x5805097) [0x55793ff1a097]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*)+0x36b) [0x55793ff1b517]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int)+0x45) [0x55793ff26d63]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(dd::Open_dictionary_tables_ctx::open_tables()+0x166) [0x557940e9e9e8]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(bool dd::cache::Storage_adapter::store<dd::View>(THD*, dd::View*)+0x1d1) [0x557940f365b9]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(bool dd::cache::Dictionary_client::store<dd::View>(dd::View*)+0x1e2) [0x557940e56bec]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(+0x6971928) [0x557941086928]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(+0x6971aa2) [0x557941086aa2]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(dd::info_schema::store_dynamic_plugin_I_S_metadata(THD*, st_plugin_int*)+0x91) [0x557941087ee8]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(+0x599cb6b) [0x5579400b1b6b]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(Sql_cmd_install_plugin::execute(THD*)+0x30) [0x5579400b6760]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(mysql_execute_command(THD*, bool)+0x59d1) [0x5579400811c6]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(mysql_parse(THD*, Parser_state*)+0x68a) [0x557940083b1f]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x1478) [0x557940078f2f]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(do_command(THD*)+0x482) [0x55794007746e]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(+0x5b26fbb) [0x55794023bfbb]
/home/louis/gdb-cluster/mysql-server/bld_debug/install_debug/bin/mysqld(+0x70eb066) [0x557941800066]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7fb1f1cb4fa3]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fb1f142d4cf]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7fb1302f4668): INSTALL PLUGIN EXAMPLE_I_S SONAME 'ha_example.so'
Connection ID (thread ID): 9
Status: NOT_KILLED
How to repeat:
Cause I did not find available pluggable information schema plugin, I write a patch to implement an example_i_s plugin.
git apply example_i_s_patch.diff
Then build the mysqld server and run mtr test:
./mtr example_i_s
Suggested fix:
see the fix_bug.diff
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.056 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.