Bug #92932 Group Replication plugin doesn't load in MySQL 5.7.24
Submitted: 24 Oct 2018 17:15 Modified: 5 Dec 2018 17:36
Reporter: Mario Staykov Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.7.24 OS:Ubuntu (16.04.3 LTS (Xenial Xerus))
Assigned to: Bogdan Kecman CPU Architecture:x86
Tags: group replication, group_replication, plugin

[24 Oct 2018 17:15] Mario Staykov
Description:
I've been using the group_replication plugin with MySQL without issues before 5.7.24. With this version, the server starts up without the plugin because of failure. 
I confirmed it manually (see steps below) and it's definitely the new version it doesn't work with.

Background on the plugin source: Since it doesn't come included with mysql-server but is well documented, I have obtained it from the Community Edition.

How to repeat:
0. Have /usr/lib/mysql/plugin/group_replication.so
1. See it working with 5.7.23
> $ mysql --version
mysql  Ver 14.14 Distrib 5.7.23, for Linux (x86_64) using  EditLine wrapper

mysql> INSTALL PLUGIN group_replication SONAME 'group_replication.so';
Query OK, 0 rows affected (1 min 1.16 sec)

2. Upgrade to 5.7.24 (uninstall everything to do with 5.7.23 do make sure it gets loaded):
dpkg -l | grep mysql
apt-get remove libmysqlclient20:amd64 mysql-client-core-5.7 mysql-common mysql-server
apt-get install mysql-server
> $ mysql --version
mysql  Ver 14.14 Distrib 5.7.24, for Linux (x86_64) using  EditLine wrapper

3. Witness plugin failing to load:
mysql> INSTALL PLUGIN group_replication SONAME 'group_replication.so';
ERROR 1126 (HY000): Can't open shared library '/usr/lib/mysql/plugin/group_replication.so' (errno: 2 /usr/lib/mysql/plugin/group_replication.so: undefined symbol: _Z25group_replication_cleanupv)

Suggested fix:
fix compatibility with group_replication.so in mysql-server-5.7
OR 
include group_replication.so plugin in mysql-server-5.7 for easier integration, now that it has matured
[30 Oct 2018 17:37] Mario Staykov
As a workaround, I've managed to get the plugin to load by re-obtaining it from the newest MySQL Community Edition. This is likely to break again at some point.
[5 Nov 2018 0:46] Bogdan Kecman
Hi,

I'm not sure I follow what binary are you using.

When you say "obtain from community" version I assume you are using enterprise version of the binaries, but with enterprise version of binaries I cannot reproduce this problem and you should contact our support team to help you out. If you are not using enterprise version then you are on community version (there's no third version type) so can you elaborate please on what binary you are using (what repo is that apt-get pulling the binary from, some ubuntu general repo or our repo from dev.mysql.com or ?) and where do you fetch the .so from (tar.gz generic release from dev.mysql.com or debian package from dev.mysql.com or ?)

thanks
Bogdan
[5 Nov 2018 17:09] Mario Staykov
Hi Bogdan,

Thanks for getting involved. I am using Enterprise edition of MySQL, which doesn't have the Group Replication binary to begin with, so I'm not sure which ones you're unable to reproduce the problem with. The "obtained from Community Edition" group_replication.so binary has been copied from a MySQL CE installation at ~5.7.19, but certainly before MySQL 5.7.24 CE, which is the only one that provides group_replication.so binary that works with 5.7.24 Enterprise edition.

MySQL CE was both times installed using:
> curl -OL https://dev.mysql.com/get/mysql-apt-config_0.8.3-1_all.deb
> dpkg -i mysql-apt-config*
> apt-get update
> apt-get install mysql-community-server
The MySQL Enterprise edition used in production is apt-get installed using the default Ubuntu repositories (xenial main + xenial-updates + xenial-security)

Best regards,
Mario
[5 Nov 2018 17:36] Bogdan Kecman
Hi,

> The MySQL Enterprise edition used in production is apt-get installed using the default Ubuntu repositories (xenial main + xenial-updates + xenial-security)

I think this is where the misunderstanding comes from. The default ubuntu repos don't host MySQL Enterprise!!! In order to get MySQL Enterprise binaries you need to have subscription to MySQL Enterprise support (and then you get as value added the MySQL Enterprise binaries, backup, MEM ... and bunch of other stuff). 

Furthermore, packages hosted on xenial repo are IIRC not made by us but by Ubuntu maintainer so you should create a bug there that plugin is missing.

If I understand you correctly, when you install Oracle made binaries packaged in Oracle made package:

curl -OL https://dev.mysql.com/get/mysql-apt-config_0.8.3-1_all.deb
dpkg -i mysql-apt-config*
apt-get update
apt-get install mysql-community-server

you don't have issue with GR plugin?

thanks
Bogdan
[6 Dec 2018 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".