You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
System.Net.Sockets.Tests.DualMode.AcceptV6BoundToSpecificV4_CantConnect hangs on Unix #16265
With PR dotnet/corefx#5472, System.Net.Sockets.Tests.DualMode.AcceptV6BoundToSpecificV4_CantConnect hangs because it expects Socket.Dispose to unblock a synchronous call to Socket.Accept. Closing a socket does not cancel a blocking operation on Unix OSs.
Note that calling shutdown on the socket prior to closing it seems to unblock the pending accept on Linux. But it causes an error on OSX and Windows. I haven't found a way to unblock a pending accept on OSX, other than to simply successfully connect to the socket.
Fixing this with signals may be an option. Moving this to "future" for now; I'm not sure this is something we actually need to fix (depends on how much existing code depends on Dispose for cancellation).
Activity
Disable AcceptV6BoundToSpecificV4_CantConnect on Unix due to #5832.
Disable AcceptV4BoundToSpecificV6_CantConnect on Unix due to #5832.
Disable AcceptV6BoundToAnyV4_CantConnect on Unix due to #5832.
ericeil commentedon Feb 4, 2016
Note that calling
shutdownon the socket prior to closing it seems to unblock the pendingaccepton Linux. But it causes an error on OSX and Windows. I haven't found a way to unblock a pending accept on OSX, other than to simply successfully connect to the socket.stephentoub commentedon Feb 4, 2016
Does a signal cause it to wake up with EINTR?
ericeil commentedon Feb 10, 2016
Fixing this with signals may be an option. Moving this to "future" for now; I'm not sure this is something we actually need to fix (depends on how much existing code depends on Dispose for cancellation).
ericeil commentedon Jul 25, 2016
See https://github.com/dotnet/corefx/issues/5749#issuecomment-215597396. Turns out closing a managed Socket while there are pending synchronous operations isn't really supported on Windows either. Let's not complicate the x-plat implementation to support this.
Change ActiveIssue to PlatformSpecific for closed issue #5832.
Change ActiveIssue to PlatformSpecific for closed issue #5832. (#10308)