KMS tests failing on extracting libmongocrypt archive

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Infrastructure
    • None
    • Python Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Name of Failure:

      test-azurekms

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_kms_test_azurekms_patch_bd6decb8c073593beef802b9a82a386917eb7140_6930779b0ca525000794bafb_25_12_03_19_46_52?execution=0

      Context of when and why the failure occurred:

      The failure stems from chmod on a file within the tar archive failing due to getting a mode flag larger than 32 bits. Further investigation shows invalid mode bits on several files within the libmongocrypt tar archive that are resolved by adding a bitwise mask for octal 777.

      Stack trace:

      [2025/12/03 11:49:47.755] INFO     Fetching https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz...
      [2025/12/03 11:49:50.781] Traceback (most recent call last):
      [2025/12/03 11:49:50.781]   File "/data/mci/ea9162ac7751837da43e672aeb07afb0/src/.evergreen/scripts/setup_tests.py", line 482, in <module>
      [2025/12/03 11:49:50.781]     handle_test_env()
      [2025/12/03 11:49:50.781]   File "/data/mci/ea9162ac7751837da43e672aeb07afb0/src/.evergreen/scripts/setup_tests.py", line 354, in handle_test_env
      [2025/12/03 11:49:50.781]     setup_libmongocrypt()
      [2025/12/03 11:49:50.781]   File "/data/mci/ea9162ac7751837da43e672aeb07afb0/src/.evergreen/scripts/setup_tests.py", line 122, in setup_libmongocrypt
      [2025/12/03 11:49:50.781]     fid.extractall(Path.cwd() / "libmongocrypt")
      [2025/12/03 11:49:50.781]   File "/home/admin/.local/share/uv/python/cpython-3.10.19-linux-x86_64-gnu/lib/python3.10/tarfile.py", line 2349, in extractall
      [2025/12/03 11:49:50.781]     self.chmod(tarinfo, dirpath)
      [2025/12/03 11:49:50.781]   File "/home/admin/.local/share/uv/python/cpython-3.10.19-linux-x86_64-gnu/lib/python3.10/tarfile.py", line 2690, in chmod
      [2025/12/03 11:49:50.781]     os.chmod(targetpath, tarinfo.mode)
      [2025/12/03 11:49:50.781] OverflowError: Python int too large to convert to C int
      

      Local repro:

      nstapp@M-THWWK302GC mongo-python-driver % AWS_PROFILE=testing just setup-tests kms azure-fail
      bash .evergreen/scripts/setup-tests.sh kms azure-fail
      Setting up tests with args "kms azure-fail"...
      INFO     Setting up 'kms azure-fail' with AUTH='noauth' and SSL='nossl'...
      INFO     Fetching https://s3.amazonaws.com/mciuploads/libmongocrypt/macos/master/latest/libmongocrypt.tar.gz...
      Traceback (most recent call last):
        File "/Users/nstapp/Github/mongo-python-driver/.evergreen/scripts/setup_tests.py", line 482, in <module>
          handle_test_env()
        File "/Users/nstapp/Github/mongo-python-driver/.evergreen/scripts/setup_tests.py", line 354, in handle_test_env
          setup_libmongocrypt()
        File "/Users/nstapp/Github/mongo-python-driver/.evergreen/scripts/setup_tests.py", line 122, in setup_libmongocrypt
          fid.extractall(Path.cwd() / "libmongocrypt")
        File "/Users/nstapp/.pyenv/versions/pypy3.10-7.3.15/lib/pypy3.10/tarfile.py", line 2276, in extractall
          self.chmod(tarinfo, dirpath)
        File "/Users/nstapp/.pyenv/versions/pypy3.10-7.3.15/lib/pypy3.10/tarfile.py", line 2563, in chmod
          os.chmod(targetpath, tarinfo.mode)
      OverflowError: expected a 32-bit integer
      

            Assignee:
            Unassigned
            Reporter:
            Noah Stapp
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: