[asterisk-dev] Debuging a channel driver

Moises Silva moises.silva at gmail.com
Mon Jun 8 09:10:29 CDT 2009


On Mon, Jun 8, 2009 at 7:44 AM, luciano
digivoice<lucianodigivoice at gmail.com> wrote:
> Hello everyone,
>
> I'm trying to debug my channel driver. I already enabled DEBUG_THREADS and
> DONT_OPTIMIZE Asterisk parameters, I have a thread and this one is
> genarating a core dump (I think), using gdb application I only can see this:
>
> Core was generated by `asterisk -cvvvg'.
> Program terminated with signal 11, Segmentation fault.
> #0  0xb7ec818a in strcmp () from /lib/libc.so.6
> (gdb) bt
> #0  0xb7ec818a in strcmp () from /lib/libc.so.6
> #1  0x080d288a in pbx_find_extension (chan=0x0, bypass=0x0, q=0xad551fa8,
> context=0x240 <Address 0x240 out of bounds>,
>     exten=0xad5522d8 "", priority=1, label=0x0, callerid=0x8297568 "",
> action=E_MATCHMORE) at pbx.c:979
> #2  0x080d5209 in pbx_extension_helper (c=0x0, con=0x0, context=0x240
> <Address 0x240 out of bounds>, exten=0xad5522d8 "", priority=1,
>     label=0x0, callerid=0x8297568 "", action=E_MATCHMORE) at pbx.c:1820
> #3  0x080d6803 in ast_matchmore_extension (c=0x0, context=0x240 <Address
> 0x240 out of bounds>, exten=0xad5522d8 "", priority=1,
>     callerid=0x8297568 "") at pbx.c:2315
> #4  0xb5706344 in ?? () from /usr/lib/asterisk/modules/chan_dgv.so
> #5  0x0811c655 in dummy_start (data=0x819ef40) at utils.c:856
> #6  0xb80341b5 in start_thread () from /lib/libpthread.so.0
> #7  0xb7f2638e in clone () from /lib/libc.so.6
> (gdb)
>
> But "#4  0xb5706344 in ?? () from /usr/lib/asterisk/modules/chan_dgv.so"
> don't help me to see the problem.
>
> What I need to enable or do to debug my threads.
>

Did you compile chan_dgv as part of Asterisk or separately? May be you
are not compiling with -g -O0 ?

It seems somewhere in chan_dgv ast_matchmore_extension is being called
with an invalid address as context.

-- 
Moises Silva
Software Developer
Sangoma Technologies Inc. | 50 McIntosh Drive, Suite 120, Markham ON
L3R 9T3 Canada
t. 1 905 474 1990 x 128 | e. moy at sangoma.com



More information about the asterisk-dev mailing list