[Freeswitch-users] mod_python sqlalchemy core dumps

. joes.mailing.lists at gmail.com
Wed Nov 12 03:05:58 PST 2008


Hi,
 It seems (still need to run a few more tests to be sure) you have
completely solved my problem.  This had been driving me nuts for the
last several days, and I can't tell you how helpful this simple
suggestion was!
>I've used Django/psycopg + mod_python successfully in production and it
>never crashes.  (never tried sqlalchemy).
>One thing you could try is to remove the hangup hook.  That has been
>problematic in the past and not well tested AFAIK.  I doubt that's the
>problem but you never know.
After I removed the hangup hook all of my problems disappeared.

Maybe it's worth adding something to the freeswitch mod_python wiki
page about this?  I still don't know exactly why this causes a core
dump, and it seems to work ok, as long as there is nothing else
interacting with it (e.g. sqlalchemy), but it probably would have
taken me quite a while longer to get to this on my own, given the
prominent placing of the hangup_hook in most of the examples on the
wiki.

>Also please load the core dump in gdb and post a backtrace.. maybe that will
>reveal something interesting.  (or maybe it won't).  Actually you might want
>to put it in a jira bug in case it becomes an involved debugging process.
I did this as well, after recompiling freeswitch with
# export CFLAGS="-g -ggdb"
# export MOD_CFLAGS="-g -ggdb"
as suggested in the wiki, however the results didnt seem very helpful:
(gdb) core core.4051
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
Core was generated by `/usr/local/freeswitch/bin/freeswitch'.
Program terminated with signal 11, Segmentation fault.
#0  0x00e140df in ?? ()


>> I've spent hours hunting through related lists: mod_python (for
>> apache), sqlalchemy, etc. but all to no avail.  Any suggestions or
>> alternatives ( I've also started looking into outbound event socket,
>> but there still seems to be few people using this with python/twisted
>> ) will be greatly appreciated.
>Yeah an outbound event socket framework in python would be really cool.
>deally you could write a script in the same style as mod_python scripts,
>and the framework behind it would handle all the communication with the
>switch.  Kamealia might be a bettter networking library than Twisted for
>this one.
I still think this could be very nice, and useful.  I'm not familiar
with kamealia at all.  if you don't mind, could you elaborate on why
you think it would be preferable to twisted in this case?

Thanks again!




More information about the FreeSWITCH-users mailing list