From 60bef434c1e0776443887e06df44b59008a76df8 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 19 Jun 2018 15:48:09 +0200 Subject: erl_interface: Fix simultaneous connection setup by also accepting status "ok_simultaneous". --- lib/erl_interface/src/connect/ei_connect.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/erl_interface/src/connect/ei_connect.c b/lib/erl_interface/src/connect/ei_connect.c index 5c01223e3d..be228ab853 100644 --- a/lib/erl_interface/src/connect/ei_connect.c +++ b/lib/erl_interface/src/connect/ei_connect.c @@ -1357,11 +1357,14 @@ static int recv_status(int fd, unsigned ms) "<- RECV_STATUS socket read failed (%d)", rlen); goto error; } - if (rlen == 3 && buf[0] == 's' && buf[1] == 'o' && - buf[2] == 'k') { + + EI_TRACE_CONN2("recv_status", + "<- RECV_STATUS (%.*s)", (rlen>20 ? 20 : rlen), buf); + + if (rlen >= 3 && buf[0] == 's' && buf[1] == 'o' && buf[2] == 'k') { + /* Expecting "sok" or "sok_simultaneous" */ if (!is_static) free(buf); - EI_TRACE_CONN0("recv_status","<- RECV_STATUS (ok)"); return 0; } error: -- cgit v1.2.3 From 1bd95380064dd4cce15eb3a900640ee6e7f2b2d2 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 28 Jun 2018 14:59:33 +0200 Subject: ic: Fix buffer overrun bug in oe_ei_encode_atom bug exists since OTP-20.3.4 1d3acb70debd134c8346b7e98347171d5cf6fc62 --- lib/ic/c_src/oe_ei_encode_atom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/ic/c_src/oe_ei_encode_atom.c b/lib/ic/c_src/oe_ei_encode_atom.c index 99a9fe26f0..9d2c1d5aa3 100644 --- a/lib/ic/c_src/oe_ei_encode_atom.c +++ b/lib/ic/c_src/oe_ei_encode_atom.c @@ -30,7 +30,7 @@ int oe_ei_encode_atom(CORBA_Environment *ev, const char *p) { int size = ev->_iout; size_t len = strlen(p); - if (DIRTY_ATOM_ENC_MAX(len) >= ev->_outbufsz) { + if (size + DIRTY_ATOM_ENC_MAX(len) >= ev->_outbufsz) { ei_encode_atom_len(0,&size,p,len); -- cgit v1.2.3 From 5cc7a2d51bf0e0c928d94114bbebf85d7d57a9e0 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 25 Jun 2018 17:43:49 +0200 Subject: kernel: Send tick to hidden node even if pending writes as c-nodes need ticks to send ticks. --- lib/kernel/src/dist_util.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/kernel/src/dist_util.erl b/lib/kernel/src/dist_util.erl index b3507e5d13..86120a5483 100644 --- a/lib/kernel/src/dist_util.erl +++ b/lib/kernel/src/dist_util.erl @@ -731,7 +731,7 @@ send_status(#hs_data{socket = Socket, other_node = Node, %% The detection time interval is thus, by default, 45s < DT < 75s -%% A HIDDEN node is always (if not a pending write) ticked if +%% A HIDDEN node is always ticked if %% we haven't read anything as a hidden node only ticks when it receives %% a TICK !! @@ -745,8 +745,8 @@ send_tick(Socket, Tick, Type, MFTick, MFGetstat) -> case MFGetstat(Socket) of {ok, Read, _, _} when Ticked =:= T -> {error, not_responding}; - {ok, Read, W, Pend} when Type =:= hidden -> - send_tick(Socket, Pend, MFTick), + {ok, Read, W, _} when Type =:= hidden -> + MFTick(Socket), {ok, Tick#tick{write = W + 1, tick = T1}}; {ok, Read, Write, Pend} -> -- cgit v1.2.3 From 366fe98c3f685595c5b4e9c6cb19d1034d7b24f6 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 25 Jun 2018 17:13:12 +0200 Subject: kernel: Fix tick count bug when pending writes --- lib/kernel/src/dist_util.erl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/kernel/src/dist_util.erl b/lib/kernel/src/dist_util.erl index 86120a5483..d80971f414 100644 --- a/lib/kernel/src/dist_util.erl +++ b/lib/kernel/src/dist_util.erl @@ -750,12 +750,12 @@ send_tick(Socket, Tick, Type, MFTick, MFGetstat) -> {ok, Tick#tick{write = W + 1, tick = T1}}; {ok, Read, Write, Pend} -> - send_tick(Socket, Pend, MFTick), - {ok, Tick#tick{write = Write + 1, + Sent = send_tick(Socket, Pend, MFTick), + {ok, Tick#tick{write = Write + Sent, tick = T1}}; {ok, R, Write, Pend} -> - send_tick(Socket, Pend, MFTick), - {ok, Tick#tick{write = Write + 1, + Sent = send_tick(Socket, Pend, MFTick), + {ok, Tick#tick{write = Write + Sent, read = R, tick = T1, ticked = T}}; @@ -772,10 +772,11 @@ send_tick(Socket, Tick, Type, MFTick, MFGetstat) -> end. send_tick(Socket, 0, MFTick) -> - MFTick(Socket); + MFTick(Socket), + 1; send_tick(_, _Pend, _) -> %% Dont send tick if pending write. - ok. + 0. %% ------------------------------------------------------------ %% Connection setup timeout timer. -- cgit v1.2.3 From b059b597cb31be08220cb967c117033f34ca49c4 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 28 Jun 2018 17:09:22 +0200 Subject: Prepare release --- lib/erl_interface/doc/src/notes.xml | 18 ++++++++++++++++++ lib/erl_interface/vsn.mk | 2 +- lib/ic/doc/src/notes.xml | 19 ++++++++++++++++++- lib/ic/vsn.mk | 2 +- lib/kernel/doc/src/notes.xml | 20 ++++++++++++++++++++ lib/kernel/vsn.mk | 2 +- 6 files changed, 59 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/erl_interface/doc/src/notes.xml b/lib/erl_interface/doc/src/notes.xml index f165dde259..4310a142b0 100644 --- a/lib/erl_interface/doc/src/notes.xml +++ b/lib/erl_interface/doc/src/notes.xml @@ -31,6 +31,24 @@

This document describes the changes made to the Erl_interface application.

+
Erl_Interface 3.10.2.1 + +
Fixed Bugs and Malfunctions + + +

+ Make ei_connect and friends also accept state + ok_simultaneous during handshake, which means the + other node has initiated a connection setup that will be + cancelled in favor of this connection.

+

+ Own Id: OTP-15161 Aux Id: ERIERL-191

+
+
+
+ +
+
Erl_Interface 3.10.2
Fixed Bugs and Malfunctions diff --git a/lib/erl_interface/vsn.mk b/lib/erl_interface/vsn.mk index 8b6e91757d..4c9cc351c4 100644 --- a/lib/erl_interface/vsn.mk +++ b/lib/erl_interface/vsn.mk @@ -1,2 +1,2 @@ -EI_VSN = 3.10.2 +EI_VSN = 3.10.2.1 ERL_INTERFACE_VSN = $(EI_VSN) diff --git a/lib/ic/doc/src/notes.xml b/lib/ic/doc/src/notes.xml index 38cc77ca98..13d11527ab 100644 --- a/lib/ic/doc/src/notes.xml +++ b/lib/ic/doc/src/notes.xml @@ -31,7 +31,24 @@ notes.xml -
IC 4.4.4 +
IC 4.4.4.1 + +
Fixed Bugs and Malfunctions + + +

+ Fixed bug in ic causing potential buffer overrun + in funtion oe_ei_encode_atom. Bug exists since + ic-4.4.4 (OTP-20.3.4).

+

+ Own Id: OTP-15160 Aux Id: ERIERL-191

+
+
+
+ +
+ +
IC 4.4.4
Fixed Bugs and Malfunctions diff --git a/lib/ic/vsn.mk b/lib/ic/vsn.mk index d35d1dce1e..f087df5e95 100644 --- a/lib/ic/vsn.mk +++ b/lib/ic/vsn.mk @@ -1 +1 @@ -IC_VSN = 4.4.4 +IC_VSN = 4.4.4.1 diff --git a/lib/kernel/doc/src/notes.xml b/lib/kernel/doc/src/notes.xml index 09844f1502..f7d2c93666 100644 --- a/lib/kernel/doc/src/notes.xml +++ b/lib/kernel/doc/src/notes.xml @@ -31,6 +31,26 @@

This document describes the changes made to the Kernel application.

+
Kernel 5.4.3.1 + +
Fixed Bugs and Malfunctions + + +

+ Fix some potential buggy behavior in how ticks are sent + on inter node distribution connections. Tick is now sent + to c-node even if there are unsent buffered data, as + c-nodes need ticks in order to send reply ticks. The + amount of sent data was calculated wrongly when ticks + where suppressed due to unsent buffered data.

+

+ Own Id: OTP-15162 Aux Id: ERIERL-191

+
+
+
+ +
+
Kernel 5.4.3
Fixed Bugs and Malfunctions diff --git a/lib/kernel/vsn.mk b/lib/kernel/vsn.mk index 60a1b0bff8..7f2041ef55 100644 --- a/lib/kernel/vsn.mk +++ b/lib/kernel/vsn.mk @@ -1 +1 @@ -KERNEL_VSN = 5.4.3 +KERNEL_VSN = 5.4.3.1 -- cgit v1.2.3