SendRecvPollSync_TcpListener_Socket outerloop test is flaky
When running this test in System.Net.Socket.Test.dll, I occasionally get the following exception:
System.Net.Sockets.Tests.SendReceive.SendRecvPollSync_TcpListener_Socket(listenAt: 127.0.0.1, pollBefore
Operation: False) [FAIL]
System.AggregateException : One or more errors occurred. (An existing connection was forcibly closed
by the remote host)
---- System.Net.Sockets.SocketException : An existing connection was forcibly closed by the remote ho
st
Stack Trace:
at System.ThrowHelper.ThrowAggregateException(List`1 exceptions)
at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationTok
en cancellationToken)
at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout)
C:\github\geoffkizer\corefx\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(1184,0): a
t System.Net.Sockets.Tests.SendReceive.SendRecvPollSync_TcpListener_Socket(IPAddress listenAt, Boolean poll
BeforeOperation)
----- Inner Stack Trace -----
C:\github\geoffkizer\corefx\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(1436,0): at Sy
stem.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
C:\github\geoffkizer\corefx\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(1138,0): a
t System.Net.Sockets.Tests.SendReceive.<>c__DisplayClass27_1.<<SendRecvPollSync_TcpListener_Socket>b__0>d.M
oveNext()
Looks like a timing issue somewhere.
cc @steveharter
FYI CI last failure was 1\7\2017 (from 12\1\2016):
Test Case: System.Net.Sockets.Tests.SendReceive.SendRecvPollSync_TcpListener_Socket(listenAt: 127.0.0.1, pollBeforeOperation: True)
Failed Jenkins Jobs
Build Number Machine Name Date
dotnet_corefx/master/outerloop_win10_debug 50 win2016-9b32d0 12/30 01:30 PM
dotnet_corefx/master/outerloop_win10_debug 53 win2016-c4e0c0 01/03 01:31 PM
dotnet_corefx/master/outerloop_windows_nt_release 61 win2012-a995a0 01/07 11:12 AM
Test Case: System.Net.Sockets.Tests.SendReceive.SendRecvPollSync_TcpListener_Socket(listenAt: ::1, pollBeforeOperation: True)
Failed Jenkins Jobs
Build Number Machine Name Date
dotnet_corefx/master/outerloop_win10_debug 47 win2016-c006c0 12/26 01:30 PM
dotnet_corefx/master/outerloop_win7_debug 57 win2008-ebb680 01/05 08:30 PM
I have not seen this recently either.
Let's close it out and re-open if it shows up again. It's possible it's been addressed by the various sockets fixes we've made over the last few months.
I can repro this on both Windows 2008 and Windows 10 CI machines when running repeatedly.
Exception same in both cases
System.Net.Sockets.Tests.SendReceiveEap.SendRecvPollSync_TcpListener_Socket(listenAt: ::1, pollBeforeOperation: False) [FAIL]
System.AggregateException : One or more errors occurred. (Read poll after completion should have succeeded
Expected: True
Actual: False)
---- Read poll after completion should have succeeded
Expected: True
Actual: False
Stack Trace:
at System.ThrowHelper.ThrowAggregateException(List`1 exceptions)
at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout)
at System.Net.Sockets.Tests.SendReceive.SendRecvPollSync_TcpListener_Socket(IPAddress listenAt, Boolean pollBeforeOperation)
----- Inner Stack Trace -----
at System.Net.Sockets.Tests.SendReceive.<>c__DisplayClass22_1.<<SendRecvPollSync_TcpListener_Socket>b__0>d.MoveNext()
@steveharter how often does it repro in official CI? (milestone 2.0 vs. Future) How often does it reproduce in your stress run? Is it the run-in-a-loop run or real GCStress run?
jdash results are sparse and localized to January and earlier:
dotnet_corefx/master/outerloop_win10_debug 53 win2016-c4e0c0 01/03 01:31 PM 0
dotnet_corefx/master/outerloop_windows_nt_release 61 win2012-a995a0 01/07 11:12 AM 0
dotnet_corefx/master/outerloop_win7_debug 57 win2008-ebb680 01/05 08:30 PM 0
On Win10, it was a repeated loop (not GCStress) and occurred 5 times out of ~200 runs. Win 2008 was similar (~2% of tests failed because of this).
I have not been able to repro locally on Win10 (only on the CI machines)
Did you mean January and later? -- I hope we have some recent data to look at in general ...
No, I meant earlier. There were some 'known' failures in 2016 (based on previous replies in this issue) that I did not report as the jdash query times become too long.
So we have no history in jdash form 2017 February-April?
For this test, yes. Meaning it didn't fail since then or there were some gaps in jdash data.
I still don't quite understand, sorry - jdash saves only failures, right? So if there is no failure since Feb, either it means it didn't fail since, or that some hiccup in jdash didn't record the new failure data. Is that correct? Is there any general reason to believe that jdash lost some data since Feb?
Correct it hasn't failed since then or when it did fail, it failed during an outage. There hasn't been any jdash data loss AFAIK, only a couple gaps that I'm aware of, each lasting a few days at a time.
Given a 2-3% failure rate when running under a loop, that would fall into the bucket of fairly rare (1\month or thereabouts) so in the range of moving to future.
Moving to future since does not meet current threshold, and because it is very similar to other existing issues which are already tracked.
This issue is repro on build 20170424.01, detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20170424.01/workItem/System.Net.Sockets.Tests/analysis/xunit/System.Net.Sockets.Tests.SendReceiveSync~2FSendRecvPollSync_TcpListener_Socket(listenAt:%20127.0.0.1,%20pollBeforeOperation:%20False)
This issue is repro on Core Tests in build 20170427.01, detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20170427.01/workItem/System.Net.Sockets.Tests/analysis/xunit/System.Net.Sockets.Tests.SendReceiveApm~2FSendRecvPollSync_TcpListener_Socket(listenAt:%20::1,%20pollBeforeOperation:%20True)
This issue is repro on outerloop_win7_release, detail: https://ci.dot.net/job/dotnet_corefx/job/master/job/outerloop_netcoreapp_win7_release/32/testReport/System.Net.Sockets.Tests/SendReceiveApm/SendRecvPollSync_TcpListener_Socket_listenAt____1__pollBeforeOperation__True_/
It seems to be now failing roughly 1/week
Again https://mc.dot.net/#/product/netcore/200/source/official~2Fcorefx~2Frelease~2F2.0.0~2F/type/test~2Ffunctional~2Fcli~2F/build/20170520.01/workItem/System.Net.Sockets.Tests/analysis/xunit/System.Net.Sockets.Tests.SendReceiveApm~2FSendRecvPollSync_TcpListener_Socket(listenAt:%20::1,%20pollBeforeOperation:%20True)
This has higher frequency - @DavidGoll we should prioritize it in 2.1 schedule.