Summary:ASTERISK-19264: ASTERISK-19202 creates: trap invalid opcode ip:516aa2 sp:7fff224a4640 error:0 in asterisk[400000+196000] on x86_64 builds
Reporter:Anthony Messina (amessina)Labels:
Date Opened:2012-01-27 19:12:29.000-0600Date Closed:2012-01-28 01:43:54.000-0600
Versions:10.1.0 Frequency of
Environment:Stock Fedora 15 x86_64.Attachments:( 0) gdb.txt
Description:The patch for ASTERISK-19202 builds successfully and runs successfully on Fedora 15 i386/i686.  It builds successfully for Fedora 15 x86_64, but trying to start Asterisk results in asterisk[27690] trap invalid opcode ip:516aa2 sp:7fff224a4640 error:0 in asterisk[400000+196000].  Removing this patch allows Asterisk to run normally and without issue on Fedora 15 x86_64.

(gdb) run -cvvvvvvvvvvddd -C /etc/asterisk/asterisk.conf -U asterisk -G asterisk
Starting program: /usr/sbin/asterisk -cvvvvvvvvvvddd -C /etc/asterisk/asterisk.conf -U asterisk -G asterisk
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff7fde700 (LWP 29308)]

Program received signal SIGILL, Illegal instruction.
timesub (timep=0x7fffffffb990, offset=-21600, sp=<optimized out>, tmp=0x7fffffffba10) at stdtime/localtime.c:1780

CPU Info Xeon Quad Core 9here's the first CPU0):
~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 3
cpu MHz         : 2800.000
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts nopl pni dtes64 monitor ds_cpl cid cx16 xtpr
bogomips        : 5585.42
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:
Comments:By: Richard Mudgett (rmudgett) 2012-01-27 19:42:54.977-0600

Thank you for your bug report. In order to move your issue forward, we require a backtrace[1] from the core file produced after the crash. Also, be sure you have DONT_OPTIMIZE enabled in menuselect within the Compiler Flags section, then:

make install

After enabling, reproduce the crash, and then execute the backtrace[1] instructions. When complete, attach that file to this issue report.

[1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

By: Anthony Messina (amessina) 2012-01-27 19:58:54.824-0600

I'm working on that rebuild with debugging options now and will report results here.

By: Anthony Messina (amessina) 2012-01-27 23:17:09.582-0600


By: Anthony Messina (amessina) 2012-01-27 23:19:30.224-0600

I'm having trouble getting the build to work with DONT_OPTIMIZE even though my menuselect.makeopts includes "MENUSELECT_CFLAGS=LOADABLE_MODULES DONT_OPTIMIZE DEBUG_THREADS" and "COMPILER_FLAGS=DONT_OPTIMIZE DEBUG_THREADS".  I'm still seeing <optimized out> in the bt.  Is there something else I need to do to enable DONT_OPTIMIZE?

By: Anthony Messina (amessina) 2012-01-28 01:43:24.987-0600

Well, after all, it turned out to be a compilation issue, rather than an Asterisk issue.  Sorry to waste your time.

By: Anthony Messina (amessina) 2012-01-28 01:43:54.659-0600

This turned out to be a dependency error during compilation.  Sorry for wasting your time.