Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-2705

Driver calls 'abort()' when internet is disconnected and crashes app

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.9.0
    • Affects Version/s: None
    • Component/s: None
    • None

      Summary

      After starting my app with my internet connection disconnected, instancing the 'mongocxx::pool' object with a valid connection string and calling 'mongocxx::Pool::acquire()' or  'mongocxx::Pool::try_acquire()' crash the app due to an error thrown inside of the mongoc drvier with message 'mongoc-client-pool.c:346 mongoc_client_pool_try_pop(): precondition failed: pool'

      Environment

      mongocxx lib version 3.7.0

      OS: Windows 10 Home 64-bit

      Compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32216.1 for x86

      How to Reproduce
      Disconnect computer from internet
      Compile and run the following C++ with MSVC:
              auto inst = mongocxx::instance();
              std::string connStr = "<valid connection string for mdb here>";
              auto pool = std::make_shared<mongocxx::pool>(mongocxx::uri{ connStr });_
              auto pl = pool->try_acquire();_
      The driver should abort with message 'mongocxx::Pool::try_acquire()' crash the app due to an error thrown inside of the mongoc drvier with message 'mongoc-client-pool.c:346 mongoc_client_pool_try_pop(): precondition failed: pool'

            Assignee:
            josh.siegel@mongodb.com Josh Siegel
            Reporter:
            jeff@pulsemedica.com jeff strom
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: