[SERVER-17236] '!_killed' invariant failure in CachedPlanStage::isEOF when retrieving stats for dead PlanExecutor Created: 09/Feb/15  Updated: 19/Sep/15  Resolved: 09/Feb/15

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 3.0.0-rc8
Fix Version/s: 3.0.0-rc9, 3.1.0

Type: Bug Priority: Critical - P2
Reporter: Kamran K. Assignee: David Storch
Resolution: Done Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-17117 boost::lock_error in CachedPlanStage:... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Participants:

 Description   

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



 Comments   
Comment by Githook User [ 09/Feb/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-17236 remove invalid invariant() from CachedPlanStage::isEOF()

(cherry picked from commit 978356d01c456f037efaaca9c7d2299705151e4d)
Branch: v3.0
https://github.com/mongodb/mongo/commit/425e072cc40c4389d1761f43f2900c117c96909c

Comment by Githook User [ 09/Feb/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-17236 remove invalid invariant() from CachedPlanStage::isEOF()
Branch: master
https://github.com/mongodb/mongo/commit/978356d01c456f037efaaca9c7d2299705151e4d

Generated at Thu Feb 08 03:43:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.