Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2615

Test Failure - test_client.TestClient.test_socket_timeout with eventlet and TLS

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0
    • Affects Version/s: None
    • Component/s: Tests
    • None

      Eventlet + TLS tests are failing due to the change in PYTHON-2596 and the following eventlet bug which I just reported: https://github.com/eventlet/eventlet/issues/692

      The failure is:

       [2021/03/13 00:10:41.070] ERROR [4.530s]: test_socket_timeout (test_client.TestClient)
       [2021/03/13 00:10:41.070] ----------------------------------------------------------------------
       [2021/03/13 00:10:41.070] Traceback (most recent call last):
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/pool.py", line 708, in receive_message
       [2021/03/13 00:10:41.070]     return receive_message(self, request_id, self.max_message_size)
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/network.py", line 192, in receive_message
       [2021/03/13 00:10:41.070]     _receive_data_on_socket(sock_info, 16, deadline))
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/network.py", line 257, in _receive_data_on_socket
       [2021/03/13 00:10:41.070]     chunk_length = sock_info.sock.recv_into(mv[bytes_read:])
       [2021/03/13 00:10:41.070]   File "/opt/python/3.6/lib/python3.6/site-packages/eventlet/green/ssl.py", line 252, in recv_into
       [2021/03/13 00:10:41.070]     return self._base_recv(nbytes, flags, into=True, buffer_=buffer)
       [2021/03/13 00:10:41.070]   File "/opt/python/3.6/lib/python3.6/site-packages/eventlet/green/ssl.py", line 267, in _base_recv
       [2021/03/13 00:10:41.070]     read = self.read(nbytes, buffer_)
       [2021/03/13 00:10:41.070]   File "/opt/python/3.6/lib/python3.6/site-packages/eventlet/green/ssl.py", line 187, in read
       [2021/03/13 00:10:41.070]     super(GreenSSLSocket, self).read, *args, **kwargs)
       [2021/03/13 00:10:41.070]   File "/opt/python/3.6/lib/python3.6/site-packages/eventlet/green/ssl.py", line 167, in _call_trampolining
       [2021/03/13 00:10:41.070]     timeout_exc=timeout_exc('timed out'))
       [2021/03/13 00:10:41.070]   File "/opt/python/3.6/lib/python3.6/site-packages/eventlet/hubs/__init__.py", line 159, in trampoline
       [2021/03/13 00:10:41.070]     return hub.switch()
       [2021/03/13 00:10:41.070]   File "/opt/python/3.6/lib/python3.6/site-packages/eventlet/hubs/hub.py", line 313, in switch
       [2021/03/13 00:10:41.070]     return self.greenlet.switch()
       [2021/03/13 00:10:41.070] ssl.SSLError: ('timed out',)
       [2021/03/13 00:10:41.070] The above exception was the direct cause of the following exception:
       [2021/03/13 00:10:41.070] Traceback (most recent call last):
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/test/test_client.py", line 1010, in test_socket_timeout
       [2021/03/13 00:10:41.070]     self.assertRaises(NetworkTimeout, get_x, timeout.pymongo_test)
       [2021/03/13 00:10:41.070]   File "/opt/python/3.6/lib/python3.6/unittest/case.py", line 733, in assertRaises
       [2021/03/13 00:10:41.070]     return context.handle('assertRaises', args, kwargs)
       [2021/03/13 00:10:41.070]   File "/opt/python/3.6/lib/python3.6/unittest/case.py", line 178, in handle
       [2021/03/13 00:10:41.070]     callable_obj(*args, **kwargs)
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/test/test_client.py", line 1007, in get_x
       [2021/03/13 00:10:41.070]     doc = next(db.test.find().where(where_func))
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/cursor.py", line 1199, in next
       [2021/03/13 00:10:41.070]     if len(self.__data) or self._refresh():
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/cursor.py", line 1120, in _refresh
       [2021/03/13 00:10:41.070]     self.__send_message(q)
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/cursor.py", line 997, in __send_message
       [2021/03/13 00:10:41.070]     address=self.__address)
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/mongo_client.py", line 1275, in _run_operation_with_response
       [2021/03/13 00:10:41.070]     exhaust=exhaust)
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/mongo_client.py", line 1374, in _retryable_read
       [2021/03/13 00:10:41.070]     return func(session, server, sock_info, slave_ok)
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/mongo_client.py", line 1269, in _cmd
       [2021/03/13 00:10:41.070]     unpack_res)
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/server.py", line 117, in run_operation_with_response
       [2021/03/13 00:10:41.070]     reply = sock_info.receive_message(request_id)
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/pool.py", line 710, in receive_message
       [2021/03/13 00:10:41.070]     self._raise_connection_failure(error)
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/pool.py", line 871, in _raise_connection_failure
       [2021/03/13 00:10:41.070]     _raise_connection_failure(self.address, error)
       [2021/03/13 00:10:41.070]   File "/data/mci/cf32abddbeea85dd09dd9b515159eb90/src/pymongo/pool.py", line 241, in _raise_connection_failure
       [2021/03/13 00:10:41.070]     raise AutoReconnect(msg) from error
       [2021/03/13 00:10:41.070] pymongo.errors.AutoReconnect: localhost:27017: ('timed out',)
      

      https://evergreen.mongodb.com/task/mongo_python_driver_tests_python_version_green_framework_amazon1__platform~awslinux_auth_ssl~auth_ssl_python_version~3.6_green_framework~eventlet_test_latest_standalone_ec6337e3a7a012131d215dd343cbd91a3d6d9f97_21_03_09_20_33_12

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: