Skip to content

Commit fccca49

Browse files
committed
MDEV-28377: galera_as_slave_nonprim bind: Address already in use
This commit fixes a crash reported as MDEV-28377 and a number of other crashes in automated tests with mtr that are related to broken .cnf files in galera and galera_3nodes suites, which happened when automatically migrating MDEV-26171 from 10.3 to subsequent higher versions.
1 parent e6bbc83 commit fccca49

15 files changed

+642
-457
lines changed

mysql-test/suite/galera/disabled.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ MW-328A : MDEV-22666 galera.MW-328A MTR failed: "Semaphore wait has lasted > 600
1616
MW-328B : MDEV-22666 galera.MW-328A MTR failed: "Semaphore wait has lasted > 600 seconds" and do not release port 16002
1717
MW-329 : MDEV-19962 Galera test failure on MW-329
1818
galera_as_slave_ctas : MDEV-28378 timeout
19-
galera_as_slave_nonprim : MDEV-28377 bind: Address already in use
2019
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
2120
galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
2221
galera_bf_lock_wait : MDEV-21597 wsrep::transaction::start_transaction(): Assertion `active() == false' failed

mysql-test/suite/galera/galera_2nodes.cnf

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,31 @@ innodb-autoinc-lock-mode=2
88
default-storage-engine=innodb
99
wsrep-provider=@ENV.WSREP_PROVIDER
1010
# enforce read-committed characteristics across the cluster
11+
# wsrep-causal-reads=ON
1112
wsrep-sync-wait=15
12-
wsrep-on=1
1313

1414
[mysqld.1]
15-
loose-innodb
15+
wsrep-on=1
1616
#galera_port=@OPT.port
1717
#ist_port=@OPT.port
1818
#sst_port=@OPT.port
19-
wsrep-cluster-address=gcomm://
19+
wsrep_cluster_address=gcomm://
2020
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
2121
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
2222
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
2323
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
2424

25-
# enforce read-committed characteristics across the cluster
26-
wsrep_causal_reads=ON
27-
wsrep_sync_wait = 15
28-
2925
[mysqld.2]
30-
loose-innodb
31-
# debug=d:t:i:o,/tmp/mysqld.2.trace
26+
wsrep-on=1
3227
#galera_port=@OPT.port
3328
#ist_port=@OPT.port
3429
#sst_port=@OPT.port
3530
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
36-
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
31+
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
3732
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
3833
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
3934
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
4035

41-
# enforce read-committed characteristics across the cluster
42-
wsrep_causal_reads=ON
43-
wsrep_sync_wait = 15
44-
4536
[ENV]
4637
NODE_MYPORT_1= @mysqld.1.port
4738
NODE_MYSOCK_1= @mysqld.1.socket

mysql-test/suite/galera/galera_2nodes_as_master.cnf

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,44 @@
77
!include include/default_mysqld.cnf
88

99
[mysqld]
10+
loose-innodb
1011
log-bin=mysqld-bin
12+
log-slave-updates
1113
binlog-format=row
1214
innodb-autoinc-lock-mode=2
1315
default-storage-engine=innodb
16+
# enforce read-committed characteristics across the cluster
17+
# wsrep-causal-reads=ON
18+
wsrep-sync-wait=15
1419

1520
[mysqld.1]
21+
wsrep-on=1
22+
server-id=1
1623
#galera_port=@OPT.port
1724
#ist_port=@OPT.port
1825
#sst_port=@OPT.port
19-
20-
server-id=1
21-
log_slave_updates
22-
23-
wsrep-on=1
24-
wsrep-provider=@ENV.WSREP_PROVIDER
25-
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
26+
wsrep_provider=@ENV.WSREP_PROVIDER
2627
wsrep_cluster_address=gcomm://
27-
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
28+
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
2829
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
2930
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
30-
# enforce read-committed characteristics across the cluster
31-
wsrep-causal-reads=ON
32-
wsrep-sync-wait=15
31+
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
3332

3433
[mysqld.2]
34+
wsrep-on=1
35+
server-id=2
3536
#galera_port=@OPT.port
3637
#ist_port=@OPT.port
3738
#sst_port=@OPT.port
38-
39-
server-id=2
40-
log_slave_updates
41-
42-
wsrep-on=1
4339
wsrep_provider=@ENV.WSREP_PROVIDER
44-
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
4540
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
46-
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
41+
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
4742
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
4843
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
49-
# enforce read-committed characteristics across the cluster
50-
wsrep-causal-reads=ON
51-
wsrep-sync-wait=15
44+
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
5245

5346
[mysqld.3]
47+
wsrep-on=OFF
5448
server-id=3
5549

5650
[ENV]

mysql-test/suite/galera/galera_2nodes_as_slave.cnf

Lines changed: 19 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -6,81 +6,45 @@
66
!include include/default_mysqld.cnf
77

88
[mysqld]
9+
loose-innodb
10+
log-bin=mysqld-bin
11+
log-slave-updates
912
binlog-format=row
13+
innodb-autoinc-lock-mode=2
14+
default-storage-engine=innodb
15+
# enforce read-committed characteristics across the cluster
16+
# wsrep-causal-reads=ON
17+
wsrep-sync-wait=15
1018

1119
[mysqld.1]
20+
wsrep-on=1
21+
server-id=1
1222
#galera_port=@OPT.port
1323
#ist_port=@OPT.port
1424
#sst_port=@OPT.port
15-
wsrep-on=1
16-
17-
log-bin=master-bin
18-
log-bin-index=master-bin
19-
log-slave-updates
20-
21-
innodb-autoinc-lock-mode=2
22-
default-storage-engine=innodb
23-
wsrep-provider=@ENV.WSREP_PROVIDER
24-
wsrep-cluster-address=gcomm://
25-
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
25+
wsrep_provider=@ENV.WSREP_PROVIDER
26+
wsrep_cluster_address=gcomm://
27+
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
28+
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
2629
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
2730
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
2831

29-
# enforce read-committed characteristics across the cluster
30-
wsrep-causal-reads=ON
31-
wsrep-sync-wait=15
32-
server-id=1
33-
3432
[mysqld.2]
33+
wsrep-on=1
34+
server-id=2
3535
#galera_port=@OPT.port
3636
#ist_port=@OPT.port
3737
#sst_port=@OPT.port
38-
wsrep-on=1
39-
40-
log-bin=master-bin
41-
log-bin-index=master-bin
42-
log-slave-updates
43-
44-
innodb-autoinc-lock-mode=2
45-
default-storage-engine=innodb
46-
wsrep-provider=@ENV.WSREP_PROVIDER
47-
wsrep_node_address=127.0.0.1
38+
wsrep_provider=@ENV.WSREP_PROVIDER
4839
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
49-
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
40+
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
5041
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
5142
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
5243
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
5344

54-
# enforce read-committed characteristics across the cluster
55-
wsrep-causal-reads=ON
56-
wsrep-sync-wait=15
57-
server-id=2
58-
5945
[mysqld.3]
60-
#galera_port=@OPT.port
61-
#ist_port=@OPT.port
62-
#sst_port=@OPT.port
63-
64-
wsrep-on=1
65-
66-
log-bin=master-bin
67-
log-bin-index=master-bin
68-
log-slave-updates
69-
70-
innodb-autoinc-lock-mode=2
71-
default-storage-engine=innodb
72-
wsrep-provider=@ENV.WSREP_PROVIDER
73-
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
74-
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
75-
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
76-
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
77-
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
78-
79-
# enforce read-committed characteristics across the cluster
80-
wsrep-causal-reads=ON
81-
wsrep-sync-wait=15
82-
server-id=3
8346
wsrep-on=OFF
47+
server-id=3
8448

8549
[ENV]
8650
NODE_MYPORT_1= @mysqld.1.port

mysql-test/suite/galera/galera_3nodes_as_slave.cnf

Lines changed: 24 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -6,98 +6,57 @@
66
!include include/default_mysqld.cnf
77

88
[mysqld]
9-
log-bin
9+
loose-innodb
10+
log-bin=mysqld-bin
11+
log-slave-updates
1012
binlog-format=row
13+
innodb-autoinc-lock-mode=2
14+
default-storage-engine=innodb
15+
# enforce read-committed characteristics across the cluster
16+
# wsrep-causal-reads=ON
17+
wsrep-sync-wait=15
1118

1219
[mysqld.1]
20+
wsrep-on=1
21+
server-id=1
1322
#galera_port=@OPT.port
1423
#ist_port=@OPT.port
1524
#sst_port=@OPT.port
16-
wsrep-on=1
17-
18-
log-slave-updates
19-
wsrep-on=1
20-
21-
innodb-autoinc-lock-mode=2
22-
default-storage-engine=innodb
23-
wsrep-provider=@ENV.WSREP_PROVIDER
24-
wsrep-cluster-address=gcomm://
25-
wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.install_timeout = PT15S;evs.max_install_timeouts=1;gcache.size=10M'
25+
wsrep_provider=@ENV.WSREP_PROVIDER
26+
wsrep_cluster_address=gcomm://
27+
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
2628
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
2729
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
2830
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
2931

30-
# enforce read-committed characteristics across the cluster
31-
wsrep-causal-reads=ON
32-
wsrep-sync-wait=15
33-
server-id=1
34-
3532
[mysqld.2]
33+
wsrep-on=1
34+
server-id=2
3635
#galera_port=@OPT.port
3736
#ist_port=@OPT.port
3837
#sst_port=@OPT.port
39-
wsrep-on=1
40-
41-
log-slave-updates
42-
wsrep-on=1
43-
44-
innodb-autoinc-lock-mode=2
45-
default-storage-engine=innodb
46-
wsrep-provider=@ENV.WSREP_PROVIDER
47-
wsrep_node_address=127.0.0.1
38+
wsrep_provider=@ENV.WSREP_PROVIDER
4839
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
49-
wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
50-
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
51-
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
52-
53-
# enforce read-committed characteristics across the cluster
54-
wsrep-causal-reads=ON
55-
wsrep-sync-wait=15
56-
server-id=2
40+
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
41+
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
42+
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
43+
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
5744

5845
[mysqld.3]
46+
wsrep-on=1
47+
server-id=3
5948
#galera_port=@OPT.port
6049
#ist_port=@OPT.port
6150
#sst_port=@OPT.port
62-
wsrep-on=1
63-
64-
log-slave-updates
65-
wsrep-on=1
66-
67-
innodb-autoinc-lock-mode=2
68-
default-storage-engine=innodb
6951
wsrep-provider=@ENV.WSREP_PROVIDER
7052
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
71-
wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
53+
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
7254
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
7355
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
7456
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
7557

76-
# enforce read-committed characteristics across the cluster
77-
wsrep-causal-reads=ON
78-
wsrep-sync-wait=15
79-
server-id=3
80-
8158
[mysqld.4]
82-
#galera_port=@OPT.port
83-
#ist_port=@OPT.port
84-
#sst_port=@OPT.port
85-
86-
log-slave-updates
87-
wsrep-on=1
88-
89-
innodb-autoinc-lock-mode=2
90-
default-storage-engine=innodb
91-
wsrep-provider=@ENV.WSREP_PROVIDER
92-
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
93-
wsrep_provider_options='base_port=@mysqld.4.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
94-
wsrep_node_address='127.0.0.1:@mysqld.4.#galera_port'
95-
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
96-
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
97-
98-
# enforce read-committed characteristics across the cluster
99-
wsrep-causal-reads=ON
100-
wsrep-sync-wait=15
59+
wsrep-on=OFF
10160
server-id=4
10261

10362
[ENV]

0 commit comments

Comments
 (0)