Unable to start safe_asterisk (Asterisk exited on signal 4)

This was done by attaching to a running copy, rather than from a core dump, so it was actually interrupted in a libc routine, rather than Asterisk itself.

You would need to page through the disassembly until, in this case, you reached 0x4017b51a.

Note that you are likely to have problems because you don’t have the debug symbols. You did seem to have them for you first backtrace attempt. You will definitely need them if you end up submitting an official bug report.

[quote]Reading symbols from /usr/lib/asterisk/modules/codec_zap.so…done.
Loaded symbols for /usr/lib/asterisk/modules/codec_zap.so
0x4017b51a in poll () from /lib/libc.so.6
(gdb) bt
#0 0x4017b51a in poll () from /lib/libc.so.6
#1 0x080ab2c0 in ast_io_wait (ioc=0x81a8038, howlong=1000) at io.c:266
#2 0x4062e52e in do_monitor (data=0x0) at chan_skinny.c:4629
#3 0x080fb82f in dummy_start (data=0x81a8190) at utils.c:867
#4 0x40032f5b in pthread_start_thread () from /lib/libpthread.so.0
#5 0x40184bea in clone () from /lib/libc.so.6
(gdb) disassemble
Dump of assembler code for function poll:
0x4017b4b0 <poll+0>: push %ebp
0x4017b4b1 <poll+1>: mov %esp,%ebp
0x4017b4b3 <poll+3>: sub $0xc,%esp
0x4017b4b6 <poll+6>: mov %ebx,(%esp)
0x4017b4b9 <poll+9>: call 0x400d110f <__i686.get_pc_thunk.bx>
0x4017b4be <poll+14>: add $0x6ab32,%ebx
0x4017b4c4 <poll+20>: mov %edi,0x8(%esp)
0x4017b4c8 <poll+24>: mov 0x2a38(%ebx),%eax
0x4017b4ce <poll+30>: mov 0x8(%ebp),%edi
0x4017b4d1 <poll+33>: mov %esi,0x4(%esp)
0x4017b4d5 <poll+37>: test %eax,%eax
[/quote]

Once you have the failing instruction, assuming gdb recognizes it, you will need to research which Intel instruction subset it belongs to.

Here is some new information which, most likely, is not what you need me to produce but I’ll post it anyway.

[code][root@sip backtrace]# gdb --args /usr/sbin/asterisk -f
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-56.el6)
Copyright © 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and “show warranty” for details.
This GDB was configured as “x86_64-redhat-linux-gnu”.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/
Reading symbols from /usr/sbin/asterisk…done.
(gdb) run
Starting program: /usr/sbin/asterisk -f
[Thread debugging using libthread_db enabled]

Program received signal SIGILL, Illegal instruction.
0x000000000044230f in ast_readconfig () at asterisk.c:3218
3218 ast_set2_flag(&ast_compat, version < 1.5 ? 1 : 0, AST_COMPAT_DELIM_PBX_REALTIME);
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.3.x86_64 keyutils-libs-1.4-4.el6.x86_64 krb5-libs-1.9-33.el6_3.2.x86_64 libcom_err-1.41.12-12.el6.x86_64 libselinux-2.0.94-5.3.el6.x86_64 libxml2-2.7.6-4.el6_2.4.x86_64 ncurses-libs-5.7-3.20090208.el6.x86_64 openssl-1.0.0-20.el6_2.5.x86_64 sqlite-3.6.20-1.el6.x86_64 zlib-1.2.3-27.el6.x86_64
(gdb)[/code]

As you might already guessed it’s just not clear enough for me exactly what I’m expected to do here, it’s way beyond my expertise. Would it be a possibility for me to sent you a PM with the login details to my server so you can connect to it with SSH. It’s think that’s the quickest solution into getting this sorted out, however I understand if you don’t have the time to do so.

Kind regards,

R. Roeleveld.

I’m not an official support person (no-one on this forum is wearing that hat when they are here). I don’t really have the time to do more than hint in the right direction.

Also, I am not particularly familiar with Intel architecture instruction sets more recent than the 80386, so I would not, instantly, be able to say why an instruction might be illegal.

Ok, I understand. I think I would than have to close this issue as this goes way beyond my ballpark. Maybe I’ll try to get some support elsewhere.

I do want to thank you for all the time and effort you’ve put into this. I’m sorry I couldn’t produce the right information, but I’m glad with the help you’ve given.

Best regards,

R. Roeleveld.

Hi there,

Just for all folks out there with the same problem on Intel processors, I found a solution that works well for me. No more errors anymore.

./configure CC="gcc -O3" CFLAGS=-O3 followed by the normal configuration and installation procedure of asterisk like make menuselect, etc…

I have found this solution on the Intel website in a PDF subjected to Asterisk on Intel multicore processors:
http://download.intel.com/design/intarch/papers/318862.pdf

Best regards,

Ronald Roeleveld.

This appears to be a bug report on the same or similar problem: issues.asterisk.org/jira/browse/ASTERISK-20128
They did understand how to discover the failing instruction.

Hi Guys,

I never found the complete solution posted anywhere. This is what ended up working for us on Asterisk 11.4.0 on CentOS 6 KVM. Your mileage may vary. 8)

If you want to be more precise.
Get your cputype:

Find it from the the list here:
gcc.gnu.org/onlinedocs/gcc/i386- … tions.html

Then

Both of those worked for us.

My guess is that Asterisk is using

Which is getting it wrong sometimes.


Works for me too and is probably the best one overall.  It looks like that was added to newer versions of gcc.  It shows up in the v4.3.4 documentation.
[gcc.gnu.org/onlinedocs/gcc-4.3.4 ... tions.html](http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/i386-and-x86_002d64-Options.html)  


Not a problem with CentOS 6.4 which is currently at v4.4.7

 # rpm -qa | grep gcc
gcc-4.4.7-3.el6.i686
gcc-c++-4.4.7-3.el6.i686
libgcc-4.4.7-3.el6.i686

Works for me too and is probably the best one overall. It looks like that was added to newer versions of gcc. It shows up in the v4.3.4 documentation.
gcc.gnu.org/onlinedocs/gcc-4.3.4 … tions.html

Not a problem with CentOS 6.4 which is currently at v4.4.7

rpm -qa | grep gcc

gcc-4.4.7-3.el6.i686
gcc-c+±4.4.7-3.el6.i686
libgcc-4.4.7-3.el6.i686