Skip to content

Cygwin: asyncio and asyncore test suites hang indefinitely due to bug in Cygwin #76063

Closed

Description

@embray
BPO 31882
Nosy @embray, @iritkatriel
PRs
  • bpo-31882: Cygwin: fix/skip some tests to work around hang in asyncio/asyncore test suites #4149
  • Superseder
  • bpo-45537: Cygwin is unsupported - close all open issues and list them here.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-10-20.12:06:19.062>
    created_at = <Date 2017-10-27.13:08:09.394>
    labels = ['type-crash']
    title = 'Cygwin: asyncio and asyncore test suites hang indefinitely due to bug in Cygwin'
    updated_at = <Date 2021-10-21.09:57:35.998>
    user = 'https://github.com/embray'

    bugs.python.org fields:

    activity = <Date 2021-10-21.09:57:35.998>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-10-20.12:06:19.062>
    closer = 'iritkatriel'
    components = []
    creation = <Date 2017-10-27.13:08:09.394>
    creator = 'erik.bray'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31882
    keywords = ['patch']
    message_count = 5.0
    messages = ['305118', '321947', '404298', '404303', '404305']
    nosy_count = 2.0
    nosy_names = ['erik.bray', 'iritkatriel']
    pr_nums = ['4149']
    priority = 'normal'
    resolution = 'wont fix'
    stage = 'resolved'
    status = 'closed'
    superseder = '45537'
    type = 'crash'
    url = 'https://bugs.python.org/issue31882'
    versions = []

    Activity

    1. embray commented on Oct 27, 2017

      @embray
      ContributorAuthor

      Some of the tests for asyncio and asyncore block forever on Cygwin, due to a known (and seemingly difficult to fix) bug [1] in Cygwin involving SO_PEERCRED on UNIX sockets.

      SO_PEERCRED is a socket option that can be used to exchange file ownership info of the socket at the time the connection was established (specifically on UNIX sockets). This feature is technically supported on Cygwin, but the effect of the bug is that if two sockets are opened on the same process (even without using socketpair()), the credential exchange protocol can cause connect() on the "client" socket to block unless the "server" socket is already listen()-ing.

      This situation is not all that common in practice (it is not a problem if the "client" and "server" are separate processes). But it does show up in the test suite in a number of places, since both sockets belong to the same process.

      I have a patch to work around this and will post a PR shortly.

      [1] https://cygwin.com/ml/cygwin/2017-01/msg00054.html

    2. added
      type-crashA hard crash of the interpreter, possibly with a core dump
      on Oct 27, 2017
    3. embray commented on Jul 19, 2018

      @embray
      ContributorAuthor

      I originally opened this in https://bugs.python.org/issue29253 but then made a dupe of my own bug! Anyways, there's a (nearly year old) pull request for it now.

    4. iritkatriel commented on Oct 19, 2021

      @iritkatriel
      Member

      See discussion on bpo-31885.

    5. embray commented on Oct 19, 2021

      @embray
      ContributorAuthor

      To my knowledge this issue is *not* fixed upstream. However, my PR no doubt needs rebasing.

    6. iritkatriel commented on Oct 19, 2021

      @iritkatriel
      Member

      Sorry I thought this was the same issue.

      Note that asyncore is deprecated now.

    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      type-crashA hard crash of the interpreter, possibly with a core dump

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions