Bug #88163 /usr/sbin/mysqld --initialize-insecure hang with group replication enabled
Submitted: 20 Oct 2017 7:03 Modified: 12 Apr 2018 5:22
Reporter: David Zoltan Kedves Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: Group Replication Severity:S3 (Non-critical)
Version:5.7.20 OS:Debian (Debian 8)
Assigned to: CPU Architecture:Any

[20 Oct 2017 7:03] David Zoltan Kedves
I have installed the mysql-community packages from the following APT repos:

deb http://repo.mysql.com/apt/debian/ jessie mysql-apt-config
deb http://repo.mysql.com/apt/debian/ jessie mysql-5.7


# dpkg -l | grep mysql
ii  libdbd-mysql-perl                 4.028-2+deb8u2                   amd64        Perl5 database interface to the MySQL database
ii  libmysqlclient18:amd64            5.5.58-0+deb8u1                  amd64        MySQL database client library
ii  mysql-client                      5.7.20-1debian8                  amd64        MySQL Client meta package depending on latest version
ii  mysql-common                      5.7.20-1debian8                  amd64        MySQL Common
ii  mysql-community-client            5.7.20-1debian8                  amd64        MySQL Client
ii  mysql-community-server            5.7.20-1debian8                  amd64        MySQL Server
ii  mysql-server                      5.7.20-1debian8                  amd64        MySQL Server meta package depending on latest version

Then stopped/killed the service, cleared the datadir, and did some modifications on my.cnf:
to [MYSQLD]:

# automatic: local network addresses
# group_replication_recovery_retry_count = 2
group_replication = FORCE_PLUS_PERMANENT
transaction_write_set_extraction = XXHASH64
group_replication_start_on_boot = ON
group_replication_bootstrap_group = OFF

plugin_load = group_replication.so

After these mods ^ I was executing "/usr/sbin/mysqld --initialize-insecure", but it seems it never returns (I even kept it running for a whole night...)

I've checked with GDB it seems to hang in plugin_group_replication_stop() , see the full backtrace created, will attach soon.
Maybe a dead-lock?

Process does not even respond to SIGTERM, i can only KILL it...

How to repeat:
1) install mysqld 5.7.20
2) stop/kill
3) create your group replication configs ( with group_replication_start_on_boot = ON )
4) erase datadir
5) execute '/usr/sbin/mysqld --initialize-insecure'

Suggested fix:
Have no idea, but it looks like if i set group_replication_start_on_boot to OFF, the issue no longer occurs, however it used to work in the past even with ON.
[20 Oct 2017 7:04] David Zoltan Kedves
GDB thread apply all back when mysqld hangs

Attachment: backtrace.txt (text/plain), 19.51 KiB.

[20 Oct 2017 9:27] MySQL Verification Team
Hello David,

Thank you for the report and feedback!

[20 Oct 2017 9:28] MySQL Verification Team
test results

Attachment: 88163.results (application/octet-stream, text), 11.49 KiB.

[12 Apr 2018 5:22] Erlend Dahl
Duplicate of

Bug#87759 Assert `server_engine_initialized()' at delayed_plugin_initialization.cc:167