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

NULL pointer crash in cloneCollectionAsCapped

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-rc6
    • Fix Version/s: 3.0.0-rc9, 3.1.0
    • Component/s: Storage
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:

      Description

      This bug is not specific to one particular storage engine, and it does not affect 2.6.7.

      Program received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 0x7ffff7fcc700 (LWP 23947)]
      0x00007ffff75675c8 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      (gdb) f 2
      #2  0x00000000012a1197 in mongo::(anonymous namespace)::cloneCollectionAsCapped (txn=0x7ffff7fcb7c0, db=0x0, shortFrom=..., shortTo=..., size=4096, temp=false, logForReplication=true)
          at src/mongo/db/commands/collection_to_capped.cpp:60
      60	        string fromNs = db->name() + "." + shortFrom;
      (gdb) p db
      $1 = (mongo::Database *) 0x0
      (gdb) bt
      #0  0x00007ffff75675c8 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #1  0x000000000114067c in std::operator+<char, std::char_traits<char>, std::allocator<char> > (__lhs=..., __rhs=0x1f83032 ".") at /usr/include/c++/4.8/bits/basic_string.h:2405
      #2  0x00000000012a1197 in mongo::(anonymous namespace)::cloneCollectionAsCapped (txn=0x7ffff7fcb7c0, db=0x0, shortFrom=..., shortTo=..., size=4096, temp=false, logForReplication=true)
          at src/mongo/db/commands/collection_to_capped.cpp:60
      #3  0x00000000012a2227 in mongo::CmdCloneCollectionAsCapped::run (this=0x2863ce0 <mongo::cmdCloneCollectionAsCapped>, txn=0x7ffff7fcb7c0, dbname=..., jsobj=..., errmsg=..., result=..., fromRepl=false)
          at src/mongo/db/commands/collection_to_capped.cpp:179
      #4  0x0000000001332b65 in mongo::_execCommand (txn=0x7ffff7fcb7c0, c=0x2863ce0 <mongo::cmdCloneCollectionAsCapped>, dbname=..., cmdObj=..., queryOptions=0, errmsg=..., result=..., fromRepl=false)
          at src/mongo/db/dbcommands.cpp:1267
      #5  0x0000000001333ae2 in mongo::Command::execCommand (txn=0x7ffff7fcb7c0, c=0x2863ce0 <mongo::cmdCloneCollectionAsCapped>, queryOptions=0, cmdns=0x33ec414 "test.$cmd", cmdObj=..., result=..., 
          fromRepl=false) at src/mongo/db/dbcommands.cpp:1483
      #6  0x00000000013343c4 in mongo::_runCommands (txn=0x7ffff7fcb7c0, ns=0x33ec414 "test.$cmd", _cmdobj=..., b=..., anObjBuilder=..., fromRepl=false, queryOptions=0) at src/mongo/db/dbcommands.cpp:1558
      #7  0x0000000001535e8c in mongo::runCommands (txn=0x7ffff7fcb7c0, ns=0x33ec414 "test.$cmd", jsobj=..., curop=..., b=..., anObjBuilder=..., fromRepl=false, queryOptions=0) at src/mongo/db/query/find.cpp:137
      #8  0x0000000001537eb4 in mongo::runQuery (txn=0x7ffff7fcb7c0, m=..., q=..., nss=..., curop=..., result=..., fromDBDirectClient=false) at src/mongo/db/query/find.cpp:606
      #9  0x000000000143e04c in mongo::receivedQuery (txn=0x7ffff7fcb7c0, c=..., dbresponse=..., m=..., fromDBDirectClient=false) at src/mongo/db/instance.cpp:220
      #10 0x000000000143f1f6 in mongo::assembleResponse (txn=0x7ffff7fcb7c0, m=..., dbresponse=..., remote=..., fromDBDirectClient=false) at src/mongo/db/instance.cpp:403
      #11 0x000000000113f218 in mongo::MyMessageHandler::process (this=0x30b21c8, m=..., port=0x30d9570, le=0x354c2d0) at src/mongo/db/db.cpp:206
      #12 0x00000000018df52a in mongo::PortMessageServer::handleIncomingMsg (arg=0x30d9570) at src/mongo/util/net/message_server_port.cpp:230
      #13 0x00007ffff7bc4182 in start_thread (arg=0x7ffff7fcc700) at pthread_create.c:312
      #14 0x00007ffff6cc500d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
       


      Version: 106385c21ec92a7b98bd3be498b4f2ef02fd21fa

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: