Skip to content

System.Net.Sockets.Tests.DualMode.AcceptV6BoundToSpecificV4_CantConnect hangs on Unix #16265

Description

@ericeil

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.

Activity

  1. self-assigned this
    on Feb 2, 2016
  2. ericeil commented on Feb 4, 2016

    @ericeil
    ContributorAuthor

    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.

  3. stephentoub commented on Feb 4, 2016

    @stephentoub
    Member

    Does a signal cause it to wake up with EINTR?

  4. ericeil commented on Feb 10, 2016

    @ericeil
    ContributorAuthor

    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).

  5. ericeil commented on Jul 25, 2016

    @ericeil
    ContributorAuthor

    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.

  6. transferred this issue fromdotnet/corefxon Jan 31, 2020
  7. added this to the 1.1.0 milestone on Jan 31, 2020
  8. ghost locked as resolved and limited conversation to collaborators on Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-System.Netdisabled-testThe test is disabled in source code against the issueos-linuxLinux OS (any supported distro)

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions