zeroc-ice / ice

All-in-one solution for creating networked applications with RPC, pub/sub, server deployment, and more.
https://zeroc.com
GNU General Public License v2.0
2.03k stars 593 forks source link

csharp/IceSSL/configuration intermittent failure #1745

Open externl opened 7 months ago

externl commented 7 months ago

We're getting this on main ci, ubuntu-latest.

*** [49/54] Running csharp/IceSSL/configuration tests ***
[ running client/server test - 01/31/24 22:01:27 ]
(dotnet /home/runner/work/ice/ice/csharp/test/IceSSL/configuration/msbuild/server/net6.0/server.dll --Ice.Default.Host=127.0.0.1 --Test.BasePort=14000 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3 --Ice.ThreadPool.Server.SizeWarn=0 --Ice.PrintAdapterReady=1 "/home/runner/work/ice/ice/csharp/test/IceSSL/configuration")
(dotnet /home/runner/work/ice/ice/csharp/test/IceSSL/configuration/msbuild/client/net6.0/client.dll --Ice.Default.Host=127.0.0.1 --Test.BasePort=14000 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 "/home/runner/work/ice/ice/csharp/test/IceSSL/configuration")
testing manual initialization... ok
testing certificate verification... ok
testing certificate chains... ok
testing custom certificate verifier... ok
testing protocols... ok
testing expired certificates... ok
testing multiple CA certificates... ok
testing DER CA certificate... ok
testing passwords... ok
testing IceSSL.TrustOnly... ok
testing IceSSL.TrustOnly.Client... -! 01/31/2024 22:01:41:383 client: warning: connection exception:
   Ice.ConnectionLostException
       error = 0
      at IceInternal.StreamSocket.finishRead(Buffer buf) in /home/runner/work/ice/ice/csharp/src/Ice/StreamSocket.cs:line 229
      at Ice.ConnectionI.finishAsync(Int32 operation) in /home/runner/work/ice/ice/csharp/src/Ice/ConnectionI.cs:line 1145
   local address = 127.0.0.1:54380
   remote address = 127.0.0.1:14000
Ice.ConnectionLostException
    error = 0
   at Test.ServerFactoryPrxHelper.destroyServer(ServerPrx srv, OptionalContext context) in /home/runner/work/ice/ice/csharp/test/IceSSL/configuration/msbuild/client/generated/Test.cs:line 642
   at AllTests.allTests(TestHelper helper, String testDir) in /home/runner/work/ice/ice/csharp/test/IceSSL/configuration/AllTests.cs:line 2038
   at Client.run(String[] args) in /home/runner/work/ice/ice/csharp/test/IceSSL/configuration/Client.cs:line 26
   at Test.TestDriver.runTest[T](String[] args) in /home/runner/work/ice/ice/csharp/test/TestCommon/TestHelper.cs:line 226
bernardnormier commented 7 months ago

There was the same failure on Ubuntu in my PR build.

pepone commented 4 days ago

On main I get a similar error with this test:

*** [1/1 loop=67] Running csharp/IceSSL/configuration tests ***
[ running client/server test - 09/05/24 12:41:04 ]
(dotnet /workspaces/ice/csharp/test/IceSSL/configuration/msbuild/server/net8.0/server.dll --Ice.Default.Host=127.0.0.1 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3 --Ice.ThreadPool.Server.SizeWarn=0 --Ice.PrintAdapterReady=1 "/workspaces/ice/csharp/test/IceSSL/configuration")
(dotnet /workspaces/ice/csharp/test/IceSSL/configuration/msbuild/client/net8.0/client.dll --Ice.Default.Host=127.0.0.1 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 "/workspaces/ice/csharp/test/IceSSL/configuration")
client validates server certificate using validation callback... ok
client validates server certificate using system trusted root certificates... ok
client rejects server certificate using validation callback... ok
client rejects server certificate using default validation callback... ok
server validates client certificate using validation callback... ok
server rejects client certificate using validation callback... ok
server rejects client certificate using default validation callback... ok
server hot certificate reload... ok
testing certificate without password... ok
testing certificate verification... -! 9/5/2024 12:41:06:027 client: warning: connection exception:
   Ice.ConnectionLostException: Exception of type 'Ice.ConnectionLostException' was thrown.
      at Ice.Internal.StreamSocket.finishRead(Buffer buf) in /workspaces/ice/csharp/src/Ice/Internal/StreamSocket.cs:line 207
      at Ice.Internal.TcpTransceiver.finishRead(Buffer buf) in /workspaces/ice/csharp/src/Ice/Internal/TcpTransceiver.cs:line 61
      at Ice.Internal.IdleTimeoutTransceiverDecorator.finishRead(Buffer buf) in /workspaces/ice/csharp/src/Ice/Internal/IdleTimeoutTransceiverDecorator.cs:line 56
      at Ice.ConnectionI.finishAsync(Int32 operation) in /workspaces/ice/csharp/src/Ice/ConnectionI.cs:line 706
   local address = 127.0.0.1:46926
   remote address = 127.0.0.1:12010
Ice.ConnectionLostException: Exception of type 'Ice.ConnectionLostException' was thrown.
   at Test.ServerFactoryPrxHelper.destroyServer(ServerPrx srv, Dictionary`2 context) in /workspaces/ice/csharp/test/IceSSL/configuration/msbuild/client/generated/Test.cs:line 325
   at AllTests.allTests(TestHelper helper, String testDir) in /workspaces/ice/csharp/test/IceSSL/configuration/AllTests.cs:line 525
   at Client.run(String[] args) in /workspaces/ice/csharp/test/IceSSL/configuration/Client.cs:line 24
   at Test.TestHelper.runAsync(String[] args) in /workspaces/ice/csharp/test/TestCommon/TestHelper.cs:line 55
   at Test.TestDriver.runTestAsync[T](String[] args) in /workspaces/ice/csharp/test/TestCommon/TestHelper.cs:line 232
Traceback (most recent call last):
  File "/workspaces/ice/csharp/../s

The error seems to always happen when calling destroyServer which uses a plain TCP connection.

pepone commented 4 days ago

Interestingly the test doesn't fail when the calls to createServer/destroyServer are done from the main communicator.

With the current setup we do then from the temporary communicators that are created with the SSL setup for each sub-test.