Bug #85322 MYSQLADMIN SHUTDOWN HANGS WHEN GR PLUGIN IS BUSY
Submitted: 6 Mar 2017 12:10 Modified: 15 Sep 2017 12:28
Reporter: Dhruthi Komarlu Vasudeva Murthy Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S3 (Non-critical)
Version:5.7.19 OS:Any
Assigned to: CPU Architecture:Any

[6 Mar 2017 12:10] Dhruthi Komarlu Vasudeva Murthy
Description:
When we try to shutdown server through mysqladmin when GR plugin is in deleted state, shutdown hangs.

Scenario:
1. Start 2 servers, M1, M2 (multi primary mode)
2. Check that both servers are ONLINE, now kill M2
3. Execute some ddl/dml on M1, This query is blocked since there is no majority
4. On a parallel connection on M1, issue uninstall GR when the execution of ddl/dml is blocked.
   Check that, GR plugin is in deleted state from information_schema.plugins table.
5. Now try to shutdown server M1 through "mysqladmin shutdown" --> this hangs.
   (at this point we cannot connect to M1)

Checked with debug-binaires on:

commit 0f94c14be2276f93b6a98b397111cb475076e0a6
Merge: cf4ab59edd2 7b50590b251
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Fri Mar 3 11:12:26 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

How to repeat:
mysql-test$ ./mtr group_replication.gr_shutdown_server

please check the attached testcase.
[15 Sep 2017 12:28] 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.20 / 8.0.3 changelog:
If the Group Replication plugin was uninstalled while a group was running, the plugin was marked for uninstall. This could cause the server shutdown to not complete successfully. The fix ensures that the Group Replication plugin cannot be uninstalled if the majority of the group cannot be reached. In such a case it is necessary to issue STOP GROUP_REPLICATION before uninstalling the plugin.