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

Check for an invalid ConnectionString type when parsing an addShard request on mongos

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.3.6
    • Fix Version/s: 3.3.9
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 17 (07/15/16)
    • Linked BF Score:
      0

      Description

      This bug affects 3.3.6+. It does not affect 3.2.7.

      [conn11] Invariant failure builderIt != _builders.end() src/mongo/s/client/shard_factory.cpp 52
       
        thread #83: tid = 0x0052, 0x00007fff8c501f06 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGSTOP
          frame #0: 0x00007fff8c501f06 libsystem_kernel.dylib`__pthread_kill + 10
          frame #1: 0x00007fff919b94ec libsystem_pthread.dylib`pthread_kill + 90
          frame #2: 0x00007fff8ddfa787 libsystem_c.dylib`__abort + 145
          frame #3: 0x00007fff8ddfa6f6 libsystem_c.dylib`abort + 144
          frame #4: 0x00000001024b64f6 mongod`mongo::invariantFailed(expr=<unavailable>, file=<unavailable>, line=<unavailable>) + 758 at assert_util.cpp:154
          frame #5: 0x000000010241e6ac mongod`mongo::ShardFactory::createUniqueShard(this=<unavailable>, shardId=<unavailable>, connStr=<unavailable>) + 124 at shard_factory.cpp:52
          frame #6: 0x000000010242082d mongod`mongo::ShardRegistry::createConnection(this=<unavailable>, connStr=<unavailable>) const + 93 at shard_registry.cpp:122
          frame #7: 0x00000001023f24a3 mongod`mongo::ShardingCatalogManagerImpl::addShard(this=0x00007f84fa106450, txn=0x00007f84f86488e0, shardProposedName="", shardConnectionString=0x0000700002a74720, maxSize=0) + 147 at sharding_catalog_manager_impl.cpp:444
          frame #8: 0x00000001022062f4 mongod`mongo::(anonymous namespace)::ConfigSvrAddShardCommand::run(this=<unavailable>, txn=<unavailable>, unusedDbName=<unavailable>, cmdObj=<unavailable>, options=<unavailable>, errmsg=<unavailable>, result=0x0000700002a74d08) + 836 at configsvr_add_shard_command.cpp:122
          frame #9: 0x0000000101df766b mongod`mongo::Command::run(this=<unavailable>, txn=0x00007f84f86488e0, request=0x0000700002a76080, replyBuilder=0x0000700002a767c8) + 4699 at dbcommands.cpp:1564
          frame #10: 0x0000000101df5c1e mongod`mongo::Command::execCommand(txn=0x00007f84f86488e0, command=0x00000001039867f0, request=<unavailable>, replyBuilder=0x0000700002a767c8) + 2526 at dbcommands.cpp:1411
          frame #11: 0x00000001021f6a05 mongod`mongo::runCommands(txn=0x00007f84f86488e0, request=0x0000700002a76080, replyBuilder=0x0000700002a767c8) + 581 at run_commands.cpp:72
          frame #12: 0x0000000101eef270 mongod`mongo::assembleResponse(mongo::OperationContext*, mongo::Message&, mongo::DbResponse&, mongo::HostAndPort const&) + 410 at instance.cpp:271
          frame #13: 0x0000000101eef0d6 mongod`mongo::assembleResponse(txn=0x00007f84f86488e0, m=<unavailable>, dbresponse=0x0000700002a769e8, remote=0x0000700002a76948) + 3014 at instance.cpp:618
          frame #14: 0x0000000101c054a7 mongod`mongo::MyMessageHandler::process(this=<unavailable>, m=0x0000700002a76dd8, port=0x00007f84f842aaf0) + 231 at db.cpp:188
          frame #15: 0x00000001024dab47 mongod`mongo::PortMessageServer::handleIncomingMsg(arg=0x00007f84f8424b10) + 743 at message_server_port.cpp:211
          frame #16: 0x00000001024db811 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 #17: 0x00000001024db808 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 #18: 0x00000001024db808 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 #19: 0x00000001024db808 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 #20: 0x00000001024db808 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 #21: 0x00000001024db808 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=0x00007f84f842ab50) + 88 at thread:347
          frame #22: 0x00007fff919b699d libsystem_pthread.dylib`_pthread_body + 131
          frame #23: 0x00007fff919b691a libsystem_pthread.dylib`_pthread_start + 168
          frame #24: 0x00007fff919b4351 libsystem_pthread.dylib`thread_start + 13
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              esha.maharishi Esha Maharishi
              Reporter:
              kamran.khan Kamran K.
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: