FS 1.0.2 Crash and burn
I have a situation where FS aborts I'm running an lua script with mysql statements First time it runs, on hangup I get [CONSOLE] switch_core_memory.c:374 switch_core_memory_reclaim() Returning 4 recycled memory pool(s) If I run it again, FS exits. Should there be an error log somewhere that explains why FS dies? Regards,
Can you show us what you're doing? /b On Feb 11, 2009, at 1:15 PM, Nik Middleton wrote:
I have a situation where FS aborts
I’m running an lua script with mysql statements
First time it runs, on hangup I get
[CONSOLE] switch_core_memory.c:374 switch_core_memory_reclaim() Returning 4 recycled memory pool(s)
If I run it again, FS exits.
Should there be an error log somewhere that explains why FS dies?
Regards,
I was running in a screen session, so going back to the console it shows it's a seg fault 2009-02-11 19:27:53 [NOTICE] sofia.c:3090 sofia_handle_sip_i_state() Hangup sofia/internal/1001@192.168.3.206 [CS_EXECUTE] [NORMAL_CLEARING] Segmentation fault (core dumped) Seg fault occurs on hangup What seems to be causing the problem is an insert statement. Note I'm using the protected call function to trap on any sql error (script will abort on error otherwise) but even calling it unprotected, the result is the same. function updatecall() query = "INSERT INTO CONTACT phonenum, group values 0771111111111, " .. CALLER ; freeswitch.consoleLog("info", query.."\n"); res = assert (con:execute(query)); if unexpected_condition then error() end end if type == "dtmf" and obj['digit'] == '9' then CALL_STATUS = "ORDER"; pcall(updateDNC); session:streamFile("wait48.wav"); return "break"; end function myHangupHook(s, status, arg) freeswitch.consoleLog("info", " : They hung up on US!!!\n"); con:close() env:close() end ________________________________ From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Brian West Sent: 11 February 2009 19:18 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] FS 1.0.2 Crash and burn Can you show us what you're doing? /b On Feb 11, 2009, at 1:15 PM, Nik Middleton wrote: I have a situation where FS aborts I'm running an lua script with mysql statements First time it runs, on hangup I get [CONSOLE] switch_core_memory.c:374 switch_core_memory_reclaim() Returning 4 recycled memory pool(s) If I run it again, FS exits. Should there be an error log somewhere that explains why FS dies? Regards,
How about getting a backtrace of the core dump and opening a jira? http://wiki.freeswitch.org/wiki/Reporting_Bugs /b On Feb 11, 2009, at 1:35 PM, Nik Middleton wrote:
I was running in a screen session, so going back to the console it shows it’s a seg fault
2009-02-11 19:27:53 [NOTICE] sofia.c:3090 sofia_handle_sip_i_state() Hangup sofia/internal/1001@192.168.3.206 [CS_EXECUTE] [NORMAL_CLEARING] Segmentation fault (core dumped)
Seg fault occurs on hangup
What seems to be causing the problem is an insert statement.
Note I’m using the protected call function to trap on any sql error (script will abort on error otherwise) but even calling it unprotected, the result is the same.
function updatecall() query = "INSERT INTO CONTACT phonenum, group values 0771111111111, " .. CALLER ; freeswitch.consoleLog("info", query.."\n"); res = assert (con:execute(query)); if unexpected_condition then error() end
end
if type == "dtmf" and obj['digit'] == '9' then CALL_STATUS = "ORDER"; pcall(updateDNC); session:streamFile("wait48.wav"); return "break"; end
function myHangupHook(s, status, arg) freeswitch.consoleLog("info", " : They hung up on US!!! \n"); con:close() env:close()
end
Where is the core dump written? ________________________________ From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Brian West Sent: 11 February 2009 19:38 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] FS 1.0.2 Crash and burn How about getting a backtrace of the core dump and opening a jira? http://wiki.freeswitch.org/wiki/Reporting_Bugs /b On Feb 11, 2009, at 1:35 PM, Nik Middleton wrote: I was running in a screen session, so going back to the console it shows it's a seg fault 2009-02-11 19:27:53 [NOTICE] sofia.c:3090 sofia_handle_sip_i_state() Hangup sofia/internal/1001@192.168.3.206 [CS_EXECUTE] [NORMAL_CLEARING] Segmentation fault (core dumped) Seg fault occurs on hangup What seems to be causing the problem is an insert statement. Note I'm using the protected call function to trap on any sql error (script will abort on error otherwise) but even calling it unprotected, the result is the same. function updatecall() query = "INSERT INTO CONTACT phonenum, group values 0771111111111, " .. CALLER ; freeswitch.consoleLog("info", query.."\n"); res = assert (con:execute(query)); if unexpected_condition then error() end end if type == "dtmf" and obj['digit'] == '9' then CALL_STATUS = "ORDER"; pcall(updateDNC); session:streamFile("wait48.wav"); return "break"; end function myHangupHook(s, status, arg) freeswitch.consoleLog("info", " : They hung up on US!!!\n"); con:close() env:close() end
and make sure it's svn trunk or at least a daily snapshot and not 1.0.2 On Wed, Feb 11, 2009 at 2:23 PM, Brian West <brian@freeswitch.org> wrote:
Try starting it from your /usr/local/freeswitch/bin... ./freeswitch it'll dump in the same folder. /b
On Feb 11, 2009, at 2:20 PM, Nik Middleton wrote:
Where is the core dump written?
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
I've abandoned LUA. All sorts of problems (DTMF etc). Also reports of memory leaks when using MYSQL driver. Looking on the WIKI, JavaScript seems very well supported; PLUS DTMF works just fine (pulling my hair out on LUA) Guess I'm going to follow the path of least resistance on this one and use JS and ODBC Regards, ________________________________ From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Brian West Sent: 11 February 2009 20:23 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] FS 1.0.2 Crash and burn Try starting it from your /usr/local/freeswitch/bin... ./freeswitch it'll dump in the same folder. /b On Feb 11, 2009, at 2:20 PM, Nik Middleton wrote: Where is the core dump written?
Lua has known issues with MySQL you must use latest SVN builds of the luasql driver for that to avoid it.. and still its not stellar.. the unixODBC one on the other hand works fine. /b On Feb 11, 2009, at 5:36 PM, Nik Middleton wrote:
I’ve abandoned LUA.
All sorts of problems (DTMF etc). Also reports of memory leaks when using MYSQL driver.
Looking on the WIKI, JavaScript seems very well supported; PLUS DTMF works just fine (pulling my hair out on LUA)
Guess I’m going to follow the path of least resistance on this one and use JS and ODBC
Regards,
There is always C, it's actually considered a high level language by many ;) On Wed, Feb 11, 2009 at 5:50 PM, Brian West <brian@freeswitch.org> wrote:
Lua has known issues with MySQL you must use latest SVN builds of the luasql driver for that to avoid it.. and still its not stellar.. the unixODBC one on the other hand works fine. /b
On Feb 11, 2009, at 5:36 PM, Nik Middleton wrote:
I've abandoned LUA.
All sorts of problems (DTMF etc). Also reports of memory leaks when using MYSQL driver.
Looking on the WIKI, JavaScript seems very well supported; PLUS DTMF works just fine (pulling my hair out on LUA)
Guess I'm going to follow the path of least resistance on this one and use JS and ODBC
Regards,
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
<groan> Guess I'll have to dust off K&R. Having made the mindset leap to c++ I find C very procedural. Still would be like old times. Code I've looked at so far is very neat, but boy is there a lack of in-line comments. Haven't looked at the main source yet though. I always used to work on 3 lines of comments to 1 major line of code. Call me pedantic, but it aids maintenance. I've always thought of C as a low level language, just up from assembler, and nearly as efficient. An for me, low level is good not bad. Regards ________________________________ From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Anthony Minessale Sent: 12 February 2009 04:26 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] FS 1.0.2 Crash and burn There is always C, it's actually considered a high level language by many ;) On Wed, Feb 11, 2009 at 5:50 PM, Brian West <brian@freeswitch.org> wrote: Lua has known issues with MySQL you must use latest SVN builds of the luasql driver for that to avoid it.. and still its not stellar.. the unixODBC one on the other hand works fine. /b On Feb 11, 2009, at 5:36 PM, Nik Middleton wrote: I've abandoned LUA. All sorts of problems (DTMF etc). Also reports of memory leaks when using MYSQL driver. Looking on the WIKI, JavaScript seems very well supported; PLUS DTMF works just fine (pulling my hair out on LUA) Guess I'm going to follow the path of least resistance on this one and use JS and ODBC Regards, _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
modules can be c++ too. See mod_opal , mod_python, mod_java, mod_soundtouch, mod_managed and mod_perl all use switch_cpp.cpp a wrapper used to bridge into scripting langs. On Fri, Feb 13, 2009 at 5:04 PM, Nik Middleton < nik.middleton@noblesolutions.co.uk> wrote:
<groan> Guess I'll have to dust off K&R. Having made the mindset leap to c++ I find C very procedural. Still would be like old times. Code I've looked at so far is very neat, but boy is there a lack of in-line comments. Haven't looked at the main source yet though. I always used to work on 3 lines of comments to 1 major line of code. Call me pedantic, but it aids maintenance.
I've always thought of C as a low level language, just up from assembler, and nearly as efficient. An for me, low level is good not bad.
Regards
------------------------------
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Anthony Minessale *Sent:* 12 February 2009 04:26 *To:* freeswitch-users@lists.freeswitch.org *Subject:* Re: [Freeswitch-users] FS 1.0.2 Crash and burn
There is always C, it's actually considered a high level language by many ;)
On Wed, Feb 11, 2009 at 5:50 PM, Brian West <brian@freeswitch.org> wrote:
Lua has known issues with MySQL you must use latest SVN builds of the luasql driver for that to avoid it.. and still its not stellar.. the unixODBC one on the other hand works fine.
/b
On Feb 11, 2009, at 5:36 PM, Nik Middleton wrote:
I've abandoned LUA.
All sorts of problems (DTMF etc). Also reports of memory leaks when using MYSQL driver.
Looking on the WIKI, JavaScript seems very well supported; PLUS DTMF works just fine (pulling my hair out on LUA)
Guess I'm going to follow the path of least resistance on this one and use JS and ODBC
Regards,
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Nik Middleton <nik.middleton@noblesolutions.co.uk> wrote:
Code I've looked at so far is very neat, but boy is there a lack of in-line comments. Haven't looked at the main source yet though. I always used to work on 3 lines of comments to 1 major line of code. Call me pedantic, but it aids maintenance.
I find the FreeSWITCH code quite readable. Public API functions have comments, which are all that we need, I think.
That would assume that the underlying code is perfect, which it probably isn't. Not knocking the efforts, but in my view, you can't have too much in line documentation. I hope to make a contribution shortly. Right now I'm updating the WIKI where appropriate. Top level examples should work with a cut and paste, if they don't you're going to alienate new entrants. Regards -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Jason White Sent: 13 February 2009 23:24 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] FS 1.0.2 Crash and burn Nik Middleton <nik.middleton@noblesolutions.co.uk> wrote:
Code I've looked at so far is very neat, but boy is there a lack of in-line comments. Haven't looked at the main source yet though. I always used to work on 3 lines of comments to 1 major line of code. Call me pedantic, but it aids maintenance.
I find the FreeSWITCH code quite readable. Public API functions have comments, which are all that we need, I think. _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Right now I'm updating the WIKI where appropriate. Top level examples should work with a cut and paste, if they don't you're going to alienate new entrants.
This is a valid point. I will be happy to help with the wiki since documentation is kind of my bailiwick. My challenge is just being in a position to test everything. I have only so much equipment (and time) so it isn't always easy for me to set things up and do testing. But I will definitely do my best. -MC
Maybe you can start a new thread then. On Fri, Feb 13, 2009 at 6:08 PM, Michael Collins <msc@freeswitch.org> wrote:
Right now I'm updating the WIKI where appropriate. Top level examples should work with a cut and paste, if they don't you're going to alienate new entrants.
This is a valid point. I will be happy to help with the wiki since documentation is kind of my bailiwick. My challenge is just being in a position to test everything. I have only so much equipment (and time) so it isn't always easy for me to set things up and do testing. But I will definitely do my best.
-MC
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Forget my last, followed the link Regards, ________________________________ From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Brian West Sent: 11 February 2009 19:38 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] FS 1.0.2 Crash and burn How about getting a backtrace of the core dump and opening a jira? http://wiki.freeswitch.org/wiki/Reporting_Bugs /b On Feb 11, 2009, at 1:35 PM, Nik Middleton wrote: I was running in a screen session, so going back to the console it shows it's a seg fault 2009-02-11 19:27:53 [NOTICE] sofia.c:3090 sofia_handle_sip_i_state() Hangup sofia/internal/1001@192.168.3.206 [CS_EXECUTE] [NORMAL_CLEARING] Segmentation fault (core dumped) Seg fault occurs on hangup What seems to be causing the problem is an insert statement. Note I'm using the protected call function to trap on any sql error (script will abort on error otherwise) but even calling it unprotected, the result is the same. function updatecall() query = "INSERT INTO CONTACT phonenum, group values 0771111111111, " .. CALLER ; freeswitch.consoleLog("info", query.."\n"); res = assert (con:execute(query)); if unexpected_condition then error() end end if type == "dtmf" and obj['digit'] == '9' then CALL_STATUS = "ORDER"; pcall(updateDNC); session:streamFile("wait48.wav"); return "break"; end function myHangupHook(s, status, arg) freeswitch.consoleLog("info", " : They hung up on US!!!\n"); con:close() env:close() end
participants (5)
-
Anthony Minessale
-
Brian West
-
Jason White
-
Michael Collins
-
Nik Middleton