LISTSERV mailing list manager LISTSERV 16.5

Help for QSERV-L Archives


QSERV-L Archives

QSERV-L Archives


QSERV-L@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

QSERV-L Home

QSERV-L Home

QSERV-L  May 2014

QSERV-L May 2014

Subject:

Re: Trying not to leak memory in the client

From:

Andrew Hanushevsky <[log in to unmask]>

Reply-To:

General discussion for qserv (LSST prototype baseline catalog)

Date:

Thu, 8 May 2014 22:15:04 -0700

Content-Type:

TEXT/PLAIN

Parts/Attachments:

Parts/Attachments

TEXT/PLAIN (93 lines)

Hi Daniel,

I can't see anything wrong. So, you should put in the old print statements 
where you allocate and delete (also indicate how much you allocated). Then 
we can see if you are indeed doing what you think you are doing. I can do 
that as well if you give me the stuff that compiles and create the 
appropriate shared library.

Andy

On Thu, 8 May 2014, Daniel L. Wang wrote:

> Hi Andy,
>
> I'm trying to make sure that I don't leak memory using the client interface, 
> but I still end up leaking about 100 bytes for each sequence of 
> getservice-provision-request-close-cleanup. I seem to be failing to release 
> memory in 2 places. Here's a valgrind report for 30 iterations of the 
> sequence.
>
> ==13424== 450 bytes in 30 blocks are definitely lost in loss record 7 of 8
> ==13424==    at 0x4A07152: operator new[](unsigned long) 
> (vg_replace_malloc.c:363)
> ==13424==    by 0x401C92: (anonymous 
> namespace)::MyRequest::MyRequest(XrdSsiSession*) (myclient.cc:30)
> ==13424==    by 0x402693: (anonymous namespace)::MyResource::makeRequest() 
> (myclient.cc:177)
> ==13424==    by 0x40263F: (anonymous 
> namespace)::MyResource::ProvisionDone(XrdSsiSession*) (myclient.cc:171)
> ==13424==    by 0x4C279C9: 
> XrdSsiSessReal::HandleResponse(XrdCl::XRootDStatus*, XrdCl::AnyObject*) 
> (XrdSsiSessReal.cc:157)
> ==13424==    by 0x4C26C69: 
> XrdCl::ResponseHandler::HandleResponseWithHosts(XrdCl::XRootDStatus*, 
> XrdCl::AnyObject*, std::vector<XrdCl::HostInfo, 
> std::allocator<XrdCl::HostInfo> >*) (XrdClXRootDResponses.hh:850)
> ==13424==    by 0x4F47693: (anonymous 
> namespace)::OpenHandler::HandleResponseWithHosts(XrdCl::XRootDStatus*, 
> XrdCl::AnyObject*, std::vector<XrdCl::HostInfo, 
> std::allocator<XrdCl::HostInfo> >*) (XrdClFileStateHandler.cc:86)
> ==13424==    by 0x4F3AEDF: XrdCl::XRootDMsgHandler::HandleResponse() 
> (XrdClXRootDMsgHandler.cc:1008)
> ==13424==    by 0x4F38204: XrdCl::XRootDMsgHandler::Process(XrdCl::Message*) 
> (XrdClXRootDMsgHandler.cc:300)
> ==13424==    by 0x4F198D1: XrdCl::Stream::HandleIncMsgJob::Run(void*) 
> (XrdClStream.hh:279)
> ==13424==    by 0x4F6FFED: XrdCl::JobManager::RunJobs() 
> (XrdClJobManager.cc:148)
> ==13424==    by 0x4F6FB37: RunRunnerThread (XrdClJobManager.cc:33)
> ==13424==
> ==13424== 3,360 bytes in 30 blocks are definitely lost in loss record 8 of 8
> ==13424==    at 0x4A075BC: operator new(unsigned long) 
> (vg_replace_malloc.c:298)
> ==13424==    by 0x4C27F8C: XrdSsiSessReal::ProcessRequest(XrdSsiRequest*, 
> unsigned short) (XrdSsiSessReal.cc:260)
> ==13424==    by 0x4026DC: (anonymous namespace)::MyResource::makeRequest() 
> (myclient.cc:179)
> ==13424==    by 0x40263F: (anonymous 
> namespace)::MyResource::ProvisionDone(XrdSsiSession*) (myclient.cc:171)
> ==13424==    by 0x4C279C9: 
> XrdSsiSessReal::HandleResponse(XrdCl::XRootDStatus*, XrdCl::AnyObject*) 
> (XrdSsiSessReal.cc:157)
> ==13424==    by 0x4C26C69: 
> XrdCl::ResponseHandler::HandleResponseWithHosts(XrdCl::XRootDStatus*, 
> XrdCl::AnyObject*, std::vector<XrdCl::HostInfo, 
> std::allocator<XrdCl::HostInfo> >*) (XrdClXRootDResponses.hh:850)
> ==13424==    by 0x4F47693: (anonymous 
> namespace)::OpenHandler::HandleResponseWithHosts(XrdCl::XRootDStatus*, 
> XrdCl::AnyObject*, std::vector<XrdCl::HostInfo, 
> std::allocator<XrdCl::HostInfo> >*) (XrdClFileStateHandler.cc:86)
> ==13424==    by 0x4F3AEDF: XrdCl::XRootDMsgHandler::HandleResponse() 
> (XrdClXRootDMsgHandler.cc:1008)
> ==13424==    by 0x4F38204: XrdCl::XRootDMsgHandler::Process(XrdCl::Message*) 
> (XrdClXRootDMsgHandler.cc:300)
> ==13424==    by 0x4F198D1: XrdCl::Stream::HandleIncMsgJob::Run(void*) 
> (XrdClStream.hh:279)
> ==13424==    by 0x4F6FFED: XrdCl::JobManager::RunJobs() 
> (XrdClJobManager.cc:148)
> ==13424==    by 0x4F6FB37: RunRunnerThread (XrdClJobManager.cc:33)
>
> Is there something that sticks out at you? Code attached.
>
> Thanks,
> -Daniel
>
>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

March 2018
February 2018
January 2018
December 2017
August 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use