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

ReplicaSetMonitor::~ReplicaSetMonitor crash

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.1
    • Component/s: None
    • Labels:
      None
    • ALL
    • Hide

      1. Start a replica set using Mongo 2.2.x.
      2. Populate it with data.
      3. Use mongodump --host <replSet>/<replSetMember:port>

      This behavior works without crashing using Mongo 2.0.x.

      Show
      1. Start a replica set using Mongo 2.2.x. 2. Populate it with data. 3. Use mongodump --host <replSet>/<replSetMember:port> This behavior works without crashing using Mongo 2.0.x.

      User noticed that specifying --host <replSet>/<memberOfReplSet>:<memberOfReplSetPort> will cause mongodump and anything that uses the destructor of the ReplicaSetMonitor class to crash w/ the stack trace:

      Program received signal SIGSEGV, Segmentation fault.
      0x00007ffff5e36f7c in std::string::compare(std::string const&) const ()
         from /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/libstdc++.so.6
      (gdb) bt
      #0  0x00007ffff5e36f7c in std::string::compare(std::string const&) const ()
         from /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/libstdc++.so.6
      #1  0x00007ffff7e74102 in operator< <char, std::char_traits<char>, std::allocator<char> > (__rhs=..., __lhs=...)
          at /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/basic_string.h:2419
      #2  operator() (__y=..., __x=..., this=<optimized out>)
          at /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_function.h:230
      #3  _M_lower_bound (__k=..., __y=0x7ffff85fc408, __x=0x7ffff86932c0, this=<optimized out>)
          at /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_tree.h:1004
      #4  lower_bound (__k=..., this=<optimized out>)
          at /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_tree.h:763
      #5  lower_bound (__x=..., this=0x7ffff85fc400)
          at /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_map.h:739
      #6  std::map<std::string, std::vector<mongo::HostAndPort, std::allocator<mongo::HostAndPort> >, std::less<std::string>, std::allocator<std::pair<std::string const, std::vector<mongo::HostAndPort, std::allocator<mongo::HostAndPort> > > > >::operator[] (__k=..., this=0x7ffff85fc400)
          at /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_map.h:448
      #7  0x00007ffff7e744a8 in mongo::ReplicaSetMonitor::_cacheServerAddresses_inlock (this=0x7ffff8694420)
          at src/mongo/client/dbclient_rs.cpp:260
      #8  0x00007ffff7e7be5d in mongo::ReplicaSetMonitor::~ReplicaSetMonitor (this=0x7ffff8694420, 
          __in_chrg=<optimized out>) at src/mongo/client/dbclient_rs.cpp:252
      

      Full stack trace is attached.

            Assignee:
            stephen.lee Stephen Lee
            Reporter:
            stephen.lee Stephen Lee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: