thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Håkon Hitland (JIRA) <>
Subject [jira] [Created] (THRIFT-4274) Python feature tests for SSL/TLS failing
Date Mon, 31 Jul 2017 10:37:00 GMT
Håkon Hitland created THRIFT-4274:

             Summary: Python feature tests for SSL/TLS failing
                 Key: THRIFT-4274
             Project: Thrift
          Issue Type: Bug
          Components: Python - Library
         Environment: Arch Linux, Python 3.6.2, OpenSSL 1.1.0.f
            Reporter: Håkon Hitland
            Priority: Minor

{{make cross}} fails on the Python feature tests {{py-nosslv3}} and {{py-tls}}, as the test
server exits with a stack trace like
Traceback (most recent call last):
  File "/thrift/test/py/", line 315, in <module>
  File "/thrift/test/py/", line 268, in main
  File "/thrift/lib/py/build/lib.linux-x86_64-3.6/thrift/server/", line 76, in serve
    client = self.serverTransport.accept()
  File "/thrift/lib/py/build/lib.linux-x86_64-3.6/thrift/transport/", line 370,
in accept
    client = self._wrap_socket(plain_client)
  File "/thrift/lib/py/build/lib.linux-x86_64-3.6/thrift/transport/", line 184,
in _wrap_socket
  File "/usr/lib/python3.6/", line 401, in wrap_socket
    _context=self, _session=session)
  File "/usr/lib/python3.6/", line 808, in __init__
  File "/usr/lib/python3.6/", line 1061, in do_handshake
  File "/usr/lib/python3.6/", line 683, in do_handshake
OSError: [Errno 0] Error

This seems to be caused by {{ensure_socket_open}} in {{test/crossrunner/}}, which will
make a connection and immediately close the socket without completing the handshake.
On the server side this causes an {{OSError}} to be thrown from {{SSLContext.wrap_socket()}},
which is not caught in {{TSSLServerSocket.accept()}}.

This works on older installations, so presumably either Python or OpenSSL has changed to cause
an {{OSError}} instead of a {{SSLError}}.

Catching {{OSError}} in {{accept()}} and handling it the same as {{SSLError}} looks like a
reasonable fix.

This message was sent by Atlassian JIRA

View raw message