ClientEncryption shouldn't try to load mongo crypt shared library

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • 4.16.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • 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

      We're building Django's QE integration which uses PyMongo. I use Ubuntu 24.04 for development and on CI.

      I started developing using MongoDB 7.0. When I switched to MongoDB 8.0, I encountered this initialization error:

          pymongocrypt.errors.MongoCryptError: An existing crypt_shared library is loaded by the application at [/path/to/lib/mongo_crypt_v1.so], but the current call to mongocrypt_init() failed to find that same library

      This is fixed by: export LD_LIBRARY_PATH=/path/to/lib/
      however, anna.henningsen@mongodb.com says this shouldn't be required.

      The problems seems specific with version 8.0.x and later of the shared library. 

      • No issue with MongoDB 7.0.25 + mongo_crypt_shared_v1-linux-x86_64-enterprise-ubuntu2204-7.0.25 (I use the ubuntu2204 shared library on Ubuntu 24.04 because one isn't available for 2404).
      • With MongoDB 8.0.15 and mongo_crypt_shared_v1-linux-x86_64-enterprise-ubuntu2404-8.0.15: "An existing crypt_shared library is loaded... " error. [fixed by specifying LD_LIBRARY_PATH]
      • With MongoDB 8.0.15 + mongo_crypt_shared_v1-linux-x86_64-enterprise-ubuntu2204-7.0.25, the application starts and runs, failing later (as expected) because of backward incompatible changes to queries: "csfle "analyze_query" failed: Enumeration value 'range' for field 'create.encryptedFields.fields.queryType' is not a valid value." [This configuration isn't expected to work, but it shows that version 7.0 of the shared library doesn't have the "An existing crypt_shared library is loaded... " initialization problem with MongoDB 8.0].

            Assignee:
            Alex Clark
            Reporter:
            Tim Graham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: