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

Test failure - Database.current_op fails decoding a UTC datetime

    XMLWordPrintable

Details

    • Bug
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • Tests
    • None

    Description

      Failed on server version:

      db version v4.1.10-147-g2c8a3592b0
      git version: 2c8a3592b023cc8910ef86739d0205f4cb2d0db4
      OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
      allocator: tcmalloc
      modules: enterprise
      build environment:
          distmod: rhel62
          distarch: x86_64
          target_arch: x86_64
      

      test_session.TestSession.test_database fails because Database.current_op returns an invalid BSON datetime:

       [2019/04/18 15:28:53.633] ERROR [0.057s]: test_database (test_session.TestSession)
       [2019/04/18 15:28:53.633] ----------------------------------------------------------------------
       [2019/04/18 15:28:53.633] Traceback (most recent call last):
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 935, in decode_all
       [2019/04/18 15:28:53.633]     codec_options))
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 420, in _elements_to_dict
       [2019/04/18 15:28:53.633]     for key, value, pos in _iterate_elements(data, position, obj_end, opts):
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 412, in _iterate_elements
       [2019/04/18 15:28:53.633]     (key, value, position) = _element_to_dict(data, position, obj_end, opts)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 395, in _element_to_dict
       [2019/04/18 15:28:53.633]     element_name)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 230, in _get_array
       [2019/04/18 15:28:53.633]     data, position, obj_end, opts, element_name)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 198, in _get_object
       [2019/04/18 15:28:53.633]     obj = _elements_to_dict(data, position + 4, end, opts)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 420, in _elements_to_dict
       [2019/04/18 15:28:53.633]     for key, value, pos in _iterate_elements(data, position, obj_end, opts):
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 412, in _iterate_elements
       [2019/04/18 15:28:53.633]     (key, value, position) = _element_to_dict(data, position, obj_end, opts)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 395, in _element_to_dict
       [2019/04/18 15:28:53.633]     element_name)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 198, in _get_object
       [2019/04/18 15:28:53.633]     obj = _elements_to_dict(data, position + 4, end, opts)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 420, in _elements_to_dict
       [2019/04/18 15:28:53.633]     for key, value, pos in _iterate_elements(data, position, obj_end, opts):
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 412, in _iterate_elements
       [2019/04/18 15:28:53.633]     (key, value, position) = _element_to_dict(data, position, obj_end, opts)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 395, in _element_to_dict
       [2019/04/18 15:28:53.633]     element_name)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 230, in _get_array
       [2019/04/18 15:28:53.633]     data, position, obj_end, opts, element_name)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 198, in _get_object
       [2019/04/18 15:28:53.633]     obj = _elements_to_dict(data, position + 4, end, opts)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 420, in _elements_to_dict
       [2019/04/18 15:28:53.633]     for key, value, pos in _iterate_elements(data, position, obj_end, opts):
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 412, in _iterate_elements
       [2019/04/18 15:28:53.633]     (key, value, position) = _element_to_dict(data, position, obj_end, opts)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 395, in _element_to_dict
       [2019/04/18 15:28:53.633]     element_name)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 303, in _get_date
       [2019/04/18 15:28:53.633]     return _millis_to_datetime(millis, opts), end
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 868, in _millis_to_datetime
       [2019/04/18 15:28:53.633]     microseconds=micros)
       [2019/04/18 15:28:53.633] OverflowError: normalized days too large to fit in a C int
       [2019/04/18 15:28:53.633] During handling of the above exception, another exception occurred:
       [2019/04/18 15:28:53.633] Traceback (most recent call last):
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/test/test_session.py", line 268, in test_database
       [2019/04/18 15:28:53.633]     self._test_ops(client, *ops)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/test/test_session.py", line 110, in _test_ops
       [2019/04/18 15:28:53.633]     f(*args, **kw)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/pymongo/database.py", line 902, in current_op
       [2019/04/18 15:28:53.633]     session=session)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/pymongo/database.py", line 555, in _command
       [2019/04/18 15:28:53.633]     client=self.__client)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/pymongo/pool.py", line 589, in command
       [2019/04/18 15:28:53.633]     self._raise_connection_failure(error)
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/pymongo/pool.py", line 750, in _raise_connection_failure
       [2019/04/18 15:28:53.633]     raise error
       [2019/04/18 15:28:53.633]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/pymongo/pool.py", line 584, in command
       [2019/04/18 15:28:53.633]     user_fields=user_fields)
       [2019/04/18 15:28:53.634]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/pymongo/network.py", line 150, in command
       [2019/04/18 15:28:53.634]     codec_options=codec_options, user_fields=user_fields)
       [2019/04/18 15:28:53.634]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/pymongo/message.py", line 1470, in unpack_response
       [2019/04/18 15:28:53.634]     self.payload_document, codec_options, user_fields)
       [2019/04/18 15:28:53.634]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 987, in _decode_all_selective
       [2019/04/18 15:28:53.634]     return decode_all(data, codec_options)
       [2019/04/18 15:28:53.634]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 943, in decode_all
       [2019/04/18 15:28:53.634]     reraise(InvalidBSON, exc_value, exc_tb)
       [2019/04/18 15:28:53.634]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/py3compat.py", line 53, in reraise
       [2019/04/18 15:28:53.634]     raise exctype(str(value)).with_traceback(trace)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 935, in decode_all
       [2019/04/18 15:28:53.672]     codec_options))
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 420, in _elements_to_dict
       [2019/04/18 15:28:53.672]     for key, value, pos in _iterate_elements(data, position, obj_end, opts):
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 412, in _iterate_elements
       [2019/04/18 15:28:53.672]     (key, value, position) = _element_to_dict(data, position, obj_end, opts)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 395, in _element_to_dict
       [2019/04/18 15:28:53.672]     element_name)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 230, in _get_array
       [2019/04/18 15:28:53.672]     data, position, obj_end, opts, element_name)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 198, in _get_object
       [2019/04/18 15:28:53.672]     obj = _elements_to_dict(data, position + 4, end, opts)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 420, in _elements_to_dict
       [2019/04/18 15:28:53.672]     for key, value, pos in _iterate_elements(data, position, obj_end, opts):
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 412, in _iterate_elements
       [2019/04/18 15:28:53.672]     (key, value, position) = _element_to_dict(data, position, obj_end, opts)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 395, in _element_to_dict
       [2019/04/18 15:28:53.672]     element_name)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 198, in _get_object
       [2019/04/18 15:28:53.672]     obj = _elements_to_dict(data, position + 4, end, opts)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 420, in _elements_to_dict
       [2019/04/18 15:28:53.672]     for key, value, pos in _iterate_elements(data, position, obj_end, opts):
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 412, in _iterate_elements
       [2019/04/18 15:28:53.672]     (key, value, position) = _element_to_dict(data, position, obj_end, opts)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 395, in _element_to_dict
       [2019/04/18 15:28:53.672]     element_name)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 230, in _get_array
       [2019/04/18 15:28:53.672]     data, position, obj_end, opts, element_name)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 198, in _get_object
       [2019/04/18 15:28:53.672]     obj = _elements_to_dict(data, position + 4, end, opts)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 420, in _elements_to_dict
       [2019/04/18 15:28:53.672]     for key, value, pos in _iterate_elements(data, position, obj_end, opts):
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 412, in _iterate_elements
       [2019/04/18 15:28:53.672]     (key, value, position) = _element_to_dict(data, position, obj_end, opts)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 395, in _element_to_dict
       [2019/04/18 15:28:53.672]     element_name)
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 303, in _get_date
       [2019/04/18 15:28:53.672]     return _millis_to_datetime(millis, opts), end
       [2019/04/18 15:28:53.672]   File "/data/mci/375f73f70d4e912978e87747b8776141/src/bson/__init__.py", line 868, in _millis_to_datetime
       [2019/04/18 15:28:53.672]     microseconds=micros)
       [2019/04/18 15:28:53.672] bson.errors.InvalidBSON: normalized days too large to fit in a C int
      

      https://evergreen.mongodb.com/task/mongo_python_driver_tests_python_version_rhel62_without_c_extensions__auth~noauth_ssl~nossl_python_version~3.4_c_extensions~without_c_extensions_coverage~coverage_test_latest_replica_set_patch_749116287ae970fd3c1d72efaa1c94c92f2b1a65_5cb8f5e49ccd4e1f691c2690_19_04_18_22_10_45

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              shane.harvey@mongodb.com Shane Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: