[Asterisk-Users] segmentation fault on asterisk startup

andrewg at felinemenace.org andrewg at felinemenace.org
Tue Jul 13 04:58:46 MST 2004


On Tue, Jul 13, 2004 at 01:24:18PM +0200, Andreas 'TheChaos' Groll wrote:
> andrewg at felinemenace.org wrote:
> 

> >Start off with running ulimit -c unlimited before you start asterisk. Once 
> >it crashes, type gdb /path/to/asterisk core 
> >
> >>From there, enter the following:
> >
> >bt
> >x/5i $eip 
> >info registers
> >info threads
> >
> >and quit out. After doing that, you might want to save the output of 
> >uname -a 
> >cat /proc/cpuinfo 
> >
> >and send it to the list.
> >

> vendor_id       : CyrixInstead
> model name      : 6x86MX 2.5x Core/Bus Clock
> cpu MHz         : 166.405
> flags           : fpu de tsc msr cx8 pge cmov mmx cyrix_arr
> bogomips        : 331.77

Is anyone else running asterisk with iLBC without problems on cyrix chips?
IIRC, they where meant to be a cheaper version, so initially it made me think 
that it might of been gcc emmitting a bad instruction for that cpu.

> of course I think you wanted the gdb output, I hope that's correct:

Looks good :)

> 
> (gdb) bt
> #0  0x3aeb0000 in ?? ()
> #1  0x405e2752 in iLBC_encode (bytes=0x810fda0 "? ??\017`\022\021?G\"\214",
>    block=0xbffff47c, iLBCenc_inst=0x810e868) at iLBC_encode.c:93
> #2  0x405e0eea in lintoilbc_frameout (tmp=0x810e868) at codec_ilbc.c:196
> #3  0x0805ca2f in calc_cost (t=0x405e9240) at translate.c:238
> #4  0x0805ce4a in ast_register_translator (t=0x405e9240) at translate.c:299
> #5  0x405e0fef in load_module () at codec_ilbc.c:263
> #6  0x080551ce in ast_load_resource (resource_name=0x80defdb 
> "codec_ilbc.so")
>    at loader.c:312
> #7  0x08055636 in load_modules () at loader.c:407
> #8  0x08084136 in main (argc=2, argv=0xbffffe04) at asterisk.c:1485
> (gdb) x/5i $eip
> 0x3aeb0000:     Cannot access memory at address 0x3aeb0000

Hmmm, looks like saved EIP got overwritten at some stage. I'm not familar with
the translation code, but it might be possible that its buffer was exceeded,
based upon seeing the iLBC_encode passed with a parameter on the stack. I 
don't have the code handy at the moment, after I grab it I'll have
a look over it and reply to this message.

> (gdb) info registers
> eax            0xbfffd924       -1073751772
> ecx            0xbfffd974       -1073751692
> edx            0x3      3
> ebx            0x4001e89c       1073866908
> esp            0xbfffd450       0xbfffd450
> ebp            0xbfffd99c       0xbfffd99c
> esi            0x4012819c       1074954652
> edi            0x40231a9d       1076042397
> eip            0x3aeb0000       0x3aeb0000
> eflags         0x10282  66178
> cs             0x23     35
> ss             0x2b     43
> ds             0x2b     43
> es             0x2b     43
> fs             0x2b     43
> gs             0x2b     43
> fctrl          0x37f    895
> fstat          0x122    290
> ftag           0xffff   65535
> fiseg          0x23     35
> fioff          0x405e4895       1079920789
> foseg          0x2b     43
> fooff          0xbfffd920       -1073751776
> fop            0x11c    284
> xmm0           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),
>    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
> xmm1           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),
>    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
> xmm2           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),
>    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
> xmm3           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),
>    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
> xmm4           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),
>    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
> xmm5           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),
>    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
> xmm6           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),
>    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
> xmm7           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),
>    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
> mxcsr          0x1f80   8064
> orig_eax       0xffffffff       -1
> (gdb) info threads
> * 1 process 8318  0x3aeb0000 in ?? ()
> 
> Perhaps it is important to mention, that I got the bad modules again 
> from a friend. His modules work within my asterisk with no errors.
> Very confusing for me. I still hope you can help.
> 
> Thanks





More information about the asterisk-users mailing list