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
2k stars 592 forks source link

Ice/inactivityTimeout test failure (C# CI) #2336

Open bernardnormier opened 1 week ago

bernardnormier commented 1 week ago

On debug macos

https://github.com/zeroc-ice/ice/actions/runs/9616790340/job/26527104938

*** [280/330] Running csharp/Ice/inactivityTimeout tests ***
[ running client/server test - 06/21/24 17:38:45 ]
- Config: ssl
(dotnet /Users/runner/work/ice/ice/csharp/test/Ice/inactivityTimeout/msbuild/server/net8.0/server.dll --Ice.Default.Host=127.0.0.1 --Test.BasePort=14000 --Ice.Warn.Connections=1 --Ice.Default.Protocol=ssl --Ice.IPv6=0 --Ice.Plugin.IceSSL= --IceSSL.*** --IceSSL.DefaultDir=/Users/runner/work/ice/ice/certs --IceSSL.CAs=cacert.pem --IceSSL.VerifyPeer=2 --IceSSL.CertFile=server.p12 --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3 --Ice.ThreadPool.Server.SizeWarn=0 --Ice.PrintAdapterReady=1)
(dotnet /Users/runner/work/ice/ice/csharp/test/Ice/inactivityTimeout/msbuild/client/net8.0/client.dll --Ice.Default.Host=127.0.0.1 --Test.BasePort=14000 --Ice.Warn.Connections=1 --Ice.Default.Protocol=ssl --Ice.IPv6=0 --Ice.Plugin.IceSSL= --IceSSL.*** --IceSSL.DefaultDir=/Users/runner/work/ice/ice/certs --IceSSL.CAs=cacert.pem --IceSSL.VerifyPeer=2 --IceSSL.CertFile=client.p12)
testing that the client side inactivity timeout shuts down the connection... ok
testing that the server side inactivity timeout shuts down the connection... ok
testing the inactivity timeout with an outstanding two-way request... ok
testing the inactivity timeout with an outstanding one-way request... -! 6/21/2024 17:38:58:710 client: warning: connection exception:
   Ice.ConnectionLostException
      at Ice.SSL.TransceiverI.finishRead(Buffer buf) in /Users/runner/work/ice/ice/csharp/src/Ice/SSL/TransceiverI.cs:line 165
      at Ice.Internal.IdleTimeoutTransceiverDecorator.finishRead(Buffer buf) in /Users/runner/work/ice/ice/csharp/src/Ice/Internal/IdleTimeoutTransceiverDecorator.cs:line 47
      at Ice.ConnectionI.finishAsync(Int32 operation) in /Users/runner/work/ice/ice/csharp/src/Ice/ConnectionI.cs:line 755
   local address = 127.0.0.1:50990
   remote address = 127.0.0.1:14000
Ice.ConnectionRefusedException
 ---> System.Net.Sockets.SocketException (61): Connection refused
   --- End of inner exception stack trace ---
   at Ice.Internal.OutgoingAsyncBase.invokeException() in /Users/runner/work/ice/ice/csharp/src/Ice/Internal/OutgoingAsync.cs:line 95
--- End of stack trace from previous location ---
   at Ice.inactivityTimeout.AllTests.testWithOutstandingRequest(TestIntfPrx p, Boolean oneway, TextWriter output) in /Users/runner/work/ice/ice/csharp/test/Ice/inactivityTimeout/AllTests.cs:line 86
   at Ice.inactivityTimeout.AllTests.allTests(TestHelper helper) in /Users/runner/work/ice/ice/csharp/test/Ice/inactivityTimeout/AllTests.cs:line 20
   at Ice.inactivityTimeout.Client.runAsync(String[] args) in /Users/runner/work/ice/ice/csharp/test/Ice/inactivityTimeout/Client.cs:line 16
   at Test.TestDriver.runTestAsync[T](String[] args) in /Users/runner/work/ice/ice/csharp/test/TestCommon/TestHelper.cs:line 232
Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'array')
   at System.ArgumentNullException.Throw(String paramName)
   at System.Buffer.ByteLength(Array array)
   at System.Buffer.GetByte(Array array, Int32 index)
   at Ice.Internal.ByteBuffer.get(Int32 pos) in /Users/runner/work/ice/ice/csharp/src/Ice/Internal/ByteBuffer.cs:line 187
   at Ice.ConnectionI.sendMessage(OutgoingMessage message) in /Users/runner/work/ice/ice/csharp/src/Ice/ConnectionI.cs:line 2122
   at Ice.ConnectionI.sendHeartbeat() in /Users/runner/work/ice/ice/csharp/src/Ice/ConnectionI.cs:line 1542
   at Ice.Internal.IdleTimeoutTransceiverDecorator.<>c__DisplayClass22_0.<.ctor>b__1(Object _) in /Users/runner/work/ice/ice/csharp/src/Ice/Internal/IdleTimeoutTransceiverDecorator.cs:line 112
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
   at System.Threading.TimerQueue.FireNextTimers()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()

It's not immediately clear if the trigger is the System.ArgumentNullException. So far I could not reproduce it.

bernardnormier commented 1 week ago

Similar failure with the idleTimeout test:


*** [106/259] Running csharp/Ice/idleTimeout tests ***
[ running client/server test - 06/21/24 17:43:26 ]
- Config: ssl,x64
(dotnet D:\a\ice\ice\csharp\test\Ice\idleTimeout\msbuild\server\net8.0\server.dll --Ice.Default.Host=127.0.0.1 --Ice.Warn.Connections=1 --Ice.Default.Protocol=ssl --Ice.IPv6=0 --Ice.Plugin.IceSSL= --IceSSL.*** --IceSSL.DefaultDir=D:\a\ice\ice\certs --IceSSL.CAs=cacert.pem --IceSSL.VerifyPeer=2 --IceSSL.CertFile=server.p12 --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3 --Ice.ThreadPool.Server.SizeWarn=0 --Ice.PrintAdapterReady=1 env={'PATH': 'D:\\a\\ice\\ice\\cpp\\msbuild\\packages\\bzip2..1.0.6.10\\build\\native\\bin\\x64\\Release'})
(dotnet D:\a\ice\ice\csharp\test\Ice\idleTimeout\msbuild\client\net8.0\client.dll --Ice.Default.Host=127.0.0.1 --Ice.Warn.Connections=1 --Ice.Default.Protocol=ssl --Ice.IPv6=0 --Ice.Plugin.IceSSL= --IceSSL.*** --IceSSL.DefaultDir=D:\a\ice\ice\certs --IceSSL.CAs=cacert.pem --IceSSL.VerifyPeer=2 --IceSSL.CertFile=client.p12 env={'PATH': 'D:\\a\\ice\\ice\\cpp\\msbuild\\packages\\bzip2..1.0.6.10\\build\\native\\bin\\x64\\Release'})
testing that the idle check does not abort a connection that receives heartbeats... ok
testing that the idle check aborts a connection that does not receive anything for 1s... Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'array')
   at System.ArgumentNullException.Throw(String paramName)
   at System.Buffer.ByteLength(Array array)
   at System.Buffer.GetByte(Array array, Int32 index)
   at Ice.Internal.ByteBuffer.get(Int32 pos) in D:\a\ice\ice\csharp\src\Ice\Internal\ByteBuffer.cs:line 187
   at Ice.ConnectionI.sendMessage(OutgoingMessage message) in D:\a\ice\ice\csharp\src\Ice\ConnectionI.cs:line 2122
   at Ice.ConnectionI.sendHeartbeat() in D:\a\ice\ice\csharp\src\Ice\ConnectionI.cs:line 1542
   at Ice.Internal.IdleTimeoutTransceiverDecorator.<>c__DisplayClass22_0.<.ctor>b__1(Object _) in D:\a\ice\ice\csharp\src\Ice\Internal\IdleTimeoutTransceiverDecorator.cs:line 112
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
   at System.Threading.TimerQueue.FireNextTimers()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
ok```
bernardnormier commented 1 week ago

I committed a temporary work-around for this failure.