Asterisk 1.8.24 : Illegal Instruction

Home » Asterisk Users » Asterisk 1.8.24 : Illegal Instruction
Asterisk Users 11 Comments

Hello,

I have installed asterisk 1.8.24 (from source) but I can not start up Asterisk :

[root@sip32 admin]# /usr/sbin/asterisk -r Illegal instruction
[root@sip32 admin]# /sbin/service asterisk status asterisk dead but subsys locked
[root@sip32 admin]# /sbin/service asterisk restart Stopping safe_asterisk: [ OK ]
Shutting down asterisk: [FAILED]
Starting asterisk:
[root@sip32 admin]# /usr/sbin/asterisk -r Illegal instruction
[root@sip32 admin]#
[root@sip32 admin]# /usr/sbin/asterisk -c Illegal instruction

Why can I not start Asterisk ?

I also notice the following in /var/log/asterisk :

[root@sip32 admin-voipcenter]# tail -f /var/log/messages Nov 20 14:04:31 sip32 kernel: asterisk[2034] trap invalid opcode ip:530b18 sp:7fffa6051a60 error:0 in asterisk[400000+1d7000]
Nov 20 14:04:31 sip32 kernel: asterisk[2034] trap invalid opcode ip:530b18 sp:7fffa6051a60 error:0 in asterisk[400000+1d7000]
Nov 20 14:04:35 sip32 kernel: asterisk[2041] trap invalid opcode ip:530b18 sp:7fff11d96bf0 error:0 in asterisk[400000+1d7000]
Nov 20 14:04:35 sip32 kernel: asterisk[2041] trap invalid opcode ip:530b18 sp:7fff11d96bf0 error:0 in asterisk[400000+1d7000]
Nov 20 14:04:39 sip32 kernel: asterisk[2047] trap invalid opcode ip:530b18 sp:7fff7913f1a0 error:0 in asterisk[400000+1d7000]
Nov 20 14:04:39 sip32 kernel: asterisk[2047] trap invalid opcode ip:530b18 sp:7fff7913f1a0 error:0 in asterisk[400000+1d7000]
Nov 20 14:04:43 sip32 kernel: asterisk[2053] trap invalid opcode ip:530b18 sp:7fff663f32c0 error:0 in asterisk[400000+1d7000]
Nov 20 14:04:43 sip32 kernel: asterisk[2053] trap invalid opcode ip:530b18 sp:7fff663f32c0 error:0 in asterisk[400000+1d7000]
Nov 20 14:04:47 sip32 kernel: asterisk[2059] trap invalid opcode ip:530b18 sp:7fffb5200b90 error:0 in asterisk[400000+1d7000]
Nov 20 14:04:47 sip32 kernel: asterisk[2059] trap invalid opcode ip:530b18 sp:7fffb5200b90 error:0 in asterisk[400000+1d7000]
Nov 20 14:04:51 sip32 kernel: asterisk[2066] trap invalid opcode ip:530b18 sp:7fffc19af630 error:0 in asterisk[400000+1d7000]
Nov 20 14:04:51 sip32 kernel: asterisk[2066] trap invalid opcode ip:530b18 sp:7fffc19af630 error:0 in asterisk[400000+1d7000]

Kind regards, Jonas.

11 thoughts on - Asterisk 1.8.24 : Illegal Instruction

  • Hello,

    I have installed asterisk 1.8.24 (from source) but I can not start up Asterisk :

    [root@sip32 admin]# /usr/sbin/asterisk -r Illegal instruction
    [root@sip32 admin]# /sbin/service asterisk status asterisk dead but subsys locked
    [root@sip32 admin]# /sbin/service asterisk restart Stopping safe_asterisk: [ OK ]
    Shutting down asterisk: [FAILED]
    Starting asterisk:
    [root@sip32 admin]# /usr/sbin/asterisk -r Illegal instruction
    [root@sip32 admin]#
    [root@sip32 admin]# /usr/sbin/asterisk -c Illegal instruction

    Why can I not start Asterisk ?

    I also notice the following in /var/log/messages :

    [root@sip32 admin-voipcenter]# tail -f /var/log/messages Nov 20 14:04:31 sip32 kernel: asterisk[2034] trap invalid opcode ip:530b18 sp:7fffa6051a60 error:0 in asterisk[400000+1d7000]
    Nov 20 14:04:31 sip32 kernel: asterisk[2034] trap invalid opcode ip:530b18 sp:7fffa6051a60 error:0 in asterisk[400000+1d7000]
    Nov 20 14:04:35 sip32 kernel: asterisk[2041] trap invalid opcode ip:530b18 sp:7fff11d96bf0 error:0 in asterisk[400000+1d7000]
    Nov 20 14:04:35 sip32 kernel: asterisk[2041] trap invalid opcode ip:530b18 sp:7fff11d96bf0 error:0 in asterisk[400000+1d7000]
    Nov 20 14:04:39 sip32 kernel: asterisk[2047] trap invalid opcode ip:530b18 sp:7fff7913f1a0 error:0 in asterisk[400000+1d7000]
    Nov 20 14:04:39 sip32 kernel: asterisk[2047] trap invalid opcode ip:530b18 sp:7fff7913f1a0 error:0 in asterisk[400000+1d7000]
    Nov 20 14:04:43 sip32 kernel: asterisk[2053] trap invalid opcode ip:530b18 sp:7fff663f32c0 error:0 in asterisk[400000+1d7000]
    Nov 20 14:04:43 sip32 kernel: asterisk[2053] trap invalid opcode ip:530b18 sp:7fff663f32c0 error:0 in asterisk[400000+1d7000]
    Nov 20 14:04:47 sip32 kernel: asterisk[2059] trap invalid opcode ip:530b18 sp:7fffb5200b90 error:0 in asterisk[400000+1d7000]
    Nov 20 14:04:47 sip32 kernel: asterisk[2059] trap invalid opcode ip:530b18 sp:7fffb5200b90 error:0 in asterisk[400000+1d7000]
    Nov 20 14:04:51 sip32 kernel: asterisk[2066] trap invalid opcode ip:530b18 sp:7fffc19af630 error:0 in asterisk[400000+1d7000]
    Nov 20 14:04:51 sip32 kernel: asterisk[2066] trap invalid opcode ip:530b18 sp:7fffc19af630 error:0 in asterisk[400000+1d7000]

    Kind regards, Jonas.

  • Hello,

    how can I mix libraries ?

    I have installed prerequisites from yum and asterisk from source (make
    && make install).

    My kernel :

    [root@sip32 asterisk-1.8.24.0]# uname -a Linux sip32.domain.tld 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed Oct 16
    18:37:12 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

    Jonas.

  • I am not sure that this is the cause of your problem but I think that the message that you are getting can be caused by that.

    You might want to check the build logs to be sure that you do not have a
    32 bit library installed.

    32 bit libraries will work on 64 bit Linux but not when mixed with 64
    bit applications.

    Ron

  • Hello,

    same problem with asterisk-1.8.23.1

    So how do I check if I have 32 bit libs installed ?

    I always install with yum, so on a 64bit CentOS 6.4 there should only be
    64bit libs installed…

    Jonas.

  • Hello,

    I think there are no 32bit libs installed :

    [root@sip32 src]# rpm -qa | grep ‘i[6543]86’

    [root@sip32 src]# yum list installed *.i*86
    Loaded plugins: downloadonly, fastestmirror Loading mirror speeds from cached hostfile
    * base: mirror.muntinternet.net
    * epel: mirror.muntinternet.net
    * extras: mirror.muntinternet.net
    * rpmforge: nl.mirror.eurid.eu
    * updates: mirror.muntinternet.net Error: No matching Packages to list

    Jonas.

  • Are you using a VIA C6/C7 processor (often found soldered to tiny motherboards), by any chance? This family of processors falsely report as
    “i686” when they lack some of the instructions for this family.

    The fix is to build for a target architecture of “i586”.

  • Hello, you can check the asterisk binary with. file /usr/sbin/asterisk and linked library ldd /usr/sbin/asterisk

  • The information requested :

    [root@sip32 src]# file /usr/sbin/asterisk
    /usr/sbin/asterisk: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped

    [root@sip32 src]# ldd /usr/sbin/asterisk
    linux-vdso.so.1 => (0x00007fff677ff000)
    libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007fde449fc000)
    libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007fde44662000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fde442ce000)
    libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007fde43f7c000)
    libz.so.1 => /lib64/libz.so.1 (0x00007fde43d66000)
    libm.so.6 => /lib64/libm.so.6 (0x00007fde43ae1000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007fde438dd000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fde436c0000)
    libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007fde4349e000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fde43284000)
    libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007fde43040000)
    libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007fde42d59000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fde42b55000)
    libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007fde42929000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fde44c5f000)
    libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007fde4271d000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fde4251a000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fde422fa000)

    Kind regards, Jonas.

  • Hello,

    problem is solved by compiling Asterisk as follow :

    [root@sip32 asterisk]# ./configure CFLAGS=-mtune=native

    Now Asterisk starts normally, without any error message.

    Is this a problem of Asterisk or a problem of gcc ??

    Kind regards, Jonas.