[Home]

Summary:ASTERISK-19462: asterisk Illegal Instruction (core dumped)
Reporter:evrinoma@gmail.com (evrinoma@gmail.com)Labels:
Date Opened:2012-03-02 08:14:11.000-0600Date Closed:2012-04-12 09:33:19
Priority:CriticalRegression?
Status:Closed/CompleteComponents:General
Versions:1.8.9.2 Frequency of
Occurrence
Related
Issues:
causesASTERISK-20128 Virtualized asterisk.org 1.8.14.0 no longer runs in a KVM virtualized environment. Compiles without error, but fails with Illegal instruction on launch Regression since 1.8.13.0 Last good 1.8.12.2
Environment:cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 4 model name : Intel(R) Celeron(R) CPU 3.06GHz stepping : 9 cpu MHz : 3066.590 cache size : 256 KB fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc up pebs bts pni dtes64 monitor ds_cpl tm2 cid cx16 xtpr lahf_lm bogomips : 6118.58 clflush size : 64 cache_alignment : 128 address sizes : 36 bits physical, 48 bits virtual power management: uname -a Linux IT0917 2.6.32-220.4.2.el6.x86_64 #1 SMP Tue Feb 14 04:00:16 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux free total used free shared buffers cached Mem: 2044416 1971600 72816 0 60636 1615176 -/+ buffers/cache: 295788 1748628 Swap: 2000052 0 2000052Attachments:
Description:hello

i found some bug asterisk 1.8

All started when i want build ipsec-0.8.0
http://sourceforge.net/projects/ipsec-tools/files/ipsec-tools/0.8.0/

I had a simple linux PC with installed OS Linux CentOS 6.2
CentOS 6.2 have a rpm installed gcc version 4.4.6-3
with configure parameters
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux

when i try build this program i have a some errors. Solving this errors i
replaced gcc version more then 4.4.
I download version 4.6.2 and build gcc 4.6.2 in native mode with configure parameters like this
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux

and like this
--disable-cloog-version-check --enable-cloog-backend=isl --enable-lto
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --with-system-zlib
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++ --disable-dssi --enable-libgcj-multifile
--without-ppl --without-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux

i install gcc 4.6.2 (with cloog and ppl) i successful build ipsec 0.8.0. The
program ipsec successful work.

After that i tried build asterisk version 1.8.9.2
The program successful build but when program start is crush with next error
--- SIGILL (Illegal instruction) @ 0 (0) ---
+++ killed by SIGILL (core dumped) +++
Illegal Instruction (core dumped)

after that i install gcc 4.6.2 (without cloog and ppl) and rebuild asterisk
version 1.8.9.2
The program successful build but when program start is crush with next error
--- SIGILL (Illegal instruction) @ 0 (0) ---
+++ killed by SIGILL (core dumped) +++
Illegal Instruction (core dumped)

i tried rebuild gcc with any configure parameters, but asterisk does not start

okey i get oldest version gcc 4.5.3 and build him with next parameters
--disable-cloog-version-check --enable-cloog-backend=isl --enable-lto
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --with-system-zlib
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++ --disable-dssi --enable-libgcj-multifile
--without-ppl --without-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux

after that i install gcc  version 4.5.3 (without cloog and ppl) and rebuild
asterisk version 1.8.9.2
The program successful build and program successful start without any errors

after that i rebuild ipsec 0.8.0. The program ipsec successful work.

gcc-4.7-20120225/configure

--disable-cloog-version-check --enable-cloog-backend=isl --enable-lto
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --with-system-zlib
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++ --disable-dssi --enable-libgcj-multifile
--without-ppl --without-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux


posix
gcc 4.7.0 20120225 (experimental) (GCC)


similar problem

I began to look the problem in a asterisk

debug asterisk
(gdb) disassemble 0x000000000053e800,+32
Dump of assembler code from 0x53e800 to 0x53e820:
  0x000000000053e800 <tzload+3040>:    movdqu -0x40(%rcx),%xmm0
  0x000000000053e805 <tzload+3045>:    prefetcht0 0x190(%rcx)
  0x000000000053e80c <tzload+3052>:    mov    %rcx,%r10
=> 0x000000000053e80f <tzload+3055>:    prefetchw 0x1d0(%rdi)
  0x000000000053e816 <tzload+3062>:    add    $0x4,%esi
  0x000000000053e819 <tzload+3065>:    movaps %xmm0,(%rdi)
  0x000000000053e81c <tzload+3068>:    movdqu -0x30(%rcx),%xmm0
End of assembler dump.
(gdb)

the asterisk makefile detecting and using incorrect compilation flags

ifeq ($(OSARCH),linux-gnu)
 ifeq ($(PROC),x86_64)
   # You must have GCC 3.4 to use k8, otherwise use athlon
#    PROC=k8
>>>>>>>>>>>>>>>PROC=nocona in my situation
   #PROC=athlon
 endif

i changed parameter PROC on nocona
The program successful build and program successful start without any errors
Comments:By: evrinoma@gmail.com (evrinoma@gmail.com) 2012-03-05 22:45:18.540-0600

You must set the architecture more versatile
or you can write good code that will define the architecture


By: Kinsey Moore (kmoore) 2012-04-04 15:03:16.066-0500

If you are going to run Asterisk on the computer you compile on, I would suggest using "native".  A better default march setting for Asterisk might be pentium-m or i686.  Unfortunately, nocona allows for SSE3 to be used which is beyond what is currently specified with k8.  I'll take some more time tomorrow to go over the available options to see what fits the best.