Bug #87759 Assert `server_engine_initialized()' at delayed_plugin_initialization.cc:167
Submitted: 14 Sep 2017 15:16 Modified: 14 Dec 2017 15:03
Reporter: Narendra Singh Chauhan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S3 (Non-critical)
Version:8.0.4 OS:Any
Assigned to: CPU Architecture:Any

[14 Sep 2017 15:16] Narendra Singh Chauhan
Description:
If group replication variables are set during server initialization, then it results into ASSERTION failure `server_engine_initialized()' at delayed_plugin_initialization.cc:167: int Delayed_initialization_thread::initialization_thread_handler().

mysqld.1.err:-
===============
2017-09-14T14:35:38.062175Z 6 [Warning] [004076] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
mysqld: /Narendra/mysql_work/git_repo/mysql-trunk-2/rapid/plugin/group_replication/src/delayed_plugin_initialization.cc:167: int Delayed_initialization_thread::initialization_thread_handler(): Assertion `server_engine_initialized()' failed.
14:35:54 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 = 68169 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f77511f4d00
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 = 7f77549a9d38 thread_stack 0x46000
/Narendra/mysql_work/git_repo/mysql-trunk-2/runtime_output_directory/mysqld(my_print_stacktrace+0x46) [0x35ce44f]
/Narendra/mysql_work/git_repo/mysql-trunk-2/runtime_output_directory/mysqld(handle_fatal_signal+0x409) [0x2901225]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7f7757963cb0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f7756798035]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7f775679b79b]
/lib/x86_64-linux-gnu/libc.so.6(+0x2ee1e) [0x7f7756790e1e]
/lib/x86_64-linux-gnu/libc.so.6(+0x2eec2) [0x7f7756790ec2]
/Narendra/mysql_work/git_repo/mysql-trunk-2/install/lib/plugin/group_replication.so(Delayed_initialization_thread::initialization_thread_handler()+0x1a2) [0x7f770e214f92]
/Narendra/mysql_work/git_repo/mysql-trunk-2/install/lib/plugin/group_replication.so(+0x123817) [0x7f770e214817]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a) [0x7f775795be9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f775685536d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): Connection ID (thread ID): 3
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:
Details:-
==========
MySQL Version: 8.0.4

Run command:-
$ ./bin/mysqld --defaults-file=tmysqld1.cnf --initialize-insecure 2>&1 &

Note*: Change paths accordingly.
Where,
$ cat tmysqld1.cnf
[mysqld]
#
# Server
basedir=/Narendra/mysql_work/git_repo/mysql-trunk-2
datadir=/Narendra/mysql_work/git_repo/mysql-trunk-2/mysql-test/var/mysqld.1/data
socket=/tmp/mysqld.1.sock
port=13000
user=root
report-host=localhost
log-error=/Narendra/mysql_work/git_repo/mysql-trunk-2/mysql-test/var/log/mysqld.1.err
plugin-load=group_replication.so
plugin-dir=/Narendra/mysql_work/git_repo/mysql-trunk-2/install/lib/plugin
#
# RPL
server_id=1
binlog_format=ROW
gtid_mode=ON
enforce_gtid_consistency=ON
master_info_repository=TABLE
relay_log_info_repository=TABLE
binlog_checksum=NONE
log_slave_updates=ON
log_bin=server1-bin
relay_log=server1-relay-log
#
# GR
transaction_write_set_extraction=XXHASH64
loose-group_replication_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
loose-group_replication_start_on_boot=on
loose-group_replication_local_address= "127.0.0.1:21300"
loose-group_replication_group_seeds= "127.0.0.1:21300, 127.0.0.1:21301, 127.0.0.1:21302"
loose-group_replication_bootstrap_group= on
loose-group_replication_single_primary_mode=FALSE
loose-group_replication_enforce_update_everywhere_checks=TRUE
[14 Dec 2017 15:03] David Moss
Posted by developer:
 
Thank you for your feedback, this has been fixed in upcoming versions and the following was added to the 5.7.21 / 8.0.4 changelog:
If Group Replication was configured to start on server boot when the server was being initialized using --initialize or --initialize-insecure, because the replication applier infrastructure was not initialized this resulted in an assertion.  Now, Group Replication is not started when the server is being initialized.
[1 Feb 2018 14:02] David Moss
Now published.
[12 Apr 2018 5:23] Erlend Dahl
Bug#88163 /usr/sbin/mysqld --initialize-insecure hang with group replication enabled

was marked as a duplicate.