Skip to content

ignore loopback NoDelay failure on OSX - #38900

Merged
wfurt merged 2 commits into
dotnet:masterfrom
wfurt:osx_nodelay_38159
Jul 8, 2020
Merged

wfurt merged 2 commits into
dotnet:masterfrom
wfurt:osx_nodelay_38159

Conversation

@wfurt

@wfurt wfurt commented Jul 7, 2020

Copy link
Copy Markdown
Member

After doing some research, this seems to be know OSX issue other projects encountered.

      System.Net.Sockets.SocketException : Invalid argument
      Stack Trace:
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs(5068,0): at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs(4589,0): at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue, Boolean silent)
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs(1797,0): at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue)
        /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs(631,0): at System.Net.Sockets.Socket.set_NoDelay(Boolean value)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(124,0): at System.Net.Test.Common.LoopbackServer.EstablishConnectionAsync()
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(130,0): at System.Net.Test.Common.LoopbackServer.AcceptConnectionAsync(Func`2 funcAsync)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(83,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(111,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(83,0): at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass11_0.<<CreateClientAndServerAsync>b__0>d.MoveNext()

There is really nothing about invalid arguments. I was wondering if we should fix it in PAL so socket.NoDelay does not throw.
But since we have no reports of users hitting this, I decided to fix our test Loopback server to simply ignore it.

fixes #38159

@wfurt wfurt added os-macos macOS aka OSX test-enhancement Improvements of test source code labels Jul 7, 2020
@wfurt
wfurt requested a review from a team July 7, 2020 23:40
@wfurt wfurt self-assigned this Jul 7, 2020
@ghost

ghost commented Jul 7, 2020

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.

@stephentoub stephentoub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we've not heard about any other issues with it, seems like a reasonable stop-gap until we do.

@wfurt
wfurt merged commit 5eb4ccb into dotnet:master Jul 8, 2020
@wfurt
wfurt deleted the osx_nodelay_38159 branch July 8, 2020 17:09
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Net.Http os-macos macOS aka OSX test-enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException failures in OSX

4 participants