Bug #94835 debug-assert while restarting server post install component
Submitted: 29 Mar 2019 12:07 Modified: 30 Jul 2019 13:34
Reporter: Krunal Bauskar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S6 (Debug Builds)
Version:8.0.15, 8.0.16 OS:Any
Assigned to: CPU Architecture:Any

[29 Mar 2019 12:07] Krunal Bauskar
Description:
ASSERT is observed on restart post execution of INSTALL COMPONENT.

mysqld: /opt/projects/percona/non-forked-oracle/nfp-mysql-80/mysql-server/sql/rpl_gtid_state.cc:817: void Gtid_state::update_gtids_impl_own_gtid(THD*, bool): Assertion `owned_gtids.is_owned_by(thd->owned_gtid, thd->thread_id())' failed.
12:00:10 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 67884 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x55e20b3d9540
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 = 7ffda56e9650 thread_stack 0x46000
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(my_print_stacktrace(unsigned char*, unsigned long)+0x55) [0x55e207dbb7fa]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(handle_fatal_signal+0x3f2) [0x55e206a4e041]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890) [0x7f9d25bf9890]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7) [0x7f9d23ffae97]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141) [0x7f9d23ffc801]
/lib/x86_64-linux-gnu/libc.so.6(+0x3039a) [0x7f9d23fec39a]
/lib/x86_64-linux-gnu/libc.so.6(+0x30412) [0x7f9d23fec412]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(Gtid_state::update_gtids_impl_own_gtid(THD*, bool)+0x7f) [0x55e2079640dd]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(Gtid_state::update_commit_group(THD*)+0x1a1) [0x55e2079619db]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(MYSQL_BIN_LOG::process_commit_stage_queue(THD*, THD*)+0x2fa) [0x55e2079bafce]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(MYSQL_BIN_LOG::ordered_commit(THD*, bool, bool)+0xc03) [0x55e2079bcb79]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(MYSQL_BIN_LOG::commit(THD*, bool)+0xe21) [0x55e2079ba7f7]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(ha_commit_trans(THD*, bool, bool)+0x80b) [0x55e206bd1c2e]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(trans_commit_stmt(THD*, bool)+0xec) [0x55e2069f455f]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(mysql_execute_command(THD*, bool)+0x62ed) [0x55e20688ea1d]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(Execute_sql_statement::execute_server_code(THD*)+0x208) [0x55e2068d0546]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(Prepared_statement::execute_server_runnable(Server_runnable*)+0x1b6) [0x55e2068d235e]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(Ed_connection::execute_direct(Server_runnable*)+0xff) [0x55e2068d3841]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(Ed_connection::execute_direct(MYSQL_LEX_STRING)+0x8e) [0x55e2068d36fa]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(execute_query(THD*, std::__cxx11::basic_string<char, std::char_traits<char>, Stateless_allocator<char, dd::String_type_alloc, My_free_functor> > const&)+0xa7) [0x55e207cde77c]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(dd::create_native_table(THD*, Plugin_table const*)+0x522) [0x55e207ad814b]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(do_create_native_table_for_pfs(THD*, Plugin_table const*)+0x11c) [0x55e20670e657]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(create_native_table_for_pfs(Plugin_table const*)+0x64) [0x55e20670e6e1]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(+0x49457ac) [0x55e2085437ac]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/lib/plugin/component_pfs_example_component_population.so(pfs_example_component_population_init()+0x225) [0x7f9cd45f409a]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(mysql_dynamic_loader_imp::load_do_initialize_components(std::vector<std::unique_ptr<mysql_component, std::default_delete<mysql_component> >, std::allocator<std::unique_ptr<mysql_component, std::default_delete<mysql_component> > > >&)+0xc8) [0x55e20878b718]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(mysql_dynamic_loader_imp::load_do_resolve_dependencies(std::vector<std::unique_ptr<mysql_component, std::default_delete<mysql_component> >, std::allocator<std::unique_ptr<mysql_component, std::default_delete<mysql_component> > > >&)+0x1f1) [0x55e20878b4e7]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(mysql_dynamic_loader_imp::load_do_register_services(std::vector<std::unique_ptr<mysql_component, std::default_delete<mysql_component> >, std::allocator<std::unique_ptr<mysql_component, std::default_delete<mysql_component> > > >&)+0x1f9) [0x55e20878b19f]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(mysql_dynamic_loader_imp::load_do_check_dependencies(std::vector<std::unique_ptr<mysql_component, std::default_delete<mysql_component> >, std::allocator<std::unique_ptr<mysql_component, std::default_delete<mysql_component> > > >&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__c/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(mysql_dynamic_loader_imp::load_do_collect_services_provided(std::vector<std::unique_ptr<mysql_component, std::default_delete<mysql_component> >, std::allocator<std::unique_ptr<mysql_component, std::default_delete<mysql_component> > > >&)+0x285) [0x55e20878ab77]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(mysql_dynamic_loader_imp::load_do_load_component_by_scheme(char const**, int)+0x231) [0x55e20878a7cf]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(mysql_dynamic_loader_imp::load(char const**, int)+0x55) [0x55e208789c65]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(mysql_persistent_dynamic_loader_imp::init(void*)+0x5bf) [0x55e206a1480f]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(persistent_dynamic_loader_init(void*)+0x18) [0x55e206a1558c]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(+0x2af666b) [0x55e2066f466b]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(mysqld_main(int, char**)+0x1f59) [0x55e206704246]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(main+0x20) [0x55e2066f24aa]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f9d23fddb97]
/opt/projects/percona/non-forked-oracle/nfp-mysql-80/installed/bin/mysqld(_start+0x2a) [0x55e2066f23aa]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (55e20b4417c0): CREATE TABLE performance_schema.pfs_example_continent( NAME char(20) not null, PRIMARY KEY(NAME))engine = 'performance_schema'
Connection ID (thread ID): 0
Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

How to repeat:
Note: this is a debug mode assert. I have debug build using mysql-8.0.15 tag.

1. Start mysql server
2. Execute INSTALL COMPONENT "file://component_pfs_example_component_population";
(No special configuration needed)
3. Shutdown mysql server
4. try to restart server and observe it hitting debug assert.
[29 Mar 2019 12:40] MySQL Verification Team
Hello Krunal,

Thank you for the report.
Observed that 8.0.15 debug build is affected.

regards,
Umesh
[29 Mar 2019 12:42] MySQL Verification Team
8.0.15 - test results

Attachment: 94835.results (application/octet-stream, text), 11.84 KiB.

[11 Jul 2019 13:01] Georgi Kodinov
Posted by developer:
 
I have tried both the reported 8.0.15 and the recent mysql-8.0.15 branches. 
I've got the following test:
gkodinov@loki01]~/work/xxx-8.0/bld/mysql-test: cat ~/gogo.test
--echo #
--echo # Bug #29557747: DEBUG-ASSERT WHILE RESTARTING SERVER POST INSTALL COMPONENT
--echo #

INSTALL COMPONENT "file://component_pfs_example_component_population";

--echo # Must not crash
--source include/restart_mysqld.inc
SELECT "it's alive";

UNINSTALL COMPONENT "file://component_pfs_example_component_population";

and have compiled as follows:
cmake -DWITH_DEBUG=1 -DWITH_SSL=system -DWITH_UNIT_TESTS=0

on a RH7.6 using gcc 7.3.1 20180303

I do not get any crashes. 
I've also tried manually executing the steps above and restarting the server on the same linux and on an windows 10 box but to the same effect.

Please provide more detailed steps to reproduce and re-open the bug.
[30 Jul 2019 13:34] Paul DuBois
Posted by developer:
 
Fixed in 8.0.18.

During startup, the server attempted to write operations to the
binary log that should not have been logged.