summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2018-03-23 16:44:18 +0100
committerBenoit Foucher <benoit@zeroc.com>2018-03-23 16:44:18 +0100
commit0832b460643da92a6b1d6614aa25143594d051bb (patch)
tree384882a715634cb78d3f6c87220b2ab34e26a236
parentFixed Objective-C Xcode test warning, improved Slice setACM documentation (diff)
downloadice-0832b460643da92a6b1d6614aa25143594d051bb.tar.bz2
ice-0832b460643da92a6b1d6614aa25143594d051bb.tar.xz
ice-0832b460643da92a6b1d6614aa25143594d051bb.zip
Disabled Windows fast path loopback (ICE-8763)
-rw-r--r--csharp/src/Ice/Network.cs41
-rw-r--r--csharp/test/Ice/background/Client.cs7
-rw-r--r--csharp/test/Ice/exceptions/AllTests.cs6
-rw-r--r--csharp/test/Ice/metrics/Client.cs7
-rw-r--r--csharp/test/Ice/metrics/Collocated.cs7
-rw-r--r--csharp/test/IceSSL/configuration/AllTests.cs48
6 files changed, 26 insertions, 90 deletions
diff --git a/csharp/src/Ice/Network.cs b/csharp/src/Ice/Network.cs
index 0981ebadbba..fee3a313700 100644
--- a/csharp/src/Ice/Network.cs
+++ b/csharp/src/Ice/Network.cs
@@ -242,7 +242,13 @@ namespace IceInternal
{
setTcpNoDelay(socket);
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, 1);
- setTcpLoopbackFastPath(socket);
+ //
+ // FIX: the fast path loopback appears to cause issues with
+ // connection closure when it's enabled. Sometime, a peer
+ // doesn't receive the TCP/IP connection closure (RST) from
+ // the other peer and it ends up hanging. See bug #6093.
+ //
+ //setTcpLoopbackFastPath(socket);
}
catch(SocketException ex)
{
@@ -320,20 +326,25 @@ namespace IceInternal
}
}
- public static void setTcpLoopbackFastPath(Socket socket)
- {
- const int SIO_LOOPBACK_FAST_PATH = (-1744830448);
-
- byte[] OptionInValue = BitConverter.GetBytes(1);
- try
- {
- socket.IOControl(SIO_LOOPBACK_FAST_PATH, OptionInValue, null);
- }
- catch(Exception)
- {
- // Expected on platforms that do not support TCP Loopback Fast Path
- }
- }
+ //
+ // FIX: the fast path loopback appears to cause issues with
+ // connection closure when it's enabled. Sometime, a peer
+ // doesn't receive the TCP/IP connection closure (RST) from
+ // the other peer and it ends up hanging. See bug #6093.
+ //
+ // public static void setTcpLoopbackFastPath(Socket socket)
+ // {
+ // const int SIO_LOOPBACK_FAST_PATH = (-1744830448);
+ // byte[] OptionInValue = BitConverter.GetBytes(1);
+ // try
+ // {
+ // socket.IOControl(SIO_LOOPBACK_FAST_PATH, OptionInValue, null);
+ // }
+ // catch(Exception)
+ // {
+ // // Expected on platforms that do not support TCP Loopback Fast Path
+ // }
+ // }
public static void setBlock(Socket socket, bool block)
{
diff --git a/csharp/test/Ice/background/Client.cs b/csharp/test/Ice/background/Client.cs
index fa93230f0c7..aeb9a9c287f 100644
--- a/csharp/test/Ice/background/Client.cs
+++ b/csharp/test/Ice/background/Client.cs
@@ -50,13 +50,6 @@ public class Client : TestCommon.Application
//
string defaultProtocol = initData.properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp");
initData.properties.setProperty("Ice.Default.Protocol", "test-" + defaultProtocol);
-
- // TODO: WORKAROUND: .NET connection closure is sometime not detected in a timely fashion
- // and ACM closes the connection first. We increase the default timeout here to prevent
- // the test from failing when this occurs. It usually takes 2 minutes for the connection
- // closure to be detected when this occurs so we set a default timeout of 3 minutes.
- initData.properties.setProperty("Ice.Default.Timeout", "180000");
-
return initData;
}
diff --git a/csharp/test/Ice/exceptions/AllTests.cs b/csharp/test/Ice/exceptions/AllTests.cs
index a7055209c78..c852c7b1405 100644
--- a/csharp/test/Ice/exceptions/AllTests.cs
+++ b/csharp/test/Ice/exceptions/AllTests.cs
@@ -455,12 +455,6 @@ public class AllTests : TestCommon.AllTests
catch(Ice.ConnectionLostException)
{
}
- catch(Ice.ConnectionTimeoutException)
- {
- // TODO: WORKAROUND for ICE-8118, it some takes 2 minutes to get the ReceivedAsync completed
- // callback when the connection is forcefully closed by the server. It appears to be an issue
- // with .NET.
- }
}
catch(Ice.ConnectionRefusedException)
{
diff --git a/csharp/test/Ice/metrics/Client.cs b/csharp/test/Ice/metrics/Client.cs
index 784f76d4788..f7d88939350 100644
--- a/csharp/test/Ice/metrics/Client.cs
+++ b/csharp/test/Ice/metrics/Client.cs
@@ -35,13 +35,6 @@ public class Client : TestCommon.Application
initData.properties.setProperty("Ice.Admin.DelayCreation", "1");
initData.properties.setProperty("Ice.Warn.Connections", "0");
initData.properties.setProperty("Ice.Default.Host", "127.0.0.1");
-
- // TODO: WORKAROUND: .NET connection closure is sometime not detected in a timely fashion
- // and ACM closes the connection first. We increase the default timeout here to prevent
- // the test from failing when this occurs. It usually takes 2 minutes for the connection
- // closure to be detected when this occurs so we set a default timeout of 3 minutes.
- initData.properties.setProperty("Ice.Default.Timeout", "180000");
-
return initData;
}
diff --git a/csharp/test/Ice/metrics/Collocated.cs b/csharp/test/Ice/metrics/Collocated.cs
index 3f037390a47..1099e9fc172 100644
--- a/csharp/test/Ice/metrics/Collocated.cs
+++ b/csharp/test/Ice/metrics/Collocated.cs
@@ -47,13 +47,6 @@ public class Collocated : TestCommon.Application
initData.properties.setProperty("Ice.Warn.Connections", "0");
initData.properties.setProperty("Ice.Warn.Dispatch", "0");
initData.properties.setProperty("Ice.Default.Host", "127.0.0.1");
-
- // TODO: WORKAROUND: .NET connection closure is sometime not detected in a timely fashion
- // and ACM closes the connection first. We increase the default timeout here to prevent
- // the test from failing when this occurs. It usually takes 2 minutes for the connection
- // closure to be detected when this occurs so we set a default timeout of 3 minutes.
- initData.properties.setProperty("Ice.Default.Timeout", "180000");
-
return initData;
}
diff --git a/csharp/test/IceSSL/configuration/AllTests.cs b/csharp/test/IceSSL/configuration/AllTests.cs
index e15a28cef69..ab15c4b5af7 100644
--- a/csharp/test/IceSSL/configuration/AllTests.cs
+++ b/csharp/test/IceSSL/configuration/AllTests.cs
@@ -44,12 +44,6 @@ public class AllTests
}
result.properties.setProperty("Ice.RetryIntervals", "-1");
//result.properties.setProperty("IceSSL.Trace.Security", "1");
-
- // TODO: WORKAROUND: .NET connection closure is sometime not detected in a timely fashion
- // and ACM closes the connection first. We increase the default timeout here to prevent
- // the test from failing when this occurs. It usually takes 2 minutes for the connection
- // closure to be detected when this occurs so we set a default timeout of 3 minutes.
- result.properties.setProperty("Ice.Default.Timeout", "180000");
return result;
}
@@ -361,13 +355,6 @@ public class AllTests
{
// Expected.
}
- catch(Ice.ConnectionTimeoutException)
- {
- // TODO: WORKAROUND: .NET connection closure is sometime not detected in a timely fashion
- // and ACM closes the connection first (when this occurs, it usually takes 2 minutes for
- // the connection closure to be detected).
- Console.WriteLine("warning: connection timed out");
- }
catch(Ice.LocalException ex)
{
Console.WriteLine(ex.ToString());
@@ -488,13 +475,6 @@ public class AllTests
{
// Expected.
}
- catch(Ice.ConnectionTimeoutException)
- {
- // TODO: WORKAROUND: .NET connection closure is sometime not detected in a timely fashion
- // and ACM closes the connection first (when this occurs, it usually takes 2 minutes for
- // the connection closure to be detected).
- Console.WriteLine("warning: connection timed out");
- }
catch(Ice.LocalException ex)
{
Console.WriteLine(ex.ToString());
@@ -1088,13 +1068,6 @@ public class AllTests
{
// Expected
}
- catch(Ice.ConnectionTimeoutException)
- {
- // TODO: WORKAROUND: .NET connection closure is sometime not detected in a timely fashion
- // and ACM closes the connection first (when this occurs, it usually takes 2 minutes for
- // the connection closure to be detected).
- Console.WriteLine("warning: connection timed out");
- }
catch(Ice.LocalException ex)
{
Console.WriteLine(ex.ToString());
@@ -1230,13 +1203,6 @@ public class AllTests
{
// Expected.
}
- catch(Ice.ConnectionTimeoutException)
- {
- // TODO: WORKAROUND: .NET connection closure is sometime not detected in a timely fashion
- // and ACM closes the connection first (when this occurs, it usually takes 2 minutes for
- // the connection closure to be detected).
- Console.WriteLine("warning: connection timed out");
- }
catch(Ice.LocalException ex)
{
Console.WriteLine(ex.ToString());
@@ -1312,13 +1278,6 @@ public class AllTests
{
// Expected.
}
- catch(Ice.ConnectionTimeoutException)
- {
- // TODO: WORKAROUND: .NET connection closure is sometime not detected in a timely fashion
- // and ACM closes the connection first (when this occurs, it usually takes 2 minutes for
- // the connection closure to be detected).
- Console.WriteLine("warning: connection timed out");
- }
catch(Ice.LocalException ex)
{
Console.WriteLine(ex.ToString());
@@ -1401,13 +1360,6 @@ public class AllTests
{
// Expected.
}
- catch(Ice.ConnectionTimeoutException)
- {
- // TODO: WORKAROUND: .NET connection closure is sometime not detected in a timely fashion
- // and ACM closes the connection first (when this occurs, it usually takes 2 minutes for
- // the connection closure to be detected).
- Console.WriteLine("warning: connection timed out");
- }
catch(Ice.LocalException ex)
{
Console.Out.Write(ex.ToString());