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

'!_killed' invariant failure in CachedPlanStage::isEOF when retrieving stats for dead PlanExecutor

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 3.0.0-rc9, 3.1.0
    • Affects Version/s: 3.0.0-rc8
    • Component/s: Querying
    • Fully Compatible
    • ALL

      The fix for SERVER-17117 added a !_killed invariant to CachedPlanStage::isEOF. This invariant can be violated when stats are retrieved for a dead PlanExecutor:

      (gdb) f 6
      #6  0x000000000153f997 in mongo::runQuery (txn=0x7f20df4287d0, m=..., q=..., nss=..., curop=..., result=..., fromDBDirectClient=false) at src/mongo/db/query/find.cpp:862
      862                 scoped_ptr<PlanStageStats> execStats(exec->getStats());
      (gdb) p state
      $11 = mongo::PlanExecutor::DEAD
      
      #0  0x00007f210524420b in raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
      #1  0x00000000018cada4 in mongo::breakpoint () at src/mongo/util/debugger.cpp:63
      #2  0x00000000018bfc37 in mongo::invariantFailed (expr=0x1fa763a "!_killed", file=0x1fa7618 "src/mongo/db/exec/cached_plan.cpp", line=79) at src/mongo/util/assert_util.cpp:147
      #3  0x00000000013623ba in mongo::CachedPlanStage::isEOF (this=0xa79caa0) at src/mongo/db/exec/cached_plan.cpp:79
      #4  0x0000000001362818 in mongo::CachedPlanStage::getStats (this=0xa79caa0) at src/mongo/db/exec/cached_plan.cpp:166
      #5  0x0000000001577bd3 in mongo::PlanExecutor::getStats (this=0xe14f2f0) at src/mongo/db/query/plan_executor.cpp:230
      #6  0x000000000153f997 in mongo::runQuery (txn=0x7f20df4287d0, m=..., q=..., nss=..., curop=..., result=..., fromDBDirectClient=false) at src/mongo/db/query/find.cpp:862
      #7  0x0000000001444304 in mongo::receivedQuery (txn=0x7f20df4287d0, c=..., dbresponse=..., m=..., fromDBDirectClient=false) at src/mongo/db/instance.cpp:220
      #8  0x00000000014454ae in mongo::assembleResponse (txn=0x7f20df4287d0, m=..., dbresponse=..., remote=..., fromDBDirectClient=false) at src/mongo/db/instance.cpp:403
      #9  0x0000000001142718 in mongo::MyMessageHandler::process (this=0x35680f8, m=..., port=0xa0cdde0, le=0xa92f1d0) at src/mongo/db/db.cpp:206
      #10 0x00000000018e8f98 in mongo::PortMessageServer::handleIncomingMsg (arg=0xa0cdde0) at src/mongo/util/net/message_server_port.cpp:229
      #11 0x00007f210523c182 in start_thread (arg=0x7f20df429700) at pthread_create.c:312
      #12 0x00007f210433d00d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Version: e2e41c48d6d8

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: