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

Invalid parameter to ensureIndex can trigger server hang on operation

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6.11, 3.0.7, 3.2.0-rc4
    • Component/s: Querying
    • ALL
    • QuInt E (01/11/16), Query F (02/01/16)
    • 0

      Passing an invalid parameter to ensureIndex can cause the query planner to get stuck in the for loop in PlanExecutor::getNextImpl.

      This hangs the server on 2.6 and 3.0 but only the operation thread on 3.2.0-rc4

       [2015/11/20 02:07:24.294] #0  0x0000000001038489 in mongo::KeyString::toBson(char const*, unsigned long, mongo::Ordering, mongo::KeyString::TypeBits const&) ()
       [2015/11/20 02:07:24.294] #1  0x00000000010ddf43 in mongo::(anonymous namespace)::WiredTigerIndexCursorBase::seek(mongo::IndexSeekPoint const&, mongo::SortedDataInterface::Cursor::RequestedInfo) ()
       [2015/11/20 02:07:24.294] #2  0x0000000000bd9f80 in mongo::IndexScan::work(unsigned long*) ()
       [2015/11/20 02:07:24.295] #3  0x0000000000bcdbb1 in mongo::FetchStage::work(unsigned long*) ()
       [2015/11/20 02:07:24.295] #4  0x0000000000bfffe9 in mongo::SubplanStage::work(unsigned long*) ()
       [2015/11/20 02:07:24.295] #5  0x0000000000e82be5 in mongo::PlanExecutor::getNextImpl(mongo::Snapshotted<mongo::BSONObj>*, mongo::RecordId*) ()
       [2015/11/20 02:07:24.295] #6  0x0000000000e832a9 in mongo::PlanExecutor::getNext(mongo::BSONObj*, mongo::RecordId*) ()
       [2015/11/20 02:07:24.295] #7  0x0000000000b22b4d in mongo::FindCmd::run(mongo::OperationContext*, std::string const&, mongo::BSONObj&, int, std::string&, mongo::BSONObjBuilder&) ()
       [2015/11/20 02:07:24.295] #8  0x0000000000ba4819 in mongo::Command::run(mongo::OperationContext*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*) ()
       [2015/11/20 02:07:24.295] #9  0x0000000000ba5346 in mongo::Command::execCommand(mongo::OperationContext*, mongo::Command*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*) ()
       [2015/11/20 02:07:24.296] #10 0x0000000000afed00 in mongo::runCommands(mongo::OperationContext*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*) ()
       [2015/11/20 02:07:24.296] #11 0x0000000000cb885d in mongo::assembleResponse(mongo::OperationContext*, mongo::Message&, mongo::DbResponse&, mongo::HostAndPort const&) ()
       [2015/11/20 02:07:24.296] #12 0x000000000098a19c in mongo::MyMessageHandler::process(mongo::Message&, mongo::AbstractMessagingPort*) ()
       [2015/11/20 02:07:24.296] #13 0x000000000132940d in mongo::PortMessageServer::handleIncomingMsg(void*)
      

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            robert.guo@mongodb.com Robert Guo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: