Bug #79499 MySQL crash when xcom of Group Replication assign the same port as that of DB
Submitted: 3 Dec 2015 2:25 Modified: 22 Dec 2015 12:07
Reporter: Ivan Tu Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S3 (Non-critical)
Version:0.6 OS:Any
Assigned to: Nuno Carvalho CPU Architecture:Any
Tags: group replication

[3 Dec 2015 2:25] Ivan Tu
Description:
Assign the same port number as the port number of MySQL instance in group_replication_local_address and group_replication_peer_addresses and issue start group_replication will crash the database instance without any error or warning message

How to repeat:
when configure with group replication 0.6 issue the following commands:
set global group_replication_local_address='127.0.0.1:3306';
set global group_replication_peer_addresses='127.0.0.1:3306,127.0.0.1:3310';
...
start group replication;

Suggested fix:
when xcom port number is conflict with database port number stop group replication and shows error message of conflict port number with database instance
[9 Dec 2015 6:06] Ivan Tu
It is about user experience error log shows only the following information, no "Error" there, it is very difficulty for users that are using Group Replication for the1st time to figure when went wrong, and crashing the instance could let them feel it is not a stable product, what I would like to see is showing informative error message and keeping the database instance stay alive.

[XCOM_BINDING_DEBUG] ::initialize_xcom():: Configuring Xcom group: XCom Group ID=566215791 Name=6bbedfcc-97f2-11e5-8636-08002742e003
[XCOM_BINDING_DEBUG] ::initialize_xcom():: Configured Peer Nodes: 192.168.56.101:3306
[XCOM_BINDING_DEBUG] ::initialize_xcom():: Configured Peer Nodes: 192.168.56.101:3310
[XCOM_BINDING_DEBUG] ::initialize_xcom():: Configured Total number of peers: 2
[XCOM_BINDING_DEBUG] ::initialize_xcom():: Configured Local Node: 192.168.56.101:3306
[XCOM_BINDING_DEBUG] ::initialize_xcom():: Configured Bootstrap: false
2015-12-09T04:41:31.177839Z 3 [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_applier' executed'. Previous state master_host='<NULL>', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='<NULL>', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''.
2015-12-09T04:41:31.187052Z 2 [Note] Plugin group_replication reported: 'Group Replication applier module successfully initialized!'
2015-12-09T04:41:31.187097Z 2 [Note] Plugin group_replication reported: 'auto_increment_increment is set to 7'
2015-12-09T04:41:31.187104Z 2 [Note] Plugin group_replication reported: 'auto_increment_offset is set to 1'
[XCOM BINDING DEBUG] ::join()
connecting to 192.168.56.101 3306
connected to 192.168.56.101 3306
...
connected to 192.168.56.101 3306
connecting to 192.168.56.101 3306
connected to 192.168.56.101 3306
[XCOM BINDING DEBUG] ::join():: I am NOT the boot node.
[XCOM BINDING DEBUG] ::join():: Skipping own address.
[XCOM BINDING DEBUG] ::join():: xcom_client_open_connection to 192.168.56.101:3310
connecting to 192.168.56.101 3310
connected to 192.168.56.101 3310
[XCOM BINDING DEBUG] ::join():: Calling xcom_client_add_node
2015-12-09T04:41:31.188527Z 5 [Note] Slave SQL thread for channel 'group_replication_applier' initialized, starting replication in log 'FIRST' at position 0, relay log './ubuntu-VirtualBox-relay-bin-group_replication_applier.000020' position: 4
Unable to announce tcp port 3306. Port already in use?state 0 action xa_init
[11 Dec 2015 16:10] Nuno Carvalho
Hi Ivan,

Thank you for the bug report, this issue is being fixed.

Best regards,
Nuno Carvalho
[22 Dec 2015 12:07] Erlend Dahl
Fixed under the heading of

Bug#22194078 XCOM KILLS THE APPLICATION USING IT WHEN THE GIVEN PORT IS ALREADY USED