< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate-users] dummy ClientPagerMessage - memory leak ???


Wait, you're using ClientPagerMessage to _receive_ the initial MESSAGE in the session? This is what ServerPagerMessage is for. You want to implement ServerPagerMessageHandler for this. ClientPagerMessageHandler is for sending the initial MESSAGE, not receiving it.

Best regards,
Byron Campen

I tested my theory by sending one SIP MESSAGE through the ClientPagerMessage and then end it. In that case, I don’t see any errors from Valgrind…
 
Thanks,
Vasanthi
 

From: Vasanthi Ramasamy 
Sent: Thursday, May 28, 2009 3:06 PM
To: 'resiprocate-users@xxxxxxxxxxxxxxx'
Subject: dummy ClientPagerMessage - memory leak ???
 
Hi,
 
What will happen if I create a ClientPagerMessage and end it without using it ? I see a huge memory leak….
 
Here is the scenario:
 
  1. I create a ClientPagerMessage to receive SIP MESSAGE from the remote end. SIP MESSAGe is for a SIP session established in an another machine and SIP MESSAGE comes to my application. I have a customized ClientPagerMessage where I just make sure that it gets created with the callid, From, To, FromTag, ToTag etc. are the same as the actual SIP session established in the other machine. Not much of coding from my side, I have written my own BaseCreator::makeInitialRequest(const NameAddr& target, const NameAddr& from, MethodTypes method) where I use my values. Everything else remains exactly the SAME.
 
  1. I get a SIP MESSAGE from remote end through ServerPagerMessage and it gets destructed properly.
 
  1. Once the call ends, other machine notifies me and I destruct ClientPagerMessage. It gets destructed too without any warning or exceptions. But Valgrind shows huge memory leak here.
 
==11665== 1,020 bytes in 3 blocks are still reachable in loss record 716 of 744
==11665==    at 0x4004790: operator new(unsigned) (vg_replace_malloc.c:164)
==11665==    by 0x824BFB9: resip::DialogUsageManager::makeUacDialogSet(resip::BaseCreator*, resip::AppDialogSet*) (in /opt/vapp/bin/msgserver_May28_leak2)
==11665==    by 0x824C4D6: resip::DialogUsageManager::makeCtxasgPagerMessage(resip::SharedPtr<resip::UserProfile> const&, resip::CtxasgSipMsgOutInfo*, resip::AppDialogSet*) (in /opt/vapp/bin/msgserver_May28_leak2)
==11665==    by 0x824C8DA: resip::DialogUsageManager::makeCtxasgPagerMessage(resip::CtxasgSipMsgOutInfo*, resip::AppDialogSet*) (in /opt/vapp/bin/msgserver_May28_leak2)
==11665==    by 0x80FEA63: pp::ResipDialogHandler::sendOutOfDialogMessage(int, std::string) (ResipDialogHandler.cxx:3206)
==11665==    by 0x8104A1A: pp::ResipDialogHandler::OnNotificationMessage(msg::msppNotificationMessage*) (ResipDialogHandler.cxx:3457)
==11665==    by 0x8105151: pp::ResipDialogHandler::processAppCommand(comm::Message*) (ResipDialogHandler.cxx:3553)
==11665==    by 0x80B59A5: pp::AppCommand::executeCommand() (ResipAppCommands.cxx:18)
==11665==    by 0x82576E7: resip::DialogUsageManager::internalProcess(std::auto_ptr<resip::Message>) (in /opt/vapp/bin/msgserver_May28_leak2)
==11665==    by 0x825787A: resip::DialogUsageManager::process(int, resip::RWMutex*) (in /opt/vapp/bin/msgserver_May28_leak2)
==11665==    by 0x80A774E: pp::UserAgent::DialogDumThreadProc() (UserAgent.cxx:214)
==11665==    by 0x80AA757: pm::PocketThread<pp::UserAgent>::main() (PocketThread.hxx:34)
 
Looks like nothing is getting released in ClientPagerMessage….ClientPagerMessage was created only for the purpose of receiving SIP MESSAGE from the other side. If the dialogset is not existing, Resiprocate doesn’t accept SIP MESSAGE from remote end since it is an in-dialog SIP MESSAGE coming from the remote end…So by creating a ClientPagerMessage, I’m making sure that Resiprocate accepts SIP MESSAGE from remote end.
 
Thanks,
Vasanthi
 
 
 
_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/

Attachment: smime.p7s
Description: S/MIME cryptographic signature