Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7683

C++ driver segfaults with boost::thread

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            sverch Shaun Verch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: