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

d_migrate getActive() mtx is very hot

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.8.0-rc2
    • Component/s: Sharding
    • Fully Compatible
    • ALL

      This shows up a lot, together with Top stats lock (see SERVER-16342), in insert only workload(s), e.g. sysbench, when the storage engine is WT.
      Not sure why that code is called when mongod is run as standalone. Probably can be avoided.

      Waiting Call Stack
      1 of 1: 100.0% (62.142s of 62.142s)
      
      mongod!lock+0x20 - mutex.hpp:154
      mongod!lock+0 - locks.hpp:412
      mongod!unique_lock+0 - locks.hpp:290
      mongod!scoped_lock+0 - mutex.h:115
      mongod!_getActive+0 - d_migrate.cpp:689
      mongod!mongo::MigrateFromStatus::logOp+0x1d - d_migrate.cpp:326
      mongod!mongo::logOpForSharding+0x26 - d_migrate.cpp:781
      mongod!mongo::repl::logOp+0xb9 - oplog.cpp:442
      mongod!singleInsert+0x1ef - batch_executor.cpp:1112
      mongod!insertOne+0x195 - batch_executor.cpp:1050
      mongod!mongo::WriteBatchExecutor::execOneInsert+0x5f - batch_executor.cpp:1077
      mongod!mongo::WriteBatchExecutor::execInserts+0x24f - batch_executor.cpp:871
      mongod!mongo::WriteBatchExecutor::bulkExecute+0x33 - batch_executor.cpp:754
      mongod!mongo::WriteBatchExecutor::executeBatch+0x394 - batch_executor.cpp:262
      mongod!mongo::WriteCmd::run+0x172 - write_commands.cpp:144
      mongod!mongo::_execCommand+0x33 - dbcommands.cpp:1231
      mongod!mongo::Command::execCommand+0xc24 - dbcommands.cpp:1445
      mongod!mongo::_runCommands+0x289 - dbcommands.cpp:1520
      mongod!runCommands+0x32 - find.cpp:131
      mongod!mongo::runQuery+0x4a - find.cpp:527
      mongod!receivedQuery+0x1e4 - instance.cpp:221
      mongod!mongo::assembleResponse+0x940 - instance.cpp:391
      mongod!mongo::MyMessageHandler::process+0xdf - db.cpp:194
      mongod!mongo::PortMessageServer::handleIncomingMsg+0x410 - message_server_port.cpp:234
      libpthread-2.18.so!start_thread+0xc2 - [Unknown]:[Unknown]
      libc-2.18.so!__clone+0x6c - [Unknown]:[Unknown]
      

      VTune output attached.

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            davide.italiano Davide Italiano
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: