freeswitch icon indicating copy to clipboard operation
freeswitch copied to clipboard

crash in mod_python3 with freeswitch 1.10.7 on debian 11/bullseye

Open abma opened this issue 3 years ago • 2 comments

Describe the bug freeswitch "randomly" crashes

To Reproduce no clue atm.

backtrace from core file

backtrace2.log

abma avatar Jan 25 '22 11:01 abma

oh, as the dialplan is not this difficult, i guess i try with mod_python3 next

abma avatar Jan 25 '22 11:01 abma

similar crash in mod_python3.c:340 with

1.10.7~release~19~883d2cb662~bullseye-1~bullseye+1

on debian 11:

backtrace.txt

abma avatar Apr 13 '22 16:04 abma

this python code made it crash

def hangup_hook(session, what, args=''):
       if what != "transfer":
               logerr("hangup hook for '%s' %s" % (what, session.cause()))
               return
       rawnr = session.getVariable("destination_number")
       caller = session.getVariable("caller_id_number")

removing the logerr line fixed the crash: it seems accessing "session" when what != "transfer" makes freeswitch crash!

to fix i guess freeswitch should set session=None when its not a transfer.

abma avatar Dec 05 '22 10:12 abma