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

Invariant failure when running sharded planCache* commands with invalid namespaces

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

      This bug affects versions 3.3.4+. (It's reproducible even after the namespace fixes from SERVER-23480.)

      Invariant failure nss.isValid() src/mongo/s/set_shard_version_request.cpp 102
      
      * thread #22: tid = 0x6f602, 0x00007fff8ff8df06 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT
        * frame #0: 0x00007fff8ff8df06 libsystem_kernel.dylib`__pthread_kill + 10
          frame #1: 0x00007fff8ee084ec libsystem_pthread.dylib`pthread_kill + 90
          frame #2: 0x00007fff92fb06e7 libsystem_c.dylib`abort + 129
          frame #3: 0x000000010c88a166 mongos`mongo::invariantFailed(expr=<unavailable>, file=<unavailable>, line=<unavailable>) + 806 at assert_util.cpp:154
          frame #4: 0x000000010c859f8f mongos`mongo::SetShardVersionRequest::makeForVersioning(configServer=<unavailable>, shardName="shard0000", shardConnectionString=<unavailable>, nss=<unavailable>, nssVersion=<unavailable>, isAuthoritative=<unavailable>) + 1151 at set_shard_version_request.cpp:102
          frame #5: 0x000000010c7d637c mongos`mongo::(anonymous namespace)::setShardVersion(txn=<unavailable>, conn=<unavailable>, ns=<unavailable>, configServer=<unavailable>, version=<unavailable>, manager=<unavailable>, authoritative=<unavailable>, result=<unavailable>) + 1436 at version_manager.cpp:139
          frame #6: 0x000000010c7d39bb mongos`mongo::(anonymous namespace)::checkShardVersion(txn=0x00007fe972f03730, conn_in=0x00007fe972e08640, ns="test.", refManager=nullptr, authoritative=false, tryNumber=1) + 4859 at version_manager.cpp:348
          frame #7: 0x000000010c7d597d mongos`mongo::VersionManager::checkShardVersionCB(this=<unavailable>, txn=0x00007fe972f03730, conn_in=<unavailable>, authoritative=false, tryNumber=1) + 109 at version_manager.cpp:460
          frame #8: 0x000000010c7bffa5 mongos`mongo::ShardConnection::_finishInit(this=0x00007fe972f02c00) + 85 at shard_connection.cpp:449
          frame #9: 0x000000010c43f5fa mongos`mongo::ParallelSortClusteredCursor::setupVersionAndHandleSlaveOk(mongo::OperationContext*, std::__1::shared_ptr<mongo::ParallelConnectionState>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mongo::Shard>, mongo::NamespaceString const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mongo::ChunkManager>) [inlined] mongo::ShardConnection::setVersion(this=0x00007fe972f02c00) + 8 at shard_connection.h:102
          frame #10: 0x000000010c43f5f2 mongos`mongo::ParallelSortClusteredCursor::setupVersionAndHandleSlaveOk(this=<unavailable>, txn=0x00007fe972f03730, state=std::__1::shared_ptr<mongo::ParallelConnectionState>::element_type @ 0x00007fe972f02e30 strong=3 weak=1, shardId=<unavailable>, primary=<unavailable>, ns=0x0000700000b517d0, vinfo=<unavailable>, manager=<unavailable>) + 1026 at parallel.cpp:425
          frame #11: 0x000000010c43a60b mongos`mongo::ParallelSortClusteredCursor::startInit(this=0x0000700000b51b78, txn=0x00007fe972f03730) + 7067 at parallel.cpp:560
          frame #12: 0x000000010c43274b mongos`mongo::ParallelSortClusteredCursor::init(mongo::OperationContext*) [inlined] mongo::ParallelSortClusteredCursor::fullInit(this=0x0000700000b51b78, txn=0x00007fe972f03730) + 11 at parallel.cpp:323
          frame #13: 0x000000010c432740 mongos`mongo::ParallelSortClusteredCursor::init(this=0x0000700000b51b78, txn=0x00007fe972f03730) + 48 at parallel.cpp:70
          frame #14: 0x000000010c8344ac mongos`mongo::Strategy::commandOp(txn=<unavailable>, db=<unavailable>, command=<unavailable>, options=<unavailable>, versionedNS=<unavailable>, targetingQuery=<unavailable>, results=0x0000000000000000) + 380 at strategy.cpp:344
          frame #15: 0x000000010c809df4 mongos`mongo::ClusterPlanCacheCmd::run(this=<unavailable>, txn=<unavailable>, dbName=<unavailable>, cmdObj=<unavailable>, options=<unavailable>, errMsg=<unavailable>, result=<unavailable>) + 340 at cluster_plan_cache_cmd.cpp:124
          frame #16: 0x000000010c8580de mongos`mongo::Command::execCommandClientBasic(txn=<unavailable>, c=0x00007fe972c318a0, client=0x00007fe972e05fe0, queryOptions=0, ns=<unavailable>, cmdObj=<unavailable>, result=0x0000700000b523a0) + 1214 at s_only.cpp:149
          frame #17: 0x000000010c833eac mongos`mongo::(anonymous namespace)::runAgainstRegistered(txn=0x00007fe972f03730, ns="test.$cmd", jsobj=0x0000700000b52530, anObjBuilder=0x0000700000b523a0, queryOptions=0) + 316 at strategy.cpp:109
          frame #18: 0x000000010c833483 mongos`mongo::Strategy::clientCommandOp(txn=0x00007fe972f03730, request=0x0000700000b52a00) + 2499 at strategy.cpp:266
          frame #19: 0x000000010c82efc0 mongos`mongo::Request::process(this=0x0000700000b52a00, txn=<unavailable>, attempt=0) + 1168 at request.cpp:109
          frame #20: 0x000000010c3aad60 mongos`mongo::ShardedMessageHandler::process(this=<unavailable>, m=<unavailable>, p=<unavailable>) + 112 at server.cpp:166
          frame #21: 0x000000010c8a7414 mongos`mongo::PortMessageServer::handleIncomingMsg(arg=0x00007fe972f02160) + 724 at message_server_port.cpp:229
          frame #22: 0x000000010c8a6a31 mongos`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::__bind<void* (*)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*> > >(void*) [inlined] decltype(std::__1::forward<void* (*&)(void*)>(fp)(std::__1::forward<mongo::(anonymous namespace)::MessagingPortWithHandler*&>(fp0))) std::__1::__invoke<void* (*&)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*&>(void* (*&&&)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*&&&) + 97 at __functional_base:416
          frame #23: 0x000000010c8a6a28 mongos`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::__bind<void* (*)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*> > >(void*) [inlined] std::__1::__bind_return<void* (*)(void*), std::__1::tuple<mongo::(anonymous namespace)::MessagingPortWithHandler*>, std::__1::tuple<>, __is_valid_bind_return<void* (*)(void*), std::__1::tuple<mongo::(anonymous namespace)::MessagingPortWithHandler*>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<void* (*)(void*), std::__1::tuple<mongo::(anonymous namespace)::MessagingPortWithHandler*>, 0ul, std::__1::tuple<> >(void* (*&)(void*), std::__1::tuple<mongo::(anonymous namespace)::MessagingPortWithHandler*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) at functional:2097
          frame #24: 0x000000010c8a6a28 mongos`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::__bind<void* (*)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*> > >(void*) [inlined] std::__1::__bind_return<void* (*)(void*), std::__1::tuple<mongo::(anonymous namespace)::MessagingPortWithHandler*>, std::__1::tuple<>, __is_valid_bind_return<void* (*)(void*), std::__1::tuple<mongo::(anonymous namespace)::MessagingPortWithHandler*>, std::__1::tuple<> >::value>::type std::__1::__bind<void* (*)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*>::operator()<>() at functional:2160
          frame #25: 0x000000010c8a6a28 mongos`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::__bind<void* (*)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*> > >(void*) [inlined] decltype(std::__1::forward<std::__1::__bind<void* (*)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*> >(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<std::__1::__bind<void* (*)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*> >(std::__1::__bind<void* (*)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*>&&) at __functional_base:416
          frame #26: 0x000000010c8a6a28 mongos`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::__bind<void* (*)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*> > >(void*) [inlined] void std::__1::__thread_execute<std::__1::__bind<void* (*)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*> >(std::__1::tuple<std::__1::__bind<void* (*)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*> >&, std::__1::__tuple_indices<>) at thread:337
          frame #27: 0x000000010c8a6a28 mongos`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::__bind<void* (*)(void*), mongo::(anonymous namespace)::MessagingPortWithHandler*> > >(__vp=0x00007fe972f02070) + 88 at thread:347
          frame #28: 0x00007fff8ee0599d libsystem_pthread.dylib`_pthread_body + 131
          frame #29: 0x00007fff8ee0591a libsystem_pthread.dylib`_pthread_start + 168
          frame #30: 0x00007fff8ee03351 libsystem_pthread.dylib`thread_start + 13
      

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: