[SERVER-5185] valgrind with aggregation test suite Created: 02/Mar/12  Updated: 11/Jul/16  Resolved: 22/Mar/12

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 2.1.1

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Chris Westin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Ran the aggregation test suite against valgrind/mongod while doing some other testing. Here are the results - could be spurious I haven't looked at it.

==5666== 2,602 (544 direct, 2,058 indirect) bytes in 4 blocks are definitely lost in loss record 1,343 of 1,356
==5666==    at 0x4A059DC: operator new(unsigned long) (vg_replace_malloc.c:220)
==5666==    by 0x6F51E2: mongo::DocumentSourceUnwind::create(boost::intrusive_ptr<mongo::ExpressionContext> const&) (document_source_unwind.cpp:207)
==5666==    by 0x6F55B8: mongo::DocumentSourceUnwind::createFromBson(mongo::BSONElement*, boost::intrusive_ptr<mongo::ExpressionContext> const&) (document_source_unwind.cpp:237)
==5666==    by 0x6550F9: mongo::Pipeline::parseCommand(std::string&, mongo::BSONObj&, boost::intrusive_ptr<mongo::ExpressionContext> const&) (pipeline.cpp:165)
==5666==    by 0x8C2C67: mongo::PipelineCommand::run(std::string const&, mongo::BSONObj&, int, std::string&, mongo::BSONObjBuilder&, bool) (pipeline_command.cpp:81)
==5666==    by 0x8126A6: mongo::_execCommand(mongo::Command*, std::string const&, mongo::BSONObj&, int, mongo::BSONObjBuilder&, bool) (dbcommands.cpp:1776)
==5666==    by 0x8148E5: mongo::execCommand(mongo::Command*, mongo::Client&, int, char const*, mongo::BSONObj&, mongo::BSONObjBuilder&, bool) (dbcommands.cpp:1889)
==5666==    by 0x814FE9: mongo::_runCommands(char const*, mongo::BSONObj&, mongo::_BufBuilder<mongo::TrivialAllocator>&, mongo::BSONObjBuilder&, bool, int) (dbcommands.cpp:1949)
==5666==    by 0x8DFE99: mongo::runCommands(char const*, mongo::BSONObj&, mongo::CurOp&, mongo::_BufBuilder<mongo::TrivialAllocator>&, mongo::BSONObjBuilder&, bool, int) (query.cpp:42)
==5666==    by 0x8E3C26: mongo::runQuery(mongo::Message&, mongo::QueryMessage&, mongo::CurOp&, mongo::Message&) (query.cpp:779)
==5666==    by 0x93138F: mongo::assembleResponse(mongo::Message&, mongo::DbResponse&, mongo::HostAndPort const&) (instance.cpp:225)
==5666==    by 0x558993: mongo::MyMessageHandler::process(mongo::Message&, mongo::AbstractMessagingPort*, mongo::LastError*) (db.cpp:184)
==5666== 
==5666== 30,039 (896 direct, 29,143 indirect) bytes in 14 blocks are definitely lost in loss record 1,349 of 1,356
==5666==    at 0x4A059DC: operator new(unsigned long) (vg_replace_malloc.c:220)
==5666==    by 0xA976A2: mongo::DocumentSourceProject::create(boost::intrusive_ptr<mongo::ExpressionContext> const&) (document_source_project.cpp:96)
==5666==    by 0xA981A7: mongo::DocumentSourceProject::createFromBson(mongo::BSONElement*, boost::intrusive_ptr<mongo::ExpressionContext> const&) (document_source_project.cpp:140)
==5666==    by 0x6550F9: mongo::Pipeline::parseCommand(std::string&, mongo::BSONObj&, boost::intrusive_ptr<mongo::ExpressionContext> const&) (pipeline.cpp:165)
==5666==    by 0x8C2C67: mongo::PipelineCommand::run(std::string const&, mongo::BSONObj&, int, std::string&, mongo::BSONObjBuilder&, bool) (pipeline_command.cpp:81)
==5666==    by 0x8126A6: mongo::_execCommand(mongo::Command*, std::string const&, mongo::BSONObj&, int, mongo::BSONObjBuilder&, bool) (dbcommands.cpp:1776)
==5666==    by 0x8148E5: mongo::execCommand(mongo::Command*, mongo::Client&, int, char const*, mongo::BSONObj&, mongo::BSONObjBuilder&, bool) (dbcommands.cpp:1889)
==5666==    by 0x814FE9: mongo::_runCommands(char const*, mongo::BSONObj&, mongo::_BufBuilder<mongo::TrivialAllocator>&, mongo::BSONObjBuilder&, bool, int) (dbcommands.cpp:1949)
==5666==    by 0x8DFE99: mongo::runCommands(char const*, mongo::BSONObj&, mongo::CurOp&, mongo::_BufBuilder<mongo::TrivialAllocator>&, mongo::BSONObjBuilder&, bool, int) (query.cpp:42)
==5666==    by 0x8E3C26: mongo::runQuery(mongo::Message&, mongo::QueryMessage&, mongo::CurOp&, mongo::Message&) (query.cpp:779)
==5666==    by 0x93138F: mongo::assembleResponse(mongo::Message&, mongo::DbResponse&, mongo::HostAndPort const&) (instance.cpp:225)
==5666==    by 0x558993: mongo::MyMessageHandler::process(mongo::Message&, mongo::AbstractMessagingPort*, mongo::LastError*) (db.cpp:184)
==5666== 
==5666== 30,734 (960 direct, 29,774 indirect) bytes in 6 blocks are definitely lost in loss record 1,350 of 1,356
==5666==    at 0x4A059DC: operator new(unsigned long) (vg_replace_malloc.c:220)
==5666==    by 0x792542: mongo::DocumentSourceSort::create(boost::intrusive_ptr<mongo::ExpressionContext> const&) (document_source_sort.cpp:82)
==5666==    by 0x794D77: mongo::DocumentSourceSort::createFromBson(mongo::BSONElement*, boost::intrusive_ptr<mongo::ExpressionContext> const&) (document_source_sort.cpp:121)
==5666==    by 0x6550F9: mongo::Pipeline::parseCommand(std::string&, mongo::BSONObj&, boost::intrusive_ptr<mongo::ExpressionContext> const&) (pipeline.cpp:165)
==5666==    by 0x8C2C67: mongo::PipelineCommand::run(std::string const&, mongo::BSONObj&, int, std::string&, mongo::BSONObjBuilder&, bool) (pipeline_command.cpp:81)
==5666==    by 0x8126A6: mongo::_execCommand(mongo::Command*, std::string const&, mongo::BSONObj&, int, mongo::BSONObjBuilder&, bool) (dbcommands.cpp:1776)
==5666==    by 0x8148E5: mongo::execCommand(mongo::Command*, mongo::Client&, int, char const*, mongo::BSONObj&, mongo::BSONObjBuilder&, bool) (dbcommands.cpp:1889)
==5666==    by 0x814FE9: mongo::_runCommands(char const*, mongo::BSONObj&, mongo::_BufBuilder<mongo::TrivialAllocator>&, mongo::BSONObjBuilder&, bool, int) (dbcommands.cpp:1949)
==5666==    by 0x8DFE99: mongo::runCommands(char const*, mongo::BSONObj&, mongo::CurOp&, mongo::_BufBuilder<mongo::TrivialAllocator>&, mongo::BSONObjBuilder&, bool, int) (query.cpp:42)
==5666==    by 0x8E3C26: mongo::runQuery(mongo::Message&, mongo::QueryMessage&, mongo::CurOp&, mongo::Message&) (query.cpp:779)
==5666==    by 0x93138F: mongo::assembleResponse(mongo::Message&, mongo::DbResponse&, mongo::HostAndPort const&) (instance.cpp:225)
==5666==    by 0x558993: mongo::MyMessageHandler::process(mongo::Message&, mongo::AbstractMessagingPort*, mongo::LastError*) (db.cpp:184)
==5666== 



 Comments   
Comment by auto [ 22/Mar/12 ]

Author:

{u'login': u'cwestin', u'name': u'U-tellus\\cwestin', u'email': u'cwestin@10gen.com'}

Message: SERVER-5185 break circular reference when setting up pipeline to run
Branch: master
https://github.com/mongodb/mongo/commit/b03653c7660475f135e5e2f20d135e541d4ce8d0

Comment by Chris Westin [ 14/Mar/12 ]

My run got a different result. I saw the DocumentSourceCursor at the beginning of the pipeline consistently not be released.

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