[Asterisk-Dev] making progress; how to debug "() ??"

Brian West brian.west at mac.com
Wed Jun 1 11:03:01 MST 2005


If your module starts any threads on unload you'll need to cancel and  
join the thread back so you can do a clean up better.  Check out  
chan_zap does this on unload.  You'll do a pthread_cancel,  
pthread_kill then pthread_join.  I suspect this is what is going on.

/b
---
Keep Your Friends Close, But Your Enemies Even Closer...

On Jun 1, 2005, at 11:58 AM, Matthew Boehm wrote:

> Hey guys,
>  I'm making big headway in bringing an old SNMP patch up to current  
> CVS.
> Module loads at startup, connects with running snmpd and I can query
> asterisk with snmpwalk to see all sorts of stuff.
>
>  My problem right now is unloading the module from asterisk. If you  
> tell the
> module to unload, the CLI returns immediatly and asterisk core  
> dumps a few
> seconds later.
>
>  When I backtrace, I get this:
>
> #0  0x40baf957 in ?? ()
> #1  0x40b982b4 in ?? ()
> #2  0x400262b6 in start_thread () from /lib/tls/libpthread.so.0
>
> My module links with about 4 other shared objects that are not part of
> asterisk. I'm guessing that is why I see ?? () in the bt's?
>
> I tried reading up on how to load more symbols into gdb but I have  
> to know
> the memory address to load them into. How the heck am I suposed to  
> know
> that? Is there a better way? A correct way?
>
> I see that gdb loads some symbols from mysql and that isn't part of
> asterisk, but res_config_mysql is a module in asterisk. If my new  
> module is
> part of asterisk, how come gdb doesn't load its symbols too?
>
> Thanks,
> Matthew
>
> -- 
> ---------------------------------------------------------------------- 
> --
> Matthew Boehm, IT Director                    Cypress  
> Telecommunications
> mboehm at cytelcom.com                   3838 N. Sam Houston Parkway E  
> #400
> T: 832-200-8640 x3044                                  Houston, TX  
> 77032
>
> My girlfriend was recently diagnosed with multiple personality  
> disorder;
>  When she called yesterday, my CallerID box exploded.
> ---------------------------------------------------------------------- 
> --
>
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>




More information about the asterisk-dev mailing list