Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3616

lib/py/test/test_sslsocket.py is flaky

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Labels:
      None

      Description

      As seen here: https://builds.apache.org/job/Thrift-precommit/86/console

      ...
      /usr/bin/python3 test/thrift_json.py
      .
      ----------------------------------------------------------------------
      Ran 1 test in 0.011s
      
      OK
      /usr/bin/python3 test/test_sslsocket.py
      .FFFsys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=0, laddr=('::1', 23458, 0, 0), raddr=('::1', 41151, 0, 0)>
      F/thrift/lib/py/build/lib/thrift/transport/TSSLSocket.py:253: DeprecationWarning: validate is deprecated. Use cert_reqs=ssl.CERT_REQUIRED instead
        DeprecationWarning)
      /thrift/lib/py/build/lib/thrift/transport/TSSLSocket.py:253: DeprecationWarning: validate is deprecated. Use cert_reqs=ssl.CERT_NONE instead
        DeprecationWarning)
      .sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=5, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=0, laddr=('::1', 23458, 0, 0), raddr=('::1', 41155, 0, 0)>
      F/thrift/lib/py/build/lib/thrift/transport/TSSLSocket.py:265: DeprecationWarning: Use cert_reqs instead
        warnings.warn('Use cert_reqs instead', DeprecationWarning)
      .sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=0, laddr=('::1', 23458, 0, 0), raddr=('::1', 41157, 0, 0)>
      Exception in thread Thread-11:
      Traceback (most recent call last):
        File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
          self.run()
        File "test/test_sslsocket.py", line 60, in run
          self.client = self._server.accept()
        File "/thrift/lib/py/build/lib/thrift/transport/TSSLSocket.py", line 418, in accept
          client = self._wrap_socket(plain_client)
        File "/thrift/lib/py/build/lib/thrift/transport/TSSLSocket.py", line 181, in _wrap_socket
          server_hostname=self._server_hostname)
        File "/usr/lib/python3.4/ssl.py", line 365, in wrap_socket
          _context=self)
        File "/usr/lib/python3.4/ssl.py", line 601, in __init__
          self.do_handshake()
        File "/usr/lib/python3.4/ssl.py", line 828, in do_handshake
          self._sslobj.do_handshake()
      ConnectionResetError: [Errno 104] Connection reset by peer
      
      PROTOCOL_SSLv2 is not available
      ..test/test_sslsocket.py:59: ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
        self._server.listen()
      .
      ======================================================================
      FAIL: test_client_cert (__main__.TSSLSocketTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "test/test_sslsocket.py", line 210, in test_client_cert
          self._assert_connection_success(server, client)
        File "test/test_sslsocket.py", line 112, in _assert_connection_success
          self.assertTrue(acc.client is not None)
      AssertionError: False is not true
      
      ======================================================================
      FAIL: test_deprecation (__main__.TSSLSocketTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "test/test_sslsocket.py", line 138, in test_deprecation
          self.assertEqual(len(w), 3)
      AssertionError: 4 != 3
      
      ======================================================================
      FAIL: test_newer_tls (__main__.TSSLSocketTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "test/test_sslsocket.py", line 268, in test_newer_tls
          self._assert_connection_success(server, client)
        File "test/test_sslsocket.py", line 112, in _assert_connection_success
          self.assertTrue(acc.client is not None)
      AssertionError: False is not true
      
      ======================================================================
      FAIL: test_server_cert (__main__.TSSLSocketTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "test/test_sslsocket.py", line 172, in test_server_cert
          self._assert_connection_success(server, client)
        File "test/test_sslsocket.py", line 112, in _assert_connection_success
          self.assertTrue(acc.client is not None)
      AssertionError: False is not true
      
      ======================================================================
      FAIL: test_set_server_cert (__main__.TSSLSocketTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "test/test_sslsocket.py", line 191, in test_set_server_cert
          self._assert_connection_success(server, client)
        File "test/test_sslsocket.py", line 112, in _assert_connection_success
          self.assertTrue(acc.client is not None)
      AssertionError: False is not true
      
      ----------------------------------------------------------------------
      Ran 11 tests in 5.240s
      
      FAILED (failures=5)
      make[3]: *** [py3-test] Error 1
      make[3]: Leaving directory `/thrift/lib/py'
      make[2]: *** [check-am] Error 2
      make[2]: Leaving directory `/thrift/lib/py'
      make[1]: *** [check-recursive] Error 1
      make[1]: Leaving directory `/thrift/lib'
      make: *** [check-recursive] Error 1
      Build step 'Execute shell' marked build as failure
      [WARNINGS] Skipping publisher since build result is FAILURE
      [TASKS] Skipping publisher since build result is FAILURE
      Archiving artifacts
      Compressed 47.75 MB of artifacts by 95.2% relative to #55
      Publishing Javadoc
      Update relevant JIRA issues is waiting for a checkpoint on Thrift-precommit #85
      Sending e-mails to: dev@thrift.apache.org
      Finished: FAILURE
      

      A quick check shows timing issues flaky precedent - it may be the same issue, have not dug yet.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jsirois John Sirois
                Reporter:
                jsirois John Sirois
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: