icerpc-csharp icon indicating copy to clipboard operation
icerpc-csharp copied to clipboard

Connection_with_idle_timeout_and_slow_write_is_not_aborted Windows failure

Open pepone opened this issue 1 year ago • 2 comments

This test failed https://github.com/icerpc/icerpc-csharp/actions/runs/11842440314/job/33001037790

2024-11-14T17:35:36.6503337Z   Failed IceRpc:Tests:Transports:Slic:SlicTransportTests:Connection_with_idle_timeout_and_slow_write_is_not_aborted(True) [2 s]
2024-11-14T17:35:36.6504213Z   Error Message:
2024-11-14T17:35:36.6504629Z      Assert.That(nextAcceptStreamTask.IsCompleted, Is.False)
2024-11-14T17:35:36.6505132Z   Expected: False
2024-11-14T17:35:36.6505413Z   But was:  True
2024-11-14T17:35:36.6505596Z 
2024-11-14T17:35:36.6505714Z   Stack Trace:
2024-11-14T17:35:36.6506999Z      at IceRpc.Tests.Transports.Slic.SlicTransportTests.Connection_with_idle_timeout_and_slow_write_is_not_aborted(Boolean serverIdleTimeout) in D:\a\icerpc-csharp\icerpc-csharp\tests\IceRpc.Tests\Transports\Slic\SlicTransportTests.cs:line 629
2024-11-14T17:35:36.6508807Z    at IceRpc.Tests.Transports.Slic.SlicTransportTests.Connection_with_idle_timeout_and_slow_write_is_not_aborted(Boolean serverIdleTimeout) in D:\a\icerpc-csharp\icerpc-csharp\tests\IceRpc.Tests\Transports\Slic\SlicTransportTests.cs:line 631
2024-11-14T17:35:36.6509881Z    at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
2024-11-14T17:35:36.6510589Z    at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
2024-11-14T17:35:36.6511254Z    at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
2024-11-14T17:35:36.6511734Z    at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
2024-11-14T17:35:36.6512299Z    at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
2024-11-14T17:35:36.6512959Z    at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
2024-11-14T17:35:36.6513588Z    at NUnit.Framework.Internal.Commands.BeforeTestCommand.Execute(TestExecutionContext context)
2024-11-14T17:35:36.6514399Z    at NUnit.Framework.Internal.Execution.SimpleWorkItem.<>c__DisplayClass3_0.<PerformWork>b__0()
2024-11-14T17:35:36.6515002Z    at NUnit.Framework.Internal.ContextUtils.<>c__DisplayClass1_0`1.<DoIsolated>b__0(Object _)

pepone avatar Nov 14 '24 18:11 pepone

It seems like the server connection is already closed when we accept the next stream:

ValueTask<IMultiplexedStream> nextAcceptStreamTask = sut.Server.AcceptStreamAsync(default);

I don't see other way this code could return a completed task.

pepone avatar Nov 14 '24 18:11 pepone

And it's closed because sut.Server idle timed out?

bernardnormier avatar Nov 14 '24 18:11 bernardnormier