[Freeswitch-dev] FreeSWITCH on Windows crashing when doing deflect/REFER

Mathieu Rene mrene_lists at avgs.ca
Tue Apr 28 09:41:32 PDT 2009


Open up a Jira, thats where it belongs.

Math

On 28-Apr-09, at 12:32 PM, Peter Olsson wrote:

> I have a problem with FreeSWITCH (r13175) when using REFER. If  
> running inside Visual Studio, everytime (during the REFER) I get a  
> “...has triggered a breakpoint”. It’s possible to click continue to  
> go on, but eventually (another 2-3 calls) FreeSWITCH crasches  
> completely. When running outside Visual Studio I get a crasch after  
> maybe 10 calls.
>
> Another interesting scenario is when running outside the debugger  
> and I enable siptracing it’s much more stable – even though it  
> crasches eventually – this is what makes me wonder about mutexes...
>
> I’ve tracked it down to calls to malloc() and calloc() which in 100%  
> of the cases is in the top of the call stack.
>
> My thought is that it might be related to a mutex issue somewhere.  
> Below I’ve copied the call stack from two times it’s happened to me.  
> These are the most common traces, but sometimes it’s a malloc being  
> called from the sqlite lib. But so far I always think it’s been  
> related to a malloc/calloc.
>
> These things have occured in a couple of other places as well, for  
> instance when a SIP registration fails (registering to an external  
> server) with error 404 I also get a breakpoint triggered, but I  
> don’t think that has caused any crasches yet.
>
> I’ve tried to debug this on my own, but so far I didn’t find  
> anything, so that’s why I’m asking you guys :) I think I’m going to  
> try the same on Linux as well, and see if it works differently there.
>
> If you need more info, please let me know, I’ll try to help out as  
> much as possible. I thought I’d post this here first, if you have  
> any ideas. If not I’ll file a Jira for the issue.
>
> -----
>
>                              ntdll.dll!DbgBreakPoint()
>                              [Frames below may be incorrect and/or  
> missing, no symbols loaded for ntdll.dll]
>                              ntdll.dll!RtlpNtMakeTemporaryKey()  +  
> 0x3eee bytes
>                              ntdll.dll!RtlTimeToElapsedTimeFields()   
> + 0xd8c3 bytes
>                              ntdll.dll!RtlTryEnterCriticalSection()   
> + 0x66f bytes
>                              ntdll.dll!RtlpNtMakeTemporaryKey()  +  
> 0x4785 bytes
>                              ntdll.dll!RtlTimeToElapsedTimeFields()   
> + 0xd6f1 bytes
>                              ntdll.dll!RtlTryEnterCriticalSection()   
> + 0x66f bytes
> >                           msvcr90d.dll!_heap_alloc_base(unsigned  
> int size=41)  Line 105 + 0x28 bytes       C
>                              msvcr90d.dll! 
> _heap_alloc_dbg_impl(unsigned int nSize=5, int nBlockUse=1, const  
> char * szFileName=0x00000000, int nLine=0, int *  
> errno_tmp=0x0739f498)  Line 427 + 0x9 bytes      C++
>                              msvcr90d.dll! 
> _nh_malloc_dbg_impl(unsigned int nSize=5, int nhFlag=0, int  
> nBlockUse=1, const char * szFileName=0x00000000, int nLine=0, int *  
> errno_tmp=0x0739f498)  Line 239 + 0x19 bytes        C++
>                              msvcr90d.dll!_nh_malloc_dbg(unsigned  
> int nSize=5, int nhFlag=0, int nBlockUse=1, const char *  
> szFileName=0x00000000, int nLine=0)  Line 296 + 0x1d  
> bytes                        C++
>                              msvcr90d.dll!malloc(unsigned int  
> nSize=5)  Line 56 + 0x15 bytes C++
>                              FreeSwitch.dll!my_dup(const char *  
> s=0x035724c8)  Line 95 + 0xc bytes               C
>                              FreeSwitch.dll! 
> switch_event_add_header_string(switch_event * event=0x0370fe00,  
> switch_stack_t stack=SWITCH_STACK_BOTTOM, const char *  
> header_name=0x0739f50c, const char * data=0x035724c8)  Line 785 +  
> 0x9 bytes  C
>                              FreeSwitch.dll! 
> switch_channel_event_set_extended_data(switch_channel *  
> channel=0x05d86ab0, switch_event * event=0x0370fe00)  Line 1365  C
>                              FreeSwitch.dll! 
> switch_channel_event_set_data(switch_channel * channel=0x05d86ab0,  
> switch_event * event=0x0370fe00)  Line 1378  C
>                              FreeSwitch.dll! 
> switch_core_session_exec(switch_core_session * session=0x05d82538,  
> const switch_application_interface *  
> application_interface=0x0357c258, const char * arg=0x05d2b8b0)  Line  
> 1472      C
>                              FreeSwitch.dll! 
> switch_core_session_execute_application(switch_core_session *  
> session=0x05d82538, const char * app=0x05d2b8a8, const char *  
> arg=0x05d2b8b0)  Line 1392       C
>                              FreeSwitch.dll! 
> switch_core_standard_on_execute(switch_core_session *  
> session=0x05d82538)  Line 168 + 0x16  
> bytes                             C
>                              FreeSwitch.dll! 
> switch_core_session_run(switch_core_session * session=0x05d82538)   
> Line 490 + 0x204 bytes    C
>                              FreeSwitch.dll! 
> switch_core_session_thread(apr_thread_t * thread=0x05ca71f8, void *  
> obj=0x05d82538)  Line 1060                             C
>                              libapr.dll!dummy_worker(void *  
> opaque=0x05ca71f8)  Line 80   C
>                              msvcr90d.dll!_callthreadstartex()  Line  
> 348 + 0xf bytes                  C
>                              msvcr90d.dll!_threadstartex(void *  
> ptd=0x03574318)  Line 331 C
>                              kernel32.dll!BaseThreadInitThunk()  +  
> 0x12 bytes
>                              ntdll.dll! 
> RtlInitializeExceptionChain()  + 0x63 bytes
>                              ntdll.dll! 
> RtlInitializeExceptionChain()  + 0x36 bytes
>
> ----------------
>
>                              ntdll.dll!DbgBreakPoint()
>                              [Frames below may be incorrect and/or  
> missing, no symbols loaded for ntdll.dll]
>                              ntdll.dll!RtlpNtMakeTemporaryKey()  +  
> 0x3eee bytes
>                              ntdll.dll!RtlTimeToElapsedTimeFields()   
> + 0xd8c3 bytes
>                              ntdll.dll!RtlTryEnterCriticalSection()   
> + 0x66f bytes
>                              ntdll.dll!RtlpNtMakeTemporaryKey()  +  
> 0x4785 bytes
>                              ntdll.dll!RtlTimeToElapsedTimeFields()   
> + 0xd6f1 bytes
>                              ntdll.dll!RtlTryEnterCriticalSection()   
> + 0x66f bytes
> >                           msvcr90d.dll!_heap_alloc_base(unsigned  
> int size=544)  Line 105 + 0x28 bytes     C
>                              msvcr90d.dll! 
> _heap_alloc_dbg_impl(unsigned int nSize=508, int nBlockUse=1, const  
> char * szFileName=0x00000000, int nLine=0, int *  
> errno_tmp=0x042df664)  Line 427 + 0x9 bytes      C++
>                              msvcr90d.dll! 
> _nh_malloc_dbg_impl(unsigned int nSize=508, int nhFlag=0, int  
> nBlockUse=1, const char * szFileName=0x00000000, int nLine=0, int *  
> errno_tmp=0x042df664)  Line 239 + 0x19 bytes        C++
>                              msvcr90d.dll!_calloc_dbg_impl(unsigned  
> int nNum=1, unsigned int nSize=508, int nBlockUse=1, const char *  
> szFileName=0x00000000, int nLine=0, int * errno_tmp=0x042df664)   
> Line 593 + 0x20 bytes        C++
>                              msvcr90d.dll!_calloc_dbg(unsigned int  
> nNum=1, unsigned int nSize=508, int nBlockUse=1, const char *  
> szFileName=0x00000000, int nLine=0)  Line 644 + 0x1d bytes     C++
>                              msvcr90d.dll!calloc(unsigned int  
> nNum=1, unsigned int nSize=508)  Line 56 + 0x13 bytes               C 
> ++
>                              mod_sofia.dll!su_home_new(unsigned int  
> size=508)  Line 562 + 0xe bytes            C
>                              mod_sofia.dll!msg_create(const  
> msg_mclass_s * mc=0x036f89e8, int flags=2)  Line 61 + 0x12  
> bytes                         C
>                              mod_sofia.dll! 
> nta_msg_create(nta_agent_s * agent=0x037c5430, int flags=0)  Line  
> 3305 + 0x16 bytes                    C
>                              mod_sofia.dll! 
> nua_client_request_template(nua_client_request * cr=0x038c2568)   
> Line 613 + 0x11 bytes           C
>                              mod_sofia.dll! 
> nua_client_init_request0(nua_client_request * cr=0x038c2568)  Line  
> 493 + 0x9 bytes                      C
>                              mod_sofia.dll! 
> nua_client_init_request(nua_client_request * cr=0x038c2568)  Line  
> 441 + 0x9 bytes                        C
>                              mod_sofia.dll! 
> nua_client_create(nua_handle_s * nh=0x038607f0, int event=33, const  
> nua_client_methods_t * methods=0x03ca2268, const tagi_t * const  
> tags=0x00000000)  Line 199 + 0x9 bytes                       C
>                              mod_sofia.dll! 
> nua_session_usage_shutdown(nua_handle_s * nh=0x038607f0,  
> nua_dialog_state * ds=0x03860828, nua_dialog_usage * du=0x0386adc0)   
> Line 1622 + 0x12 bytes     C
>                              mod_sofia.dll! 
> nua_dialog_usage_shutdown(su_home_s * owner=0x038607f0,  
> nua_dialog_state * ds=0x03860828, nua_dialog_usage * du=0x0386adc0)   
> Line 610 + 0x19 bytes       C
>                              mod_sofia.dll! 
> nua_dialog_shutdown(su_home_s * owner=0x038607f0, nua_dialog_state *  
> ds=0x03860828)  Line 587 + 0x11 bytes         C
>                              mod_sofia.dll! 
> nua_stack_destroy_handle(nua_s * nua=0x037ca4a8, nua_handle_s *  
> nh=0x038607f0, const tagi_t * tags=0x03872944)  Line 918 + 0x10  
> bytes            C
>                              mod_sofia.dll!nua_stack_signal(nua_s *  
> nua=0x037ca4a8, su_msg_s * * msg=0x042df868, nua_ee_data *  
> ee=0x0387292c)  Line 641 + 0x11 bytes              C
>                              mod_sofia.dll! 
> su_base_port_execute_msgs(su_msg_s * queue=0x00000000)  Line 280 +  
> 0x2c bytes                      C
>                              mod_sofia.dll! 
> su_base_port_getmsgs(su_port_s * self=0x037cac68)  Line 202 + 0x9  
> bytes            C
>                              mod_sofia.dll! 
> su_base_port_run(su_port_s * self=0x037cac68)  Line 335 + 0x11  
> bytes                  C
>                              mod_sofia.dll!su_port_run(su_port_s *  
> self=0x037cac68)  Line 326 + 0x11 bytes                             C
>                              mod_sofia.dll!su_root_run(su_root_s *  
> self=0x037cf1c0)  Line 819 + 0xc bytes   C
>                              mod_sofia.dll! 
> su_pthread_port_clone_main(void * varg=0x03e3f96c)  Line 324 + 0x9  
> bytes         C
>                              pthreadVC2.dll!ptw32_threadStart(void *  
> vthreadParms=0x03771cb8)  Line 219 + 0x9 bytes        C
>                              msvcr90d.dll!_callthreadstartex()  Line  
> 348 + 0xf bytes                  C
>                              msvcr90d.dll!_threadstartex(void *  
> ptd=0x0378a3e8)  Line 331  C
>                              kernel32.dll!BaseThreadInitThunk()  +  
> 0x12 bytes
>                              ntdll.dll! 
> RtlInitializeExceptionChain()  + 0x63 bytes
>                              ntdll.dll! 
> RtlInitializeExceptionChain()  + 0x36 bytes
> _______________________________________________
> Freeswitch-dev mailing list
> Freeswitch-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20090428/6ebd2ef8/attachment-0001.html 


More information about the Freeswitch-dev mailing list