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

Make library dependency graph acyclic

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build
    • Fully Compatible
    • Platforms 15 (06/03/16), Platforms 2017-03-06
    • 0

      Currently we have several classes of problems that prevent us from being able to properly express all of the library dependencies in the build system:

      • Circular library dependences (see db/query/query and db/exec/exec).
      • Symbols that lack a unique definition and are defined differently in different contexts (see isMongos, or Command::execCommand).
      • Unexpressed edges, where one library does actually depend on another, but does not declare it.

      There are several adverse consequences to this situation, which include:

      • The inability to build under UBSAN, which more aggressively needs symbol information, so fails to link executables that normally link.
      • The inability to easily refactor library dependencies.
      • The inability to link all libraries with -z defs, which makes it impossible to hold the line against making the library graph more tangled.

      Here is a list of currently known multiply defined symbols:

      multiple definition of `mongo::cmdAuthSchemaUpgrade'
      multiple definition of `mongo::cmdCreateRole'
      multiple definition of `mongo::cmdCreateUser'
      multiple definition of `mongo::cmdDropAllRolesFromDatabase'
      multiple definition of `mongo::cmdDropAllUsersFromDatabase'
      multiple definition of `mongo::cmdDropRole'
      multiple definition of `mongo::cmdDropUser'
      multiple definition of `mongo::cmdGrantPrivilegesToRole'
      multiple definition of `mongo::cmdGrantRolesToRole'
      multiple definition of `mongo::cmdGrantRolesToUser'
      multiple definition of `mongo::cmdInvalidateUserCache'
      multiple definition of `mongo::cmdMergeAuthzCollections'
      multiple definition of `mongo::cmdRevokePrivilegesFromRole'
      multiple definition of `mongo::cmdRevokeRolesFromRole'
      multiple definition of `mongo::cmdRevokeRolesFromUser'
      multiple definition of `mongo::cmdRolesInfo'
      multiple definition of `mongo::cmdUpdateRole'
      multiple definition of `mongo::cmdUpdateUser'
      multiple definition of `mongo::cmdUsersInfo'
      multiple definition of `mongo::Command::execCommand(mongo::OperationContext*, mongo::Command*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*)'
      multiple definition of `mongo::Command::findCommand(mongo::StringData)'
      multiple definition of `mongo::Command::registerError(mongo::OperationContext*, mongo::DBException const&)'
      multiple definition of `mongo::createDirectClient(mongo::OperationContext*)'
      multiple definition of `mongo::detail::signedCompare(double, double)'
      multiple definition of `mongo::detail::signedCompare(double, long)'
      multiple definition of `mongo::detail::signedCompare(double, unsigned long)'
      multiple definition of `mongo::detail::signedCompare(long, double)'
      multiple definition of `mongo::detail::signedCompare(long, long)'
      multiple definition of `mongo::detail::signedCompare(long, unsigned long)'
      multiple definition of `mongo::detail::signedCompare(unsigned long, double)'
      multiple definition of `mongo::detail::signedCompare(unsigned long, long)'
      multiple definition of `mongo::detail::signedCompare(unsigned long, unsigned long)'
      multiple definition of `mongo::executor::makeCallbackHandle()'
      multiple definition of `mongo::haveLocalShardingInfo(mongo::OperationContext*, std::string const&)'
      multiple definition of `_mongoInitializerFunction_ForkServer(mongo::InitializerContext*)'
      multiple definition of `mongo::isMongos()'
      multiple definition of `mongo::KVDatabaseCatalogEntry::getIndex(mongo::OperationContext*, mongo::CollectionCatalogEntry const*, mongo::IndexCatalogEntry*)'
      multiple definition of `mongo::KVHarnessHelper::create()'
      multiple definition of `mongo::logProcessDetailsForLogRotate()'
      multiple definition of `mongo::_mongoInitializerFunction_SetGlobalEnvironment(mongo::InitializerContext*)'
      multiple definition of `mongo::myall'
      multiple definition of `mongo::newHarnessHelper()'
      multiple definition of `mongo::usingAShardConnection(std::string const&)'
      multiple definition of `mongo::WiredTigerKVEngine::initRsOplogBackgroundThread(mongo::StringData)'
      

            Assignee:
            adam.martin@mongodb.com ADAM Martin (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: