Skip to content

test_socket.test_create_connection() failed with EADDRNOTAVAIL (err 99) #76091

Closed

Description

@vstinner
BPO 31910
Nosy @vstinner, @berkerpeksag, @vadmium, @serhiy-storchaka
PRs
  • bpo-31910: Fix test_socket.test_create_connection() #4206
  • [3.6] bpo-31910: Fix test_socket.test_create_connection() (GH-4206) #4208
  • [2.7] bpo-31910: Fix test_socket.test_create_connection() (GH-4206) #4209
  • 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 2017-11-08.13:53:09.547>
    created_at = <Date 2017-10-31.17:05:22.577>
    labels = ['3.7', 'type-bug', 'tests']
    title = 'test_socket.test_create_connection() failed with EADDRNOTAVAIL (err 99)'
    updated_at = <Date 2017-11-08.13:53:09.545>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-11-08.13:53:09.545>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-11-08.13:53:09.547>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2017-10-31.17:05:22.577>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31910
    keywords = ['patch']
    message_count = 8.0
    messages = ['305316', '305336', '305346', '305353', '305376', '305377', '305821', '305842']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'berker.peksag', 'martin.panter', 'serhiy.storchaka']
    pr_nums = ['4206', '4208', '4209']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue31910'
    versions = ['Python 3.7']

    Activity

    1. vstinner commented on Oct 31, 2017

      @vstinner
      MemberAuthor

      On my PR 4200 which is unrelated to networking, the following test failed once.

      FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 4537, in test_create_connection
          self.assertIn(cm.exception.errno, expected_errnos)
      AssertionError: 99 not found in [111, 101]

      With error codes:

      • 99: EADDRNOTAVAIL: Cannot assign requested address
      • 111: ECONNREFUSED: Connection refused
      • 101: ENETUNREACH: Network is unreachable

      Maybe we shold include EADDRNOTAVAIL in the expected error codes?

    2. serhiy-storchaka commented on Oct 31, 2017

      @serhiy-storchaka
      Member

      I'm not a networking but it seems reasonable. If I understand correctly, EADDRNOTAVAIL can be raised on the Travis CI when a large number of network connections are created simultaneously by other CI tests.

      Or maybe just repeat the test if EADDRNOTAVAIL is raised?

    3. vstinner commented on Nov 1, 2017

      @vstinner
      MemberAuthor

      Or maybe just repeat the test if EADDRNOTAVAIL is raised?

      I don't think that it's worth it.

    4. vstinner commented on Nov 1, 2017

      @vstinner
      MemberAuthor

      New changeset 280c22a by Victor Stinner in branch 'master':
      Fix test_socket.test_create_connection() (bpo-4206)
      280c22a

    5. vstinner commented on Nov 1, 2017

      @vstinner
      MemberAuthor

      New changeset 89b84b0 by Victor Stinner (Miss Islington (bot)) in branch '3.6':
      Fix test_socket.test_create_connection() (GH-4206) (bpo-4208)
      89b84b0

    6. vstinner commented on Nov 1, 2017

      @vstinner
      MemberAuthor

      New changeset 4b73a79 by Victor Stinner (Miss Islington (bot)) in branch '2.7':
      Fix test_socket.test_create_connection() (GH-4206) (bpo-4209)
      4b73a79

    7. berkerpeksag commented on Nov 8, 2017

      @berkerpeksag
      Member

      I don't see this failure on Travis for a while now. Can this issue be closed?

    8. vstinner commented on Nov 8, 2017

      @vstinner
      MemberAuthor

      I don't see this failure on Travis for a while now. Can this issue be closed?

      Since the failure occurred randomly, we cannot make sure that the bug is really fixed. Usually in this case, I close the issue, but reopen it if the bug comes back.

      So yes, I close the issue right now.

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

      3.7 (EOL)end of lifetestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions