Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test System.Net.Sockets.Tests.*.SendRecvPollSync_TcpListener_Socket(listenAt: ::1, pollBeforeOperation: True) failed in CI. #1479

Closed
Sunny-pu opened this issue May 23, 2018 · 14 comments
Assignees
Labels
area-System.Net.Sockets disabled-test The test is disabled in source code against the issue test-run-core Test failures in .NET Core test runs
Milestone

Comments

@Sunny-pu
Copy link

Sunny-pu commented May 23, 2018

Edit by @antonfirsov: recent failures seem to happen on Windows only, see #1479 (comment).


Test: System.Net.Sockets.Tests.SendReceiveMemoryNativeTask.SendRecvPollSync_TcpListener_Socket(listenAt: ::1, pollBeforeOperation: True) has failed.

MESSAGE:
Assert.Equal() Failure\nExpected: 123456\nActual: 123455
+++++++++++++++++++
STACK TRACE:
at System.Net.Sockets.Tests.SendReceive`1.SendRecvPollSync_TcpListener_Socket(IPAddress listenAt, Boolean pollBeforeOperation) in /mnt/j/workspace/dotnet_corefx/master/outerloop_netcoreapp_ubuntu16.04_debug/src/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs:line 630 --- End of stack trace from previous location where exception was thrown ---

Details:
https://ci.dot.net/job/dotnet_corefx/job/master/job/outerloop_netcoreapp_ubuntu16.04_debug/403/testReport/System.Net.Sockets.Tests/SendReceiveMemoryNativeTask/SendRecvPollSync_TcpListener_Socket_listenAt____1__pollBeforeOperation__True_/

@karelz
Copy link
Member

karelz commented May 23, 2018

@rmkerr can you please check how common is the failure?

@rmkerr
Copy link
Contributor

rmkerr commented May 23, 2018

@karelz it's failed five times in the last two weeks. That isn't including the recent Nano failures, or a catastrophic failure that briefly caused all tests to fail on RHEL 6.9.

With the failure today it's jumped up to the second most common networking failure over the last two weeks, after dotnet/corefx#29742.

@karelz
Copy link
Member

karelz commented May 23, 2018

Sounds like worth deeper investigation, especially if it started failing this often recently-ish.

@wfurt
Copy link
Member

wfurt commented Apr 25, 2019

This test is still failing on Windows10RS4 and Nano.

https://mc.dot.net/#/product/netcore/30/source/official~2Fdotnet~2Fcorefx~2Frefs~2Fheads~2Fmaster/type/test~2Ffunctional~2Fcli~2F/build/20190423.6/workItem/System.Net.Sockets.Tests/wilogs

    System.Net.Sockets.Tests.SendReceiveSync.SendRecvPollSync_TcpListener_Socket(listenAt: 127.0.0.1, pollBeforeOperation: False) [FAIL]
      Read poll after completion should have succeeded
      Expected: True
      Actual:   False
      Stack Trace:
        F:\workspace\_work\1\s\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(598,0): at System.Net.Sockets.Tests.SendReceive`1.<>c__DisplayClass8_1.<<SendRecvPollSync_TcpListener_Socket>b__0>d.MoveNext()
        --- End of stack trace from previous location where exception was thrown ---
        F:\workspace\_work\1\s\src\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(83,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        F:\workspace\_work\1\s\src\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(111,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        F:\workspace\_work\1\s\src\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(71,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)
        F:\workspace\_work\1\s\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(645,0): at System.Net.Sockets.Tests.SendReceive`1.SendRecvPollSync_TcpListener_Socket(IPAddress listenAt, Boolean pollBeforeOperation)
        --- End of stack trace from previous location where exception was thrown ---
      Output:
        4/23/2019 5:08:32 PM Starting listener at 127.0.0.1:53456

Documentation onn Poll() says:

true if Listen(Int32) has been called and a connection is pending; -or- true if data is available for reading; -or- true if the connection has been closed, reset, or terminated; otherwise, returns false.

Do you have any recommendation @davidsh what additional instrumentation should we add?

@davidsh
Copy link
Contributor

davidsh commented Apr 25, 2019

All the tests in this file are historically flaky. You'll notice that many of them are Outerloop and yet don't contact external servers. That's because they were so unstable at the time that we moved them to Outerloop.

poll() operations of sockets in Windows especially loopback can be problematic because of interesting optimizations for fastpath I/O that Windows does in the loopback adapter.

Unless we want to spend a lot of time making these tests more stable, I would disable this particular test with an ActiveIssue for now.

@karelz karelz transferred this issue from dotnet/corefx Jan 9, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Net.Sockets untriaged New issue has not been triaged by the area owner labels Jan 9, 2020
@karelz karelz added os-linux Linux OS (any supported distro) test-run-core Test failures in .NET Core test runs and removed untriaged New issue has not been triaged by the area owner labels Jan 9, 2020
@karelz karelz added this to the 5.0 milestone Jan 9, 2020
@karelz karelz modified the milestones: 5.0, Future Jun 5, 2020
@v-haren
Copy link

v-haren commented Sep 10, 2020

failed again in job: runtime-libraries-coreclr outerloop 20200909.3

failed test: System.Net.Sockets.Tests.SendReceiveApm.SendRecvPollSync_TcpListener_Socket(listenAt: ::1, pollBeforeOperation: False)

net5.0-Windows_NT-Release-x64-CoreCLR_release-Windows.81.Amd64.Open

Error message

Read poll after completion should have succeeded
Expected: True
Actual:   False


Stack trace
   at System.Net.Sockets.Tests.SendReceive`1.<>c__DisplayClass10_0.<<SendRecvPollSync_TcpListener_Socket>b__0>d.MoveNext() in /_/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs:line 605
--- End of stack trace from previous location ---
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 96
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 124
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 84
   at System.Net.Sockets.Tests.SendReceive`1.SendRecvPollSync_TcpListener_Socket(IPAddress listenAt, Boolean pollBeforeOperation) in /_/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs:line 645
--- End of stack trace from previous location ---

@v-haren
Copy link

v-haren commented Dec 24, 2020

failed again in job: runtime-libraries-coreclr outerloop 20201223.2

failed test: System.Net.Sockets.Tests.SendReceive_Sync.SendRecvPollSync_TcpListener_Socket(listenAt: 127.0.0.1, pollBeforeOperation: False)

net6.0-windows-Release-x64-CoreCLR_release-(Windows.Nano.1809.Amd64.Open)windows.10.amd64.serverrs5.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1809-helix-amd64-08e8e40-20200107182504

Error message

Read poll after completion should have succeeded
Expected: True
Actual:   False


Stack trace
   at System.Net.Sockets.Tests.SendReceive`1.<>c__DisplayClass7_0.<<SendRecvPollSync_TcpListener_Socket>b__0>d.MoveNext() in /_/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs:line 521
--- End of stack trace from previous location ---
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 96
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 124
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 90
   at System.Net.Sockets.Tests.SendReceive`1.SendRecvPollSync_TcpListener_Socket(IPAddress listenAt, Boolean pollBeforeOperation) in /_/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs:line 575
--- End of stack trace from previous location ---

@antonfirsov antonfirsov removed the os-linux Linux OS (any supported distro) label Jan 27, 2021
@antonfirsov
Copy link
Member

Removed os-linux label, since all recent failures seem to happen on Windows according to Kusto.

@antonfirsov antonfirsov changed the title Test System.Net.Sockets.Tests.SendReceiveMemoryNativeTask.SendRecvPollSync_TcpListener_Socket(listenAt: ::1, pollBeforeOperation: True) failed in CI. Test System.Net.Sockets.Tests.*.SendRecvPollSync_TcpListener_Socket(listenAt: ::1, pollBeforeOperation: True) failed in CI. Mar 10, 2021
@antonfirsov
Copy link
Member

Recent failures are happening in sync variants.

@VincentBu
Copy link
Contributor

Similar test failed in runtime-libraries-coreclr outerloop 20210401.4

Failed test:

net6.0-windows-Release-x64-CoreCLR_release-Windows.81.Amd64.Open
 -System.Net.Sockets.Tests.SendReceive_SpanSyncForceNonBlocking.SendRecvPollSync_TcpListener_Socket(listenAt: ::1, pollBeforeOperation: False)

Error message:

Read poll after completion should have succeeded
Expected: True
Actual:   False


Stack trace
   at System.Net.Sockets.Tests.SendReceive`1.<>c__DisplayClass7_0.<<SendRecvPollSync_TcpListener_Socket>b__0>d.MoveNext() in /_/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs:line 521
--- End of stack trace from previous location ---
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 63
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 82
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 49
   at System.Net.Sockets.Tests.SendReceive`1.SendRecvPollSync_TcpListener_Socket(IPAddress listenAt, Boolean pollBeforeOperation) in /_/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs:line 575
--- End of stack trace from previous location ---

@VincentBu
Copy link
Contributor

Failed again in runtime-libraries-coreclr outerloop 20210411.4

Faield test:

net6.0-windows-Release-x64-CoreCLR_release-Windows.81.Amd64.Open
 -System.Net.Sockets.Tests.SendReceive_SpanSync.SendRecvPollSync_TcpListener_Socket(listenAt: ::1, pollBeforeOperation: False)

Error message:

Read poll after completion should have succeeded
Expected: True
Actual:   False


Stack trace
   at System.Net.Sockets.Tests.SendReceive`1.<>c__DisplayClass7_0.<<SendRecvPollSync_TcpListener_Socket>b__0>d.MoveNext() in /_/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs:line 521
--- End of stack trace from previous location ---
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 63
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 82
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 49
   at System.Net.Sockets.Tests.SendReceive`1.SendRecvPollSync_TcpListener_Socket(IPAddress listenAt, Boolean pollBeforeOperation) in /_/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs:line 575
--- End of stack trace from previous location ---

@ghost ghost added in-pr There is an active PR which will close this issue when it is merged and removed in-pr There is an active PR which will close this issue when it is merged labels Apr 13, 2021
@MihaZupan
Copy link
Member

Disabled for Windows 8 in #51186

@MihaZupan MihaZupan added the disabled-test The test is disabled in source code against the issue label Apr 14, 2021
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this issue Dec 9, 2021
Updating my ZeroSharp samples and this is getting in the way. The fix we did in dotnet/runtimelab#743 was insufficient (I want things to be debuggable in ZeroSharp).
@wfurt
Copy link
Member

wfurt commented Nov 30, 2022

triage: we should re-enable the test and fix it if we see failures.

@karelz
Copy link
Member

karelz commented Jun 9, 2023

Fixed in #79145

@karelz karelz closed this as completed Jun 9, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Sockets disabled-test The test is disabled in source code against the issue test-run-core Test failures in .NET Core test runs
Projects
None yet
Development

No branches or pull requests