Can you confirm that the issue is not existing with pre-r1356 ?

Thx,
Raphael.

Kovács Bálint wrote:
Yes, I have core dumps:

#0  0xb78784db in PyObject_Malloc () from /usr/lib/libpython2.5.so.1.0
#1 0xb788b79f in PyType_GenericAlloc () from /usr/lib/libpython2.5.so.1.0 #2 0xb7966e9c in IvrSipRequest_new (type=0xb796f260, args=0xb722740c, kwds=0x0) at IvrSipRequest.cpp:43 #3 0xb7967119 in IvrSipRequest_FromPtr (req=0x8772668) at IvrSipRequest.cpp:236
#4  0xb795e226 in getPySipRequest (r...@0xabc1a094) at Ivr.cpp:759
#5 0xb795e295 in IvrDialog::onSipRequest (this=0xa841a008, r...@0xabc1a094) at Ivr.cpp:770 #6 0x080d9567 in AmSession::onSipEvent (this=0xa841a008, sip_ev=0xabc1a088) at AmSession.cpp:557 #7 0x080d9902 in AmSession::process (this=0xa841a008, ev=0xabc1a088) at AmSession.cpp:517 #8 0x080848ec in AmB2BSession::process (this=0xa841a008, event=0xabc1a088) at AmB2BSession.cpp:79 #9 0xb795b990 in IvrDialog::process (this=0xa841a008, event=0xabc1a088) at Ivr.cpp:799 #10 0x080a379b in AmEventQueue::processEvents (this=0xa841a048) at AmEventQueue.cpp:70
#11 0x080dd43a in AmSession::run (this=0xa841a008) at AmSession.cpp:339
#12 0x080efcb5 in AmThread::_start (_t=0xa841a008) at AmThread.cpp:70
#13 0xb7ee8240 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#14 0xb7d8d49e in clone () from /lib/tls/i686/cmov/libc.so.6


#0  0xb783d4db in PyObject_Malloc () from /usr/lib/libpython2.5.so.1.0
#1 0xb785079f in PyType_GenericAlloc () from /usr/lib/libpython2.5.so.1.0 #2 0xb792bcec in IvrSipRequest_newRef (type=0xb7934260, args=0xb6fada0c, kwds=0x0) at IvrSipRequest.cpp:72 #3 0xb792c079 in IvrSipRequest_BorrowedFromPtr (req=0xa8aad8c0) at IvrSipRequest.cpp:249 #4 0xb79297ff in IvrDialogBase_new (type=0x8269a34, args=0xb71ec42c, kwds=0x0) at IvrDialogBase.cpp:57 #5 0xb784fc24 in _PyObject_SlotCompare () from /usr/lib/libpython2.5.so.1.0
#6  0xb78399ea in PyCFunction_Call () from /usr/lib/libpython2.5.so.1.0
#7  0xb78042e7 in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#8  0xb7804551 in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#9 0xb78068e2 in PyObject_CallMethod () from /usr/lib/libpython2.5.so.1.0 #10 0xb7921eaa in IvrFactory::newDlg (this=0x814ff00, na...@0xb67ba130) at Ivr.cpp:350 #11 0xb79223d5 in IvrFactory::onInvite (this=0x814ff00, r...@0xb67ba0fc) at Ivr.cpp:582 #12 0x080d46ca in AmSessionContainer::createSession (this=0x8128a90, r...@0xb67ba0fc, session_params=0x0) at AmSessionContainer.cpp:360 #13 0x080d48ce in AmSessionContainer::startSessionUAS (this=0x8128a90, r...@0xb67ba0fc) at AmSessionContainer.cpp:256 #14 0x080e9b76 in AmSipDispatcher::handleSipMsg (this=0x81d80d0, r...@0xb67ba0fc) at AmSipDispatcher.cpp:90 #15 0xb7c36ba8 in SipCtrlInterface::handleSipMsg (this=0x826d728, r...@0xb67ba0fc) at SipCtrlInterface.cpp:465 #16 0xb7c3a42a in SipCtrlInterface::handle_sip_request (this=0x826d728, tid=0xa58f7bbc "064:A44DED20", msg=0xa91f7660) at SipCtrlInterface.cpp:557 #17 0xb7c4632a in trans_layer::received_msg (this=0x8272500, msg=0xa91f7660) at trans_layer.cpp:800
#18 0xb7c4a668 in udp_trsp::run (this=0x824e288) at udp_trsp.cpp:159
#19 0x080efcb5 in AmThread::_start (_t=0x824e288) at AmThread.cpp:70
#20 0xb7ead240 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#21 0xb7d5249e in clone () from /lib/tls/i686/cmov/libc.so.6


Thx for helping!

Balint




Raphael Coeffic wrote:
Kovács Bálint wrote:
Hello,

This IVR patch seems good for the memory leak, but I found a segmentation fault with a SIPp scenario. I wrote a simple IVR script, and run with 50 call/sec I got a segmentation fault after 59822 Call, 101424 Call, 47048 Call....


That somehow sounds like a race-condition while cleaning up the memory... This bug did probably not show up until now because we did not free that memory before.

Do you have some core dumps? It should be enough if you post the stack-trace as produced by GDB.

Thx for reporting!

-Raphael.


This is the scenario scheme:
----------------------------

INVITE ----------> 200 <---------- ACK ----------> BYE <---------- 200 ---------->
and the Python script:
----------------------

from log import *
from ivr import *

class IvrDialog(IvrDialogBase):
  announcement = None
  byeSent = False

  def onSipRequest(self, SipRequest):
     info("Sip request")

  def onSipReply(self, IvrSipReply):
     info("Sip reply")

     byeTerminatedCodes = (200, 408, 481)

if((IvrSipReply.code in byeTerminatedCodes) and (self.byeSent == True)):
        self.stopSession()

  def onSessionStart(self, hdrs):
     info("Running...")
     self.announcement = IvrAudioFile()
     self.announcement.open(config['announce'], ivr.AUDIO_READ, False)
     self.enqueue(self.announcement, None)
     self.setTimer(1, 3)

  def onTimer(self, timerId):
     if(timerId == 1):
        info("Timer")
        self.flush()

  def onDtmf(self, key, duration):
     info("DTMF")

  def onBye(self):
     info("Bye")
     self.stopSession()

  def onEmptyQueue(self):
     info("Empty queue")
     self.bye()
     self.byeSent = True
      def __del__(self):
     info("Del")




_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to