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

Driver crashes with boost 1.52

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.3
    • Affects Version/s: None
    • Component/s: Internal Client
    • None
    • Fully Compatible
    • ALL

      boost::threads must be either detach()ed or join()ed prior to destruction on newer versions of boost: https://svn.boost.org/trac/boost/ticket/6266.

      Patch:

      diff --git a/mongo-cxx-driver/src/mongo/util/background.cpp b/mongo-cxx-driver/src/mongo/util/background.cpp
      index 4fca89b..795ef7b 100644
      --- a/src/mongo/util/background.cpp
      +++ b/src/mongo/util/background.cpp
      @@ -82,6 +82,7 @@ namespace mongo {
       
           BackgroundJob& BackgroundJob::go() {
               boost::thread t( boost::bind( &BackgroundJob::jobBody , this, _status ) );
      +        t.detach();
               return *this;
           }
       
      
      

            Assignee:
            matt.dannenberg Matt Dannenberg
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: