[SERVER-21165] Leak in QueryPlannerAccess::makeLeafNode Created: 27/Oct/15  Updated: 25/Apr/16  Resolved: 29/Oct/15

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 3.2.0-rc1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Robert Guo (Inactive) Assignee: David Storch
Resolution: Duplicate Votes: 0
Labels: fuzzer-blocker
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-21166 Leak in getExecutorDistinct Closed
Related
related to SERVER-18372 QuerySolution leak when exception is ... Closed
related to SERVER-19712 Index spec with integer-overflowing s... Closed
Operating System: ALL
Sprint: TIG B (10/30/15)
Participants:

 Description   

mongod githash: 0613deff6f

[MongoDFixture:job0] Direct leak of 200 byte(s) in 1 object(s) allocated from:
[MongoDFixture:job0]     #0 0xae13c9 in operator new(unsigned long) (/home/ubuntu/mongo/mongod+0xae13c9)
[MongoDFixture:job0]     #1 0x1cdf2a2 in mongo::QueryPlannerAccess::makeLeafNode(mongo::CanonicalQuery const&, mongo::IndexEntry const&, unsigned long, mongo::MatchExpression*, mongo::IndexBoundsBuilder::BoundsTightness*) /home/ubuntu/mongo/src/mongo/db/query/planner_access.cpp:208
[MongoDFixture:job0]     #2 0x1ce7b7f in mongo::QueryPlannerAccess::buildIndexedDataAccess(mongo::CanonicalQuery const&, mongo::MatchExpression*, bool, std::vector<mongo::IndexEntry, std::allocator<mongo::IndexEntry> > const&, mongo::QueryPlannerParams const&) /home/ubuntu/mongo/src/mongo/db/query/planner_access.cpp:1171
[MongoDFixture:job0]     #3 0x1d2ce63 in mongo::QueryPlanner::plan(mongo::CanonicalQuery const&, mongo::QueryPlannerParams const&, std::vector<mongo::QuerySolution*, std::allocator<mongo::QuerySolution*> >*) /home/ubuntu/mongo/src/mongo/db/query/query_planner.cpp:763
[MongoDFixture:job0]     #4 0x1bdfdf0 in mongo::(anonymous namespace)::prepareExecution(mongo::OperationContext*, mongo::Collection*, mongo::WorkingSet*, mongo::CanonicalQuery*, unsigned long, mongo::PlanStage**, mongo::QuerySolution**) /home/ubuntu/mongo/src/mongo/db/query/get_executor.cpp:344
[MongoDFixture:job0]     #5 0x1bdda99 in mongo::getExecutor(mongo::OperationContext*, mongo::Collection*, std::unique_ptr<mongo::CanonicalQuery, std::default_delete<mongo::CanonicalQuery> >, mongo::PlanExecutor::YieldPolicy, unsigned long) /home/ubuntu/mongo/src/mongo/db/query/get_executor.cpp:425
[MongoDFixture:job0]     #6 0x1be86d9 in mongo::getExecutorFind(mongo::OperationContext*, mongo::Collection*, mongo::NamespaceString const&, std::unique_ptr<mongo::CanonicalQuery, std::default_delete<mongo::CanonicalQuery> >, mongo::PlanExecutor::YieldPolicy) /home/ubuntu/mongo/src/mongo/db/query/get_executor.cpp:574
[MongoDFixture:job0]     #7 0x11adf45 in mongo::FindCmd::run(mongo::OperationContext*, std::string const&, mongo::BSONObj&, int, std::string&, mongo::BSONObjBuilder&) /home/ubuntu/mongo/src/mongo/db/commands/find_cmd.cpp:276
[MongoDFixture:job0]     #8 0x13d4b30 in mongo::Command::run(mongo::OperationContext*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*) /home/ubuntu/mongo/src/mongo/db/dbcommands.cpp:1385
[MongoDFixture:job0]     #9 0x13cff9a in mongo::Command::execCommand(mongo::OperationContext*, mongo::Command*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*) /home/ubuntu/mongo/src/mongo/db/dbcommands.cpp:1290
 
 
[MongoDFixture:job0] Direct leak of 200 byte(s) in 1 object(s) allocated from:
[MongoDFixture:job0]     #0 0xae13c9 in operator new(unsigned long) (/home/ubuntu/mongo/mongod+0xae13c9)
[MongoDFixture:job0]     #1 0x1cdf2a2 in mongo::QueryPlannerAccess::makeLeafNode(mongo::CanonicalQuery const&, mongo::IndexEntry const&, unsigned long, mongo::MatchExpression*, mongo::IndexBoundsBuilder::BoundsTightness*) /home/ubuntu/mongo/src/mongo/db/query/planner_access.cpp:208
[MongoDFixture:job0]     #2 0x1ce7b7f in mongo::QueryPlannerAccess::buildIndexedDataAccess(mongo::CanonicalQuery const&, mongo::MatchExpression*, bool, std::vector<mongo::IndexEntry, std::allocator<mongo::IndexEntry> > const&, mongo::QueryPlannerParams const&) /home/ubuntu/mongo/src/mongo/db/query/planner_access.cpp:1171
[MongoDFixture:job0]     #3 0x1d2ce63 in mongo::QueryPlanner::plan(mongo::CanonicalQuery const&, mongo::QueryPlannerParams const&, std::vector<mongo::QuerySolution*, std::allocator<mongo::QuerySolution*> >*) /home/ubuntu/mongo/src/mongo/db/query/query_planner.cpp:763
[MongoDFixture:job0]     #4 0x1bdfdf0 in mongo::(anonymous namespace)::prepareExecution(mongo::OperationContext*, mongo::Collection*, mongo::WorkingSet*, mongo::CanonicalQuery*, unsigned long, mongo::PlanStage**, mongo::QuerySolution**) /home/ubuntu/mongo/src/mongo/db/query/get_executor.cpp:344
[MongoDFixture:job0]     #5 0x1bedd2f in mongo::getExecutorDelete(mongo::OperationContext*, mongo::Collection*, mongo::ParsedDelete*) /home/ubuntu/mongo/src/mongo/db/query/get_executor.cpp:712
[MongoDFixture:job0]     #6 0x1365ffe in mongo::multiRemove(mongo::OperationContext*, mongo::BatchItemRef const&, mongo::(anonymous namespace)::WriteOpResult*) /home/ubuntu/mongo/src/mongo/db/commands/write_commands/batch_executor.cpp:1326
[MongoDFixture:job0]     #7 0x1365ffe in mongo::WriteBatchExecutor::execRemove(mongo::BatchItemRef const&, mongo::WriteErrorDetail**) /home/ubuntu/mongo/src/mongo/db/commands/write_commands/batch_executor.cpp:889
[MongoDFixture:job0]     #8 0x135bef9 in mongo::WriteBatchExecutor::bulkExecute(mongo::BatchedCommandRequest const&, std::vector<mongo::BatchedUpsertDetail*, std::allocator<mongo::BatchedUpsertDetail*> >*, std::vector<mongo::WriteErrorDetail*, std::allocator<mongo::WriteErrorDetail*> >*) /home/ubuntu/mongo/src/mongo/db/commands/write_commands/batch_executor.cpp:716
[MongoDFixture:job0]     #9 0x1356abd in mongo::WriteBatchExecutor::executeBatch(mongo::BatchedCommandRequest const&, mongo::BatchedCommandResponse*) /home/ubuntu/mongo/src/mongo/db/commands/write_commands/batch_executor.cpp:321
[MongoDFixture:job0]     #10 0x137c2de in mongo::WriteCmd::run(mongo::OperationContext*, std::string const&, mongo::BSONObj&, int, std::string&, mongo::BSONObjBuilder&) /home/ubuntu/mongo/src/mongo/db/commands/write_commands/write_commands.cpp:144
[MongoDFixture:job0]     #11 0x13d4b30 in mongo::Command::run(mongo::OperationContext*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*) /home/ubuntu/mongo/src/mongo/db/dbcommands.cpp:1385
[MongoDFixture:job0]     #12 0x13cff9a in mongo::Command::execCommand(mongo::OperationContext*, mongo::Command*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*) /home/ubuntu/mongo/src/mongo/db/dbcommands.cpp:1290
[MongoDFixture:job0]     #13 0x1122c11 in mongo::runCommands(mongo::OperationContext*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*) /home/ubuntu/mongo/src/mongo/db/commands.cpp:496



 Comments   
Comment by David Storch [ 29/Oct/15 ]

This leak has the same root cause as the one reported in SERVER-21166. Closing as a duplicate.

Comment by J Rassi [ 27/Oct/15 ]

Well, I can confirm that 0613deff6f is before 4c38ff13, so that rules out the SERVER-20888 theory.

Thanks for looking into this.

Comment by Robert Guo (Inactive) [ 27/Oct/15 ]

jason.rassi githash is 0613deff6f and I saw it on a run from 2 weeks ago with an earlier build

Comment by J Rassi [ 27/Oct/15 ]

Robert, what's the git hash associated with the server version you used here?

Edit: specifically, if the git hash is in the range 4c38ff13...1c91d1a2, then I would suspect SERVER-20888 is the underlying cause.

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