i noticed crashes in ivr apps and in dsm apps using mod py. i then tried with the very simple ivr app apps/examples/ivr_examples/play.py and it makes sems crash when i call it a few times in a row with this kind of sipp call:
sipp -sf sems_ivr.sipp -i 192.98.102.10 -p 5062 -rate_scale 1 -r 1 -m X -s jh 192.98.102.10 this script makes calls to play.py initially once per second X times. the calls last for three seconds after which sipp script sends bye and play.py terminates execution. the crash appears sometimes after less than 10 calls, but some times more calls need to be made or call rate needs to be increased to two calls per second. the crash always happens at this line of Ivr.cpp: retval = PyObject_Call(func, args, NULL); where function is "onSessionStart" (bt is below). based on some searching people say that this kind of crash is usually related to a reference count issue or something like that. the bottom line is that sems (at least the open source version) is not currently usable, if python code is involved. unfortunately, native dsm functions do not support enough features to allow writing of most apps without python. any pointers on how to solve this problem? -- juha (gdb) where #0 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at ../Python/ceval.c:4033 #1 PyEval_EvalFrameEx (f=0x7fbaf2526490, throwflag=-230022080) at ../Python/ceval.c:2679 #2 0x00007fbb017a327d in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=<optimized out>, func=<optimized out>) at ../Python/ceval.c:4119 #3 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at ../Python/ceval.c:4054 #4 PyEval_EvalFrameEx (f=0x7fbac808d3f0, throwflag=-201553248) at ../Python/ceval.c:2679 #5 0x00007fbb017a327d in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=<optimized out>, func=<optimized out>) at ../Python/ceval.c:4119 #6 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at ../Python/ceval.c:4054 #7 PyEval_EvalFrameEx (f=0x7fbac808d3f0, throwflag=-201553488) at ../Python/ceval.c:2679 #8 0x00007fbb01816190 in PyEval_EvalCodeEx (co=0x7fbafa185db0, globals=0x0, locals=0x7fbaf24ab3d8, locals@entry=0x0, args=0x7fbafa19a3a8, argcount=-1, kws=0x7fbb01ba4878 <method_cache+23160>, kws@entry=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3265 #9 0x00007fbb0176532c in function_call.lto_priv.328 (func=0x7fbaf3fc8668, arg=0x7fbafa19a390, kw=0x0) at ../Objects/funcobject.c:526 #10 0x00007fbb0176dbe3 in PyObject_Call (func=0x7fbaf3fc8668, arg=<optimized out>, kw=<optimized out>) at ../Objects/abstract.c:2529 #11 0x00007fbb017b00e5 in instancemethod_call.lto_priv.243 (func=0x7fbaf25264a8, arg=0x7fbb0648c050, kw=0x0) at ../Objects/classobject.c:2602 #12 0x00007fbb0176dbe3 in PyObject_Call (func=0x7fbb00028cd0, arg=<optimized out>, kw=<optimized out>) at ../Objects/abstract.c:2529 #13 0x00007fbb01bc51e3 in PyObject_VaCallMethod(PyObject *, char *, char *, typedef __va_list_tag __va_list_tag *) ( o=0x7fbaf25264a8, name=0x7fbb01bd0e1b "onSessionStart", format=0x7fbb0648c050 "H\023", va=0x7fbaf264e2e8) at Ivr.cpp:642 #14 0x00007fbb01bc6e55 in IvrDialog::callPyEventHandler (this=this@entry=0x7fbacc0488a0, name=name@entry=0x7fbb01bd0e1b "onSessionStart", fmt=fmt@entry=0x0) at Ivr.cpp:658 #15 0x00007fbb01bc6f34 in IvrDialog::onSessionStart (this=0x7fbacc0488a0) at Ivr.cpp:683 ---Type <return> to continue, or q <return> to quit--- #16 0x00000000004c4cb1 in AmSipDialog::onSdpCompleted (this=0x7fbacc068f50) at AmSipDialog.cpp:172 #17 0x00000000004a1b1c in AmOfferAnswer::onReplySent (this=0x7fbacc0692d0, reply=...) at AmOfferAnswer.cpp:453 #18 0x00000000004c0757 in AmSipDialog::onReplyTxed (this=0x7fbacc068f50, req=..., reply=...) at AmSipDialog.cpp:317 #19 0x0000000000510514 in AmBasicSipDialog::reply (this=0x7fbacc068f50, req=..., code=code@entry=200, reason="OK", body=body@entry=0x0, hdrs="", flags=0) at AmBasicSipDialog.cpp:639 #20 0x000000000049347b in AmSession::onInvite (this=0x7fbacc0488a0, req=...) at AmSession.cpp:809 #21 0x0000000000496f10 in AmSession::onSipRequest (this=this@entry=0x7fbacc0488a0, req=...) at AmSession.cpp:701 #22 0x0000000000520b6f in AmB2BSession::onSipRequest (this=0x7fbacc0488a0, req=...) at AmB2BSession.cpp:341 #23 0x000000000051160e in AmBasicSipDialog::onRxRequest (this=0x7fbacc068f50, req=...) at AmBasicSipDialog.cpp:362 #24 0x0000000000492612 in AmSession::process (this=0x7fbacc0488a0, ev=0x7fbacc069790) at AmSession.cpp:651 #25 0x00007fbb01bc71a9 in IvrDialog::process (this=0x7fbacc0488a0, event=0x7fbacc069790) at Ivr.cpp:789 #26 0x00000000004b342c in AmEventQueue::processEvents (this=0x7fbacc048910) at AmEventQueue.cpp:86 #27 0x000000000049575b in AmSession::processEventsCatchExceptions (this=<optimized out>) at AmSession.cpp:320 #28 0x0000000000494e99 in AmSession::processingCycle (this=0x7fbacc0488a0) at AmSession.cpp:351 #29 0x00000000004917d1 in AmSession::run (this=0x7fbacc0488a0) at AmSession.cpp:267 #30 0x00000000004af455 in AmThread::_start (_t=0x7fbacc0488a0) at AmThread.cpp:75 #31 0x00007fbb05cf50a4 in start_thread (arg=0x7fbaf265b700) at pthread_create.c:309 #32 0x00007fbb04bdf04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 _______________________________________________ Semsdev mailing list Semsdev@lists.iptel.org http://lists.iptel.org/mailman/listinfo/semsdev