Re: [Freeswitch-dev] Core on module reload

2010-07-02 Thread Anthony Minessale
if you own the pool you would destroy it.


2010/7/2 Juan Antonio Ibañez Santorum 

> I'm using the module pool. If I use a own pool, destroying the pool will
> destroy mutex/hash or may I destroy them manually?
>
> Regards
>
> 2010/7/2 Anthony Minessale 
>
> If you did it from the pool passed to you in the module init its safe if
>> you made your own pool it must be destroyed.  Like I said, everything you do
>> in the init that has an undo must be called, including 3rd party libs you
>> may be using. You are unloading the module from memory so nothing can
>> linger.
>>
>> On Jul 2, 2010 3:58 AM, "Juan Antonio Ibañez Santorum" <
>> [email protected]> wrote:
>>
>> I'll try to find any allocated memory not being freed.
>>
>> I can see some modules use switch_mutex_init but no switch_mutex_destroy.
>> I thought that they were allocated from pool not being necessary to free
>> manually. Must I use switch_mutex_destroy when unloading? What about
>> switch_core_hash_init and switch_core_hash_destroy for hash items?
>>
>> Regards
>>
>> 2010/7/1 Anthony Minessale 
>>
>>
>> >
>> > everything that you allocated or reserved from FS must be given back and
>> unreserved when you un...
>>
>>
>> ___
>> FreeSWITCH-dev mailing list
>> [email protected]
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>> http://www.freeswitch.org
>>
>>
>> ___
>> FreeSWITCH-dev mailing list
>> [email protected]
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>> http://www.freeswitch.org
>>
>>
>
> ___
> FreeSWITCH-dev mailing list
> [email protected]
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>


-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:[email protected] 
GTALK/JABBER/PAYPAL:[email protected]
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:[email protected] 
googletalk:[email protected]
pstn:+19193869900
___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org


Re: [Freeswitch-dev] Core on module reload

2010-07-02 Thread Juan Antonio Ibañez Santorum
I'm using the module pool. If I use a own pool, destroying the pool will
destroy mutex/hash or may I destroy them manually?

Regards

2010/7/2 Anthony Minessale 

> If you did it from the pool passed to you in the module init its safe if
> you made your own pool it must be destroyed.  Like I said, everything you do
> in the init that has an undo must be called, including 3rd party libs you
> may be using. You are unloading the module from memory so nothing can
> linger.
>
> On Jul 2, 2010 3:58 AM, "Juan Antonio Ibañez Santorum" <
> [email protected]> wrote:
>
> I'll try to find any allocated memory not being freed.
>
> I can see some modules use switch_mutex_init but no switch_mutex_destroy. I
> thought that they were allocated from pool not being necessary to free
> manually. Must I use switch_mutex_destroy when unloading? What about
> switch_core_hash_init and switch_core_hash_destroy for hash items?
>
> Regards
>
> 2010/7/1 Anthony Minessale 
>
>
> >
> > everything that you allocated or reserved from FS must be given back and
> unreserved when you un...
>
>
> ___
> FreeSWITCH-dev mailing list
> [email protected]
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>
> ___
> FreeSWITCH-dev mailing list
> [email protected]
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>
___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org


Re: [Freeswitch-dev] Core on module reload

2010-07-02 Thread Anthony Minessale
If you did it from the pool passed to you in the module init its safe if you
made your own pool it must be destroyed.  Like I said, everything you do in
the init that has an undo must be called, including 3rd party libs you may
be using. You are unloading the module from memory so nothing can linger.

On Jul 2, 2010 3:58 AM, "Juan Antonio Ibañez Santorum" <
[email protected]> wrote:

I'll try to find any allocated memory not being freed.

I can see some modules use switch_mutex_init but no switch_mutex_destroy. I
thought that they were allocated from pool not being necessary to free
manually. Must I use switch_mutex_destroy when unloading? What about
switch_core_hash_init and switch_core_hash_destroy for hash items?

Regards

2010/7/1 Anthony Minessale 


>
> everything that you allocated or reserved from FS must be given back and
unreserved when you un...


___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org


Re: [Freeswitch-dev] Core on module reload

2010-07-02 Thread Juan Antonio Ibañez Santorum
I'll try to find any allocated memory not being freed.

I can see some modules use switch_mutex_init but no switch_mutex_destroy. I
thought that they were allocated from pool not being necessary to free
manually. Must I use switch_mutex_destroy when unloading? What about
switch_core_hash_init and switch_core_hash_destroy for hash items?

Regards

2010/7/1 Anthony Minessale 

> everything that you allocated or reserved from FS must be given back and
> unreserved when you unload or it will create invalid pointers in memory.
>
>
> 2010/7/1 Juan Antonio Ibañez Santorum 
>
>> Hello!
>>
>>I've made one module with one api function and one app function. I
>> added one extension to call my app. I only print a console message whitin
>> the app function. If I unload the module, make one change on the code,
>> compile, install an reaload the module, when calling the extension which
>> exec the app I get a core. I can see with gdb:
>>
>> --
>> #0  0x00b20010 in switch_core_session_run (session=0x87be678)
>> at src/switch_core_state_machine.c:338
>> 338 STATE_MACRO(init, "INIT");
>> (gdb) bt full
>> #0  0x00b20010 in switch_core_session_run (session=0x87be678)
>> at src/switch_core_state_machine.c:338
>> index = 2
>> global_proceed = 1
>> state = 
>> endstate = 12771850
>> endpoint_interface = 
>> driver_state_handler = 0x65a660
>> application_state_handler = 0x3910e0
>> new_loops = 59994
>> __PRETTY_FUNCTION__ = "switch_core_session_run"
>> __func__ = "switch_core_session_run"
>> #1  0x00b1ac16 in switch_core_session_thread (thread=0x873a250,
>> obj=0x87be678)
>> at src/switch_core_session.c:1162
>> session = 0x87be678
>> event = 
>> event_str = 0x0
>> val = 0x0
>> __func__ = "switch_core_session_thread"
>> __PRETTY_FUNCTION__ = "switch_core_session_thread"
>> #2  0x00ba2456 in dummy_worker (opaque=0x873a250)
>> at threadproc/unix/thread.c:138
>> No locales.
>> ---Type  to continue, or q  to quit---
>> #3  0x0011596e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
>> No symbol table info available.
>> #4  0x001f6a0e in clone () from /lib/tls/i686/cmov/libc.so.6
>> No symbol table info available.
>>
>> --
>>
>> But I don't see which could be the problem. Any idea?
>>
>> Regards
>>
>> ___
>> FreeSWITCH-dev mailing list
>> [email protected]
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>> http://www.freeswitch.org
>>
>>
>
>
> --
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> Twitter: http://twitter.com/FreeSWITCH_wire
>
> AIM: anthm
> MSN:[email protected] 
> GTALK/JABBER/PAYPAL:[email protected]
> IRC: irc.freenode.net #freeswitch
>
> FreeSWITCH Developer Conference
> sip:[email protected] 
> googletalk:[email protected]
> pstn:+19193869900
>
> ___
> FreeSWITCH-dev mailing list
> [email protected]
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>
___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org


Re: [Freeswitch-dev] Core on module reload

2010-07-01 Thread Anthony Minessale
everything that you allocated or reserved from FS must be given back and
unreserved when you unload or it will create invalid pointers in memory.


2010/7/1 Juan Antonio Ibañez Santorum 

> Hello!
>
>I've made one module with one api function and one app function. I added
> one extension to call my app. I only print a console message whitin the app
> function. If I unload the module, make one change on the code, compile,
> install an reaload the module, when calling the extension which exec the app
> I get a core. I can see with gdb:
>
> --
> #0  0x00b20010 in switch_core_session_run (session=0x87be678)
> at src/switch_core_state_machine.c:338
> 338 STATE_MACRO(init, "INIT");
> (gdb) bt full
> #0  0x00b20010 in switch_core_session_run (session=0x87be678)
> at src/switch_core_state_machine.c:338
> index = 2
> global_proceed = 1
> state = 
> endstate = 12771850
> endpoint_interface = 
> driver_state_handler = 0x65a660
> application_state_handler = 0x3910e0
> new_loops = 59994
> __PRETTY_FUNCTION__ = "switch_core_session_run"
> __func__ = "switch_core_session_run"
> #1  0x00b1ac16 in switch_core_session_thread (thread=0x873a250,
> obj=0x87be678)
> at src/switch_core_session.c:1162
> session = 0x87be678
> event = 
> event_str = 0x0
> val = 0x0
> __func__ = "switch_core_session_thread"
> __PRETTY_FUNCTION__ = "switch_core_session_thread"
> #2  0x00ba2456 in dummy_worker (opaque=0x873a250)
> at threadproc/unix/thread.c:138
> No locales.
> ---Type  to continue, or q  to quit---
> #3  0x0011596e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
> No symbol table info available.
> #4  0x001f6a0e in clone () from /lib/tls/i686/cmov/libc.so.6
> No symbol table info available.
>
> --
>
> But I don't see which could be the problem. Any idea?
>
> Regards
>
> ___
> FreeSWITCH-dev mailing list
> [email protected]
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>


-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:[email protected] 
GTALK/JABBER/PAYPAL:[email protected]
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:[email protected] 
googletalk:[email protected]
pstn:+19193869900
___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org


Re: [Freeswitch-dev] Core on module reload

2010-07-01 Thread Brian West
What are you doing in your app and api?  And what does your log look like?

/b

On Jul 1, 2010, at 6:57 AM, Juan Antonio Ibañez Santorum wrote:

> 
>I've made one module with one api function and one app function. I added 
> one extension to call my app. I only print a console message whitin the app 
> function. If I unload the module, make one change on the code, compile, 
> install an reaload the module, when calling the extension which exec the app 
> I get a core. I can see with gdb:


___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org