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

Invariant failure 'enabled()' when running sharded mapReduce on admin db

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.9
    • Affects Version/s: 3.3.4
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 16 (06/24/16), Sharding 17 (07/15/16)
    • 0

      In 3.2.7 and 3.3.3, sharded mapReduce commands are disabled on the admin db: "Can not execute mapReduce with output database admin".

      In versions 3.3.4+, these mapReduces cause an invariant failure:

      Invariant failure enabled() src/mongo/db/s/sharding_state.cpp 306
      
          frame #4: 0x000000010b266c36 mongod`mongo::invariantFailed(expr=<unavailable>, file=<unavailable>, line=<unavailable>) + 758 at assert_util.cpp:154
        * frame #5: 0x000000010affa5be mongod`mongo::ShardingState::onStaleShardVersion(this=<unavailable>, txn=0x000000010d861200, nss=<unavailable>, expectedVersion=<unavailable>) + 1854 at sharding_state.cpp:306
          frame #6: 0x000000010aff571e mongod`mongo::(anonymous namespace)::SetShardVersion::run(this=<unavailable>, txn=0x00007feb93437770, (null)=<unavailable>, cmdObj=<unavailable>, options=<unavailable>, errmsg="", result=0x0000700000000080) + 11550 at set_shard_version_command.cpp:290
          frame #7: 0x000000010abc2c1b mongod`mongo::Command::run(this=<unavailable>, txn=0x00007feb93437770, request=0x0000700002c82080, replyBuilder=0x0000700002c827c8) + 4699 at dbcommands.cpp:1559
          frame #8: 0x000000010abc120e mongod`mongo::Command::execCommand(txn=0x00007feb93437770, command=0x000000010c73a0b0, request=<unavailable>, replyBuilder=0x0000700002c827c8) + 2526 at dbcommands.cpp:1406
          frame #9: 0x000000010afb2d55 mongod`mongo::runCommands(txn=0x00007feb93437770, request=0x0000700002c82080, replyBuilder=0x0000700002c827c8) + 581 at run_commands.cpp:72
          frame #10: 0x000000010acba860 mongod`mongo::assembleResponse(mongo::OperationContext*, mongo::Message&, mongo::DbResponse&, mongo::HostAndPort const&) + 410 at instance.cpp:273
          frame #11: 0x000000010acba6c6 mongod`mongo::assembleResponse(txn=0x00007feb93437770, m=<unavailable>, dbresponse=0x0000700002c829e8, remote=0x0000700002c82948) + 3014 at instance.cpp:620
          frame #12: 0x000000010a9d1297 mongod`mongo::MyMessageHandler::process(this=<unavailable>, m=0x0000700002c82dd8, port=0x00007feb952079e0) + 231 at db.cpp:185
          frame #13: 0x000000010b28abd7 mongod`mongo::PortMessageServer::handleIncomingMsg(arg=0x00007feb95207a40) + 743 at message_server_port.cpp:213
          frame #14: 0x000000010b28b8a1 mongod`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::__bind<void* (*)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*> > >(void*) [inlined] decltype(__f=<unavailable>)(void*)>(fp)(std::__1::forward<std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*&>(fp0))) std::__1::__invoke<void* (*&)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*&>(void* (*&&&)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*&&&) + 97 at __functional_base:416
          frame #15: 0x000000010b28b898 mongod`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::__bind<void* (*)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*> > >(void*) [inlined] std::__1::__bind_return<void* (*)(void*), std::__1::tuple<std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*>, std::__1::tuple<>, __is_valid_bind_return<void* (*)(void*), std::__1::tuple<std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<void* (__f=<unavailable>)(void*), std::__1::tuple<std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*>, 0ul, std::__1::tuple<> >(void* (*&)(void*), std::__1::tuple<std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) at functional:2097
          frame #16: 0x000000010b28b898 mongod`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::__bind<void* (*)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*> > >(void*) [inlined] std::__1::__bind_return<void* (*)(void*), std::__1::tuple<std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*>, std::__1::tuple<>, __is_valid_bind_return<void* (*)(void*), std::__1::tuple<std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*>, std::__1::tuple<> >::value>::type std::__1::__bind<void* (*)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*>::operator()<>() at functional:2160
          frame #17: 0x000000010b28b898 mongod`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::__bind<void* (*)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*> > >(void*) [inlined] decltype(std::__1::forward<std::__1::__bind<void* (*)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*> >(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<std::__1::__bind<void* (*)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*> >(std::__1::__bind<void* (*)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*>&&) at __functional_base:416
          frame #18: 0x000000010b28b898 mongod`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::__bind<void* (*)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*> > >(void*) [inlined] void std::__1::__thread_execute<std::__1::__bind<void* (*)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*> >(std::__1::tuple<std::__1::__bind<void* (*)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*> >&, std::__1::__tuple_indices<>) at thread:337
          frame #19: 0x000000010b28b898 mongod`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::__bind<void* (*)(void*), std::__1::pair<mongo::AbstractMessagingPort*, std::__1::shared_ptr<mongo::MessageHandler> >*> > >(__vp=0x00007feb95208630) + 88 at thread:347
          frame #20: 0x00007fff919b699d libsystem_pthread.dylib`_pthread_body + 131
          frame #21: 0x00007fff919b691a libsystem_pthread.dylib`_pthread_start + 168
          frame #22: 0x00007fff919b4351 libsystem_pthread.dylib`thread_start + 13
      

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: