dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.15k stars 4.71k forks source link

Test: System.Net.WebSockets.Client.Tests.KeepAliveTest / KeepAlive_LongDelayBetweenSendReceives_Succeeds #23163

Closed ghost closed 4 years ago

ghost commented 7 years ago

Opened on behalf of @Jiayili1

The test System.Net.WebSockets.Client.Tests.KeepAliveTest/KeepAlive_LongDelayBetweenSendReceives_Succeeds has failed.

System.Net.WebSockets.WebSocketException : The WebSocket is in an invalid state ('Aborted') for this operation. Valid states are: 'Open, CloseReceived, CloseSent, Closed'

    Stack Trace:

       at System.Net.WebSockets.WinRTWebSocket.CheckValidState($WebSocketState[] validStates) in E:\A\_work\908\s\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WinRTWebSocket.cs:line 546
   at System.Net.WebSockets.WinRTWebSocket.InterlockedCheckAndUpdateCloseState($WebSocketState newState, $WebSocketState[] validStates) in E:\A\_work\908\s\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WinRTWebSocket.cs:line 508
   at System.Net.WebSockets.WinRTWebSocket.<CloseAsync>d__36.MoveNext() in E:\A\_work\908\s\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WinRTWebSocket.cs:line 259
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs:line 61
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 178
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 147
   at System.Net.WebSockets.Client.Tests.KeepAliveTest.<KeepAlive_LongDelayBetweenSendReceives_Succeeds>d__1.MoveNext() in E:\A\_work\908\s\corefx\src\System.Net.WebSockets.Client\tests\KeepAliveTest.cs:line 33
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs:line 61
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 178
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 147
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs:line 61
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 178
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 147
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs:line 61
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 178
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 147

Build : UWP 6.0 - 20170813.01 (UWP ILC Tests) Failing configurations:

Detail: https://mc.dot.net/#/product/netcore/uwp60/source/official~2Fcorefx~2Frelease~2Fuwp6.0~2F/type/test~2Ffunctional~2Filc~2F/build/20170813.01/workItem/System.Net.WebSockets.Client.Tests.Execution/analysis/xunit/System.Net.WebSockets.Client.Tests.KeepAliveTest~2FKeepAlive_LongDelayBetweenSendReceives_Succeeds

joperezr commented 7 years ago

@davidsh is this just another transient issue? It only failed on Release configuration.

davidsh commented 7 years ago

Most likely yes.

KristinXie1 commented 7 years ago

Failed again,, detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Filc~2F/build/20170818.01/workItem/System.Net.WebSockets.Client.Tests.Execution/analysis/xunit/System.Net.WebSockets.Client.Tests.KeepAliveTest~2FKeepAlive_LongDelayBetweenSendReceives_Succeeds

The test System.Net.WebSockets.Client.Tests.KeepAliveTest/KeepAlive_LongDelayBetweenSendReceives_Succeeds has failed.

System.Net.WebSockets.WebSocketException : The WebSocket is in an invalid state ('Aborted') for this operation. Valid states are: 'Open, CloseReceived, CloseSent, Closed'

    Stack Trace:

       at System.Net.WebSockets.WinRTWebSocket.CheckValidState($WebSocketState[] validStates) in E:\A\_work\1193\s\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WinRTWebSocket.cs:line 546
   at System.Net.WebSockets.WinRTWebSocket.InterlockedCheckAndUpdateCloseState($WebSocketState newState, $WebSocketState[] validStates) in E:\A\_work\1193\s\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WinRTWebSocket.cs:line 508
   at System.Net.WebSockets.WinRTWebSocket.<CloseAsync>d__36.MoveNext() in E:\A\_work\1193\s\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WinRTWebSocket.cs:line 259
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs:line 61
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 178
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 147
   at System.Net.WebSockets.Client.Tests.KeepAliveTest.<KeepAlive_LongDelayBetweenSendReceives_Succeeds>d__1.MoveNext() in E:\A\_work\1193\s\corefx\src\System.Net.WebSockets.Client\tests\KeepAliveTest.cs:line 33
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs:line 61
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 178
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 147
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs:line 61
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 178
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 147
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs:line 61
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 178
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 147

Build : Master - 20170818.01 (UWP ILC Tests) Failing configurations:

davidsh commented 7 years ago

This is a test having a race condition. Can be fixed later.

KristinXie1 commented 7 years ago

failed again: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Filc~2F/build/20170906.01/workItem/System.Net.WebSockets.Client.Tests.Execution/analysis/xunit/System.Net.WebSockets.Client.Tests.KeepAliveTest~2FKeepAlive_LongDelayBetweenSendReceives_Succeeds

System.Net.WebSockets.WebSocketException : The WebSocket is in an invalid state ('Aborted') for this operation. Valid states are: 'Open, CloseReceived, CloseSent, Closed'

at System.Net.WebSockets.WinRTWebSocket.CheckValidState($WebSocketState[] validStates) in E:\A_work\514\s\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WinRTWebSocket.cs:line 546 at System.Net.WebSockets.WinRTWebSocket.InterlockedCheckAndUpdateCloseState($WebSocketState newState, $WebSocketState[] validStates) in E:\A_work\514\s\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WinRTWebSocket.cs:line 508 at System.Net.WebSockets.WinRTWebSocket.d36.MoveNext() in E:\A_work\514\s\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WinRTWebSocket.cs:line 259 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs:line 61 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 178 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 147 at System.Net.WebSockets.Client.Tests.KeepAliveTest.d1.MoveNext() in E:\A_work\514\s\corefx\src\System.Net.WebSockets.Client\tests\KeepAliveTest.cs:line 33 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs:line 61 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 178 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 147 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs:line 61 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 178 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 147 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs:line 61 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 178 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs:line 147

davidsh commented 5 years ago

This is most likely fixed with the latest UWP 6.2.8: https://www.nuget.org/packages/Microsoft.NETCore.UniversalWindowsPlatform/