[squid-dev] Trunk profusely leaks memory

Alex Rousskov rousskov at measurement-factory.com
Sat Feb 20 00:08:45 UTC 2016


Hello,

    I accidentally noticed that recent trunk code does not appear to
free various request-related structures (at least). Here are partial
valgrind results after just ~300 benign requests:

> ==8921==    definitely lost: 1,794,688 bytes in 4,058 blocks

> ==8921== 1,193,168 (1,067,712 direct, 125,456 indirect) bytes in 249 blocks are definitely lost in loss record 1,412 of 1,412
> ==8921==    by 0x6D976C: clientReplyContext::operator new(unsigned long)
> ==8921==    by 0x6C4A7B: parseHttpRequest(ConnStateData*, RefCount<Http::One::RequestParser> const&) (client_side.cc:1365)
> ==8921==    by 0x9051B5: Http::One::Server::parseOneRequest() (Http1Server.cc:86)
> ==8921==    by 0x6C9DA8: ConnStateData::clientParseRequests() (client_side.cc:2156)
> ==8921==    by 0x6CA355: ConnStateData::afterClientRead() (client_side.cc:2192)
> ==8921==    by 0x9098EE: Server::doClientRead(CommIoCbParams const&) (Server.cc:177)


> ==8921== 164,648 (136,408 direct, 28,240 indirect) bytes in 289 blocks are definitely lost in loss record 1,407 of 1,412
> ==8921==    by 0x6D8D96: ACLFilledChecklist::operator new(unsigned long)
> ==8921==    by 0x6D531F: clientAclChecklistCreate(Acl::Tree const*, ClientHttpRequest*) (client_side.cc:3636)
> ==8921==    by 0x6F2CD3: ClientRequestContext::clientAccessCheck() (client_side_request.cc:717)
> ==8921==    by 0x6F802D: ClientHttpRequest::doCallouts() (client_side_request.cc:1710)
> ==8921==    by 0x6F1BF1: ClientRequestContext::hostHeaderVerify() (client_side_request.cc:609)
> ==8921==    by 0x6F7EDF: ClientHttpRequest::doCallouts() (client_side_request.cc:1703)
> ==8921==    by 0x6C80D3: clientProcessRequest(ConnStateData*, RefCount<Http::One::RequestParser> const&, Http::Stream*) (client_side.cc:1803)
> ==8921==    by 0x906516: Http::One::Server::processParsedRequest(Http::Stream*) (Http1Server.cc:232)
> ==8921==    by 0x6C9F84: ConnStateData::clientParseRequests() (client_side.cc:2165)
> ==8921==    by 0x6CA355: ConnStateData::afterClientRead() (client_side.cc:2192)
> ==8921==    by 0x9098EE: Server::doClientRead(CommIoCbParams const&) (Server.cc:177)


If these leaks are related to something you have done, please fix. If
you can find the commit that created these leaks, please do (submitting
a few hundred simple requests to a few bzr revisions should be
sufficient to find the culprit if you can reproduce the problem using
valgrind with the latest trunk revisions).


Thank you,

Alex.


More information about the squid-dev mailing list