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

RE: [reSIProcate] Memory leak problem...


Thanks Scott.
Actually, I had checked that e-mail before my question
and it seems to me that I am calling process() method
and memory stays at that level even for hours after
all sessions are terminated. Additionally, the stack
log indicates the transaction states are deleted.

I have attached the code segment which is run by a
thread for collecting sip messages from the stack. Can
this cause that behaviour?

Cheers,
Gur


************************
   int foo()
    {
        int err;
        
        SipMessage* received;                           
        FdSet fdset;
        
        while (TRUE) {
        
          sipse_->sipStack->buildFdSet(fdset);
          err =
fdset.selectMilliSeconds(sipse_->sipStack->getTimeTillNextProcessMS());

          sipse_->sipStack->process(fdset);     

          //assert (err != -1);
          if (err  != -1){
                  //LOG_WRITE(LOG_DEBUG,"getting message from
stack...");

                  received = (sipse_->sipStack->receive());
                        
                  if (received != NULL)
                  {
                        
                        SipseQueueMessage sipseQueueMessage; 
                                        
                        sipseQueueMessage.isSipMessage = true;
                        sipseQueueMessage.isMfMessage = false;
                        sipseQueueMessage.queuedSipMessage = received;
                        
                        //cerr << "Sending message to remote task
-consumer-" ;
                        LOG_WRITE(LOG_DEBUG, "Sending message to remote
task -consumer-");
                        
                        queueWrite (
consumer_->internalQueue , HIGH_MESSAGE_PRIORITY , (
UINT8 * ) &sipseQueueMessage , sizeof
(SipseQueueMessage) );
                        LOG_WRITE ( LOG_DEBUG , "Message  put to consumer
queue from Sip stack!!");
                                        
                  }  else { 
                      // LOG_WRITE(LOG_ERROR, "REC. MESSAGE IS
NULL.");
                  }
          } else {
                // LOG_WRITE(LOG_ERROR, "ERR = %d", err);               
          }
        }
     }




--- Scott Godin <slgodin@xxxxxxxxxxxx> wrote:
> Try reading the following, it is most likely the
> same issue:
> 
>
http://list.sipfoundry.org/archive/resiprocate-devel/msg02029.html
> 
> 
> 
> -----Original Message-----
> From: Gur [mailto:gurgurk@xxxxxxxxx] 
> Sent: Sunday, April 10, 2005 11:45 AM
> To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [reSIProcate] Memory leak problem...
> 
> Hi, 
> I am trying to develop a prototype SIP-based
> application using resiprocate. For processing SIP
> messages, I simply use the Helper::makeResponse()
> method for creating responses and then stack->send()
> to send them. Then I delete both the received
> request
> and made-up response in TU space.
> 
> I have tested the application using the SIPp test
> suite following the scenario below:
> 
> SIPp                      Application
> INVITE ---------------->
>        <----------------    180   
>        <----------------    200 
> ACK    ---------------->
> (wait for 500 ms.)
> BYE    ---------------->
>        <----------------    200
> 
> For about 80,000 sessions, the memory shoots up
> about
> 700 MBytes on a Solaris9 platform. I have used
> Purify
> for diagnosis and the leak seems to happen for each
> OK
> response copy-constructed into the stack for INVITE
> messsages. The transactions in the stack seem to be
> properly handled in the log (or am i wrong? :) The
> TU
> space (application) is apparently clean.
> 
> I doubt I use the stack in a fundamentally wrong
> way.
> Does anyone have any ideas?
> 
> Cheers,
> Gur 
> 
> PS.I have attached the stack log in debug mode. 
> 
> 
> 
> 
>               
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/
> 




                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/