Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_ssl.test_connect_with_context(): ConnectionResetError on AMD64 FreeBSD 9.x 3.6 #74513

Closed
vstinner opened this issue May 10, 2017 · 4 comments
Labels
tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

BPO 30328
Nosy @vstinner
Superseder
  • bpo-30319: Change socket.close() to ignore ECONNRESET
  • 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-07-04.14:50:02.031>
    created_at = <Date 2017-05-10.12:24:06.528>
    labels = ['tests']
    title = 'test_ssl.test_connect_with_context(): ConnectionResetError on AMD64 FreeBSD 9.x 3.6'
    updated_at = <Date 2017-07-04.14:50:02.030>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-07-04.14:50:02.030>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-07-04.14:50:02.031>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2017-05-10.12:24:06.528>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30328
    keywords = ['buildbot']
    message_count = 4.0
    messages = ['293408', '293824', '297038', '297661']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '30319'
    type = None
    url = 'https://bugs.python.org/issue30328'
    versions = ['Python 3.6']

    @vstinner
    Copy link
    Member Author

    See also bpo-30315 (test_ftplib) and bpo-30319 (test_imaplib).

    http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.6/builds/131/steps/test/logs/stdio

    test_connect_with_context (test.test_ssl.SimpleBackgroundTests) ...  server:  new connection from ('127.0.0.1', 53510)
     server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
     server: selected protocol is now None
    Test server failure:
    Traceback (most recent call last):
       File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_ssl.py", line 1944, in run
        self.close()
       File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_ssl.py", line 1919, in close
        self.sslconn.close()
       File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socket.py", line 417, in close
        self._real_close()
       File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 1052, in _real_close
        socket._real_close(self)
       File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socket.py", line 411, in _real_close
        _ss.close(self)
     ConnectionResetError: [Errno 54] Connection reset by peer
    ERROR

    ...

    ======================================================================
    ERROR: test_connect_with_context (test.test_ssl.SimpleBackgroundTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_ssl.py", line 1541, in test_connect_with_context
        s.connect(self.server_addr)
      File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 1093, in connect
        self._real_connect(addr, False)
      File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 1084, in _real_connect
        self.do_handshake()
      File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 1061, in do_handshake
        self._sslobj.do_handshake()
      File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 683, in do_handshake
        self._sslobj.do_handshake()
    ConnectionResetError: [Errno 54] Connection reset by peer

    Ran 127 tests in 12.751s

    FAILED (errors=1, skipped=7)
    test test_ssl failed

    @vstinner vstinner added the tests Tests in the Lib/test dir label May 10, 2017
    @vstinner
    Copy link
    Member Author

    SimpleBackgroundTests uses a server running in a different thread, so running locally. The port is binded by support.bind_port(socket, "127.0.0.1").

    @vstinner
    Copy link
    Member Author

    http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.6/builds/137/steps/test/logs/stdio

    ======================================================================
    ERROR: test_connect_with_context (test.test_ssl.SimpleBackgroundTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_ssl.py", line 1541, in test_connect_with_context
        s.connect(self.server_addr)
      File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 1093, in connect
        self._real_connect(addr, False)
      File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 1084, in _real_connect
        self.do_handshake()
      File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 1061, in do_handshake
        self._sslobj.do_handshake()
      File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 683, in do_handshake
        self._sslobj.do_handshake()
    ConnectionResetError: [Errno 54] Connection reset by peer

    @vstinner
    Copy link
    Member Author

    vstinner commented Jul 4, 2017

    Duplicate of bpo-30319.

    @vstinner vstinner closed this as completed Jul 4, 2017
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant