Bug #82059 ReplSemiSync Failed to select() on semi-sync dump sockets, error: errno=9
Submitted: 30 Jun 2016 2:03 Modified: 5 Jul 2016 9:23
Reporter: wu zejun Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.7.9 OS:SUSE ( SUSE Linux Enterprise Server 11 SP2 (x86_64))
Assigned to: CPU Architecture:Any
Tags: ReplSemiSync

[30 Jun 2016 2:03] wu zejun
Description:
ReplSemiSync error log, but the repl was ok, the data had gone to slave, but erverytime repl, the mysql error log shown like these:
2016-06-30T09:51:39.901188+08:00 0 [Note] Failed to select() on semi-sync dump sockets, error: errno=9

when set global rpl_semi_sync_master_trace_level=80;
     set global rpl_semi_sync_master_trace_level=80;

the error logs shown like theseļ¼š

2016-06-30T09:37:51.419923+08:00 725 [Note] ReplSemiSyncMaster::updateSyncHeader: server(10776), (bin.000006, 27026162) sync(1), repl(1)
2016-06-30T09:37:51.419932+08:00 725 [Note] <--- ReplSemiSyncMaster::updateSyncHeader exit (0)
2016-06-30T09:37:51.419943+08:00 725 [Note] ---> ReplSemiSyncMaster::readSlaveReply enter
2016-06-30T09:37:51.419982+08:00 725 [Note] <--- ReplSemiSyncMaster::readSlaveReply exit (0)
2016-06-30T09:37:51.420347+08:00 0 [Note] ---> ReplSemiSyncMaster::reportReplyPacket enter
2016-06-30T09:37:51.420362+08:00 0 [Note] ReplSemiSyncMaster::reportReplyPacket: Got reply(bin.000006, 27026162) from server 10776
2016-06-30T09:37:51.420368+08:00 0 [Note] ---> ReplSemiSyncMaster::reportReplyBinlog enter
2016-06-30T09:37:51.420373+08:00 0 [Note] ReplSemiSyncMaster::reportReplyBinlog: Got reply at (bin.000006, 27026162)
2016-06-30T09:37:51.420378+08:00 0 [Note] ReplSemiSyncMaster::reportReplyBinlog: signal all waiting threads.
2016-06-30T09:37:51.420383+08:00 0 [Note] ---> ActiveTranx::signal_waiting_sessions_up_to enter
2016-06-30T09:37:51.420391+08:00 0 [Note] <--- ActiveTranx::signal_waiting_sessions_up_to exit (False)
2016-06-30T09:37:51.420396+08:00 0 [Note] <--- ReplSemiSyncMaster::reportReplyBinlog exit (0)
2016-06-30T09:37:51.420400+08:00 0 [Note] <--- ReplSemiSyncMaster::reportReplyPacket exit (-1)
2016-06-30T09:37:51.420447+08:00 724 [Note] ReplSemiSyncMaster::commitTrx: Binlog reply is ahead (bin.000006, 27026162),
2016-06-30T09:37:51.420498+08:00 724 [Note] ---> ActiveTranx::::clear_active_tranx_nodes enter
2016-06-30T09:37:51.420519+08:00 724 [Note] ActiveTranx::::clear_active_tranx_nodes: cleared all nodes
2016-06-30T09:37:51.420530+08:00 724 [Note] <--- ActiveTranx::::clear_active_tranx_nodes exit (0)
2016-06-30T09:37:51.420543+08:00 724 [Note] <--- ReplSemiSyncMaster::commitTrx exit (0)
2016-06-30T09:38:38.784807+08:00 0 [Note] Failed to select() on semi-sync dump sockets, error: errno=9
2016-06-30T09:38:38.784889+08:00 0 [Note] Failed to select() on semi-sync dump sockets, error: errno=9
2016-06-30T09:38:38.784958+08:00 0 [Note] Failed to select() on semi-sync dump sockets, error: errno=9 

the semi info:

mysql> show variables like "%rpl_semi%";
+-------------------------------------------+------------+
| Variable_name                             | Value      |
+-------------------------------------------+------------+
| rpl_semi_sync_master_enabled              | ON         |
| rpl_semi_sync_master_timeout              | 5000       |
| rpl_semi_sync_master_trace_level          | 32         |
| rpl_semi_sync_master_wait_for_slave_count | 1          |
| rpl_semi_sync_master_wait_no_slave        | ON         |
| rpl_semi_sync_master_wait_point           | AFTER_SYNC |
| rpl_semi_sync_slave_enabled               | ON         |
| rpl_semi_sync_slave_trace_level           | 32         |
+-------------------------------------------+------------+
8 rows in set (0.00 sec)

mysql> show status like "%rpl_semi%";   
+--------------------------------------------+------------+
| Variable_name                              | Value      |
+--------------------------------------------+------------+
| Rpl_semi_sync_master_clients               | 3          |
| Rpl_semi_sync_master_net_avg_wait_time     | 0          |
| Rpl_semi_sync_master_net_wait_time         | 0          |
| Rpl_semi_sync_master_net_waits             | 189054     |
| Rpl_semi_sync_master_no_times              | 97         |
| Rpl_semi_sync_master_no_tx                 | 974        |
| Rpl_semi_sync_master_status                | ON         |
| Rpl_semi_sync_master_timefunc_failures     | 0          |
| Rpl_semi_sync_master_tx_avg_wait_time      | 17584      |
| Rpl_semi_sync_master_tx_wait_time          | 1180608100 |
| Rpl_semi_sync_master_tx_waits              | 67140      |
| Rpl_semi_sync_master_wait_pos_backtraverse | 0          |
| Rpl_semi_sync_master_wait_sessions         | 0          |
| Rpl_semi_sync_master_yes_tx                | 67554      |
| Rpl_semi_sync_slave_status                 | ON         |
+--------------------------------------------+------------+

mysql> select * from performance_schema.threads where name like '%ack%'\G;
*************************** 5. row ***************************
          THREAD_ID: 26
               NAME: thread/semisync/Ack_receiver
               TYPE: BACKGROUND
     PROCESSLIST_ID: NULL
   PROCESSLIST_USER: NULL
   PROCESSLIST_HOST: NULL
     PROCESSLIST_DB: NULL
PROCESSLIST_COMMAND: NULL
   PROCESSLIST_TIME: NULL
  PROCESSLIST_STATE: Waiting for semi-sync ACK from slave
   PROCESSLIST_INFO: NULL
   PARENT_THREAD_ID: 1
               ROLE: NULL
       INSTRUMENTED: YES
            HISTORY: YES
    CONNECTION_TYPE: NULL
       THREAD_OS_ID: 44498

use strace tool for  THREAD_OS_ID: 44498, result like these:

select(1711, [759 1024 1025 1026 1027 1029 1030 1031 1032 1033 1035 1038 1040 1042 1044 1046 1047 1049 1053 1055 1056 1097 1101 1102 1104 1107 1109 1110 1113 1114 1115 1117 1118 1121 1122 1123 1125 1132 1133 1140 1141 1148 1149 1156 1157 1164 1165 1169 1170 1172 1173], NULL, NULL, {1, 0}) = 50 (in [1024 1025 1026 1027 1029 1030 1031 1032 1033 1035 1038 1040 1042 1044 1046 1047 1049 1053 1055 1056 1097 1101 1102 1104 1107 1109 1110 1113 1114 1115 1117 1118 1121 1122 1123 1125 1132 1133 1140 1141 1148 1149 1156 1157 1164 1165 1169 1170 1172 1173], left {0, 999997})
select(1711, [759 1024 1025 1026 1027 1029 1030 1031 1032 1033 1035 1038 1040 1042 1044 1046 1047 1049 1053 1055 1056 1097 1101 1102 1104 1107 1109 1110 1113 1114 1115 1117 1118 1121 1122 1123 1125 1132 1133 1140 1141 1148 1149 1156 1157 1164 1165 1169 1170 1172 1173], NULL, NULL, {1, 0}) = 50 (in [1024 1025 1026 1027 1029 1030 1031 1032 1033 1035 1038 1040 1042 1044 1046 1047 1049 1053 1055 1056 1097 1101 1102 1104 1107 1109 1110 1113 1114 1115 1117 1118 1121 1122 1123 1125 1132 1133 1140 1141 1148 1149 1156 1157 1164 1165 1169 1170 1172 1173], left {0, 999997})
select(1711, [759 1024 1025 1026 1027 1029 1030 1031 1032 1033 1035 1038 1040 1042 1044 1046 1047 1049 1053 1055 1056 1097 1101 1102 1104 1107 1109 1110 1113 1114 1115 1117 1118 1121 1122 1123 1125 1132 1133 1140 1141 1148 1149 1156 1157 1164 1165 1169 1170 1172 1173], NULL, NULL, {1, 0}) = 50 (in [1024 1025 1026 1027 1029 1030 1031 1032 1033 1035 1038 1040 1042 1044 1046 1047 1049 1053 1055 1056 1097 1101 1102 1104 1107 1109 1110 1113 1114 1115 1117 1118 1121 1122 1123 1125 1132 1133 1140 1141 1148 1149 1156 1157 1164 1165 1169 1170 1172 1173], left {0, 999997})
select(1711, [759 1024 1025 1026 1027 1029 1030 1031 1032 1033 1035 1038 1040 1042 1044 1046 1047 1049 1053 1055 1056 1097 1101 1102 1104 1107 1109 1110 1113 1114 1115 1117 1118 1121 1122 1123 1125 1132 1133 1140 1141 1148 1149 1156 1157 1164 1165 1169 1170 1172 1173], NULL, NULL, {1, 0}) = 50 (in [1024 1025 1026 1027 1029 1030 1031 1032 1033 1035 1038 1040 1042 1044 1046 1047 1049 1053 1055 1056 1097 1101 1102 1104 1107 1109 1110 1113 1114 1115 1117 1118 1121 1122 1123 1125 1132 1133 1140 1141 1148 1149 1156 1157 1164 1165 1169 1170 1172 1173], left {0, 999997})

Is that the select bug?

In the file /usr/include/bits/typesizes.h __FD_SETSIZE is defined to 1024

/* Number of descriptors that can fit in an `fd_set'.  */
#define __FD_SETSIZE            1024

please help me how to fix the problem? thanks

How to repeat:
SUSE Linux Enterprise Server 11 SP2  (x86_64) 
MySQL server version 5.7.9
[30 Jun 2016 16:38] zhai weixiang
I guess this is duplicate of bug#79865 which hasn't been fixed yet.
[5 Jul 2016 9:23] MySQL Verification Team
Thank you for the report.
As zhai rightly pointed out, this sounds most likely duplicate of Bug #79865 
Thank you for your interest in MySQL.