C++ driver segfaults with boost::thread

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Test program:

      #include <boost/thread/thread.hpp>
      #include <mongo/client/dbclient.h>
      #include <mongo/client/connpool.h>

      using namespace mongo;

      void thread_run() {
      DBClientConnection conn;
      std::string errmsg;
      if ( ! conn.connect( "127.0.0.1:27017" , errmsg ) )

      { cout << "couldn't connect : " << errmsg << endl; }

      }

      int main() {
      boost::thread myThread(&thread_run);
      myThread.interrupt();
      myThread.join();
      return 0;
      }

      Fails with either:
      Segmentation fault: 11
      or:
      libc++abi.dylib: pure virtual method called
      Abort trap: 6

            Assignee:
            Unassigned
            Reporter:
            Shaun Verch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: