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

Running replSetSyncFrom on mongod with no replset config causes crash

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.0-rc1
    • Affects Version/s: 2.4.0-rc0
    • Component/s: Replication
    • None
    • ALL

      To reproduce:

      $ mongod
      $ mongo --eval "rs.syncFrom('example.com:27017')"

      Mon Feb 11 13:47:45.113 [initandlisten] waiting for connections on port 27017
      Mon Feb 11 13:47:46.983 [initandlisten] connection accepted from 127.0.0.1:60438 #1 (1 connection now open)
      
      Program received signal EXC_BAD_ACCESS, Could not access memory.
      Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000038
      [Switching to process 17307 thread 0x2103]
      0x00000001004d3b13 in mongo::RSBase::lock::lock (this=0x10c, b=0x8) at threadlocal.h:40
      40	            T * val = _val.get();
      (gdb) bt
      #0  0x00000001004d3b13 in mongo::RSBase::lock::lock (this=0x10c, b=0x8) at threadlocal.h:40
      #1  0x00000001004e0dc5 in mongo::RSBase::lock::lock () at /Users/rassi/work/mongo/src/mongo/db/repl/rs.h:221
      #2  0x00000001004e0dc5 in mongo::ReplSetImpl::forceSyncFrom (this=0x10c51fb80, host=@0x10c51fb98, errmsg=@0x10c51fb80, result=@0x10c51fb80) at rs.h:616
      #3  0x00000001004b96b5 in mongo::CmdReplSetSyncFrom::run (this=0x10c, unnamed_arg=206701624, cmdObj=@0x10c, unnamed_arg=206701624, errmsg=@0x10c51ffe0, result=@0x10c520438, fromRepl=false) at replset_commands.cpp:385
      #4  0x000000010013f9c5 in mongo::_execCommand (c=0x10c, dbname=@0x0, cmdObj=@0x10c51ffe0, queryOptions=206701624, errmsg=@0x100d9c618, result=@0x10c520438, fromRepl=false) at dbcommands.cpp:1886
      #5  0x0000000100140802 in mongo::Command::execCommand (c=0x1011d3a40, client=@0x10c520120, queryOptions=206700832, cmdns=0x10c520120 "?\002R\f\001", cmdObj=@0x10c520178, result=@0x10c520120, fromRepl=false) at dbcommands.cpp:1995
      #6  0x00000001001411a5 in mongo::_runCommands (ns=0x10c5202e0 "p\003R\f\001", _cmdobj=@0x10c5204f0, b=@0x10c5202e0, anObjBuilder=@0x10c5202e0, queryOptions=0, fromRepl=false) at dbcommands.cpp:2085
      #7  0x00000001003e8aee in mongo::runCommands (ns=0x101eb1814 "admin.$cmd", jsobj=@0x101dfe8f0, curop=@0x101df0300, b=@0x10c520438, anObjBuilder=@0x100d9c618, queryOptions=0) at query.cpp:46
      #8  0x00000001003e92f1 in mongo::runQuery (m=@0x101dfe8f0, q=@0x5, curop=@0x10c520920, result=@0x10c520920) at query.cpp:944
      #9  0x00000001003968af in receivedQuery [inlined] () at /Users/rassi/work/mongo/src/mongo/db/instance.cpp:262
      #10 0x00000001003968af in mongo::assembleResponse (m=@0x10c520b50, dbresponse=@0x10c520cc0, remote=@0x10c520b38) at instance.cpp:407
      #11 0x000000010000be92 in mongo::MyMessageHandler::process (this=0x10c520b50, m=@0x10c520d60, port=0x10c520d60, le=0x10c520d60) at db.cpp:193
      #12 0x00000001005de399 in boost::shared_ptr<mongo::Socket>::operator-> () at /Users/rassi/work/mongo/src/third_party/boost/boost/smart_ptr/shared_ptr.hpp:206
      #13 0x00000001005de399 in mongo::PortMessageServer::handleIncomingMsg (arg=0x10c520b50) at message_server_port.cpp:207
      #14 0x000000010061af85 in thread_proxy (param=0x101e7c230) at thread.cpp:121
      #15 0x00007fff8c14b782 in _pthread_start ()
      #16 0x00007fff8c1381c1 in thread_start ()
      (gdb) 
      

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: