Asterisk won’t start – trap invalid opcode

Home » Asterisk Users » Asterisk won’t start – trap invalid opcode
Asterisk Users 8 Comments

Hi there

Happy New Year

I have a new install of asterisk 1.8.8.1 on ubuntu server 3.0.0-14-server #23-Ubuntu SMP Mon Nov 21 20:49:05 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

It has a Sangoma A200 card and I thought should be fairly standard but I have a new error when trying to start asterisk and I don’t really know where to start

Initially asterisk was installed with dahdi from a package but sangoma didn’t seem happy. Once I added dahdi from source sangoma wanpipe installed okay, but when I reloaded asterisk it stopped. So I removed all the packages (I believe I have but something could be hanging around) and rebuilt asterisk from source. Same errors.

The only errors I can see are limited – I also stopped wan router and dahdi and I still get
~# asterisk -cvvvvvvvvvv
Illegal instruction

Which isn’t very informative. Kind of a fun challenge but not one I need right now

Google hasn’t been able to find a similar issue

My choices that I can see are:
– try another version of asterisk – delete everything and start again (which I thought I have tried but maybe not thorough enough)
– earlier version of ubuntu

But I would really like to understand what’s clashing.

The sangoma card details are from lspci

04:03.0 Network controller: Sangoma Technologies Corp. A200/Remora FXO/FXS Analog AFT card
Subsystem: NEC Corporation Device 0700
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Latency: 255 (1250ns min, 3750ns max)
Interrupt: pin A routed to IRQ 17
Region 0: Memory at dfdf0000 (32-bit, non-prefetchable) [size=64K]

Output of dmesg looks fine until it gets to asterisk right at the bottom which gives this
[ 13.419761] asterisk[1352] trap invalid opcode ip:5316f3 sp:7fff2db1a0f0 error:0 in asterisk[400000+1d6000]

dmesg long version

[ 5.051430] WANPIPE(tm) Hardware Support Module 3.5.24.0 (c) 1994-2010 Sangoma Technologies Inc
[ 5.052051] usbcore: registered new interface driver sdlausb
[ 5.063329] dahdi: Telephony Interface Registered on major 196
[ 5.063334] dahdi: Version: 2.5.0.2
[ 5.071841] WANPIPE(tm) Interface Support Module 3.5.24.0 (c) 1994-2010 Sangoma Technologies Inc
[ 5.098753] WANPIPE(tm) Multi-Protocol WAN Driver Module 3.5.24.0 (c) 1994-2010 Sangoma Technologies Inc
[ 5.098759] wanpipe: Probing for WANPIPE hardware.
[ 5.098846] pci 0000:04:03.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 5.110126] wanpipe: AFT-A200-SH PCI FXO/FXS card found (HDLC rev.7), cpu(s) 1, bus #4, slot #3, irq #5
[ 5.110137] wanpipe: Allocating maximum 1 devices: wanpipe1 – wanpipe1.
[ 5.110606] WANPIPE: TDM Codecs Initialized
[ 5.138361] WANPIPE(tm) Socket API Module 3.5.24.0 (c) 1994-2010 Sangoma Technologies Inc
[ 5.138368] NET: Registered protocol family 25
[ 5.171801] WANPIPE(tm) WANEC Layer 3.5.24.0 (c) 1995-2006 Sangoma Technologies Inc.
[ 5.171807] wanec_create_dev: Registering Wanpipe ECDEV Device!
[ 5.211707] wanpipe1: Starting WAN Setup
[ 5.211713]
[ 5.211715] Processing WAN device wanpipe1…
[ 5.211719] wanpipe1: Locating: A200/A400/B600/B700/B800 card, CPU A, PciBus=4, PciSlot=3
[ 5.211728] wanpipe1: Found: A200/A400/B600/B700/B800 card, CPU A, PciBus=4, PciSlot=3, Port=0
[ 5.211785] wanpipe1: AFT PCI memory at 0xDFDF0000
[ 5.211788] wanpipe1: IRQ 17 allocated to the AFT PCI card
[ 5.211841] wanpipe1: Starting AFT Analog Hardware Init.
[ 5.211874] wanpipe1: Enabling front end link monitor
[ 5.211879] wanpipe1: Global Chip Configuration: used=1 used_type=1
[ 5.211906] wanpipe1: Global Front End Configuration!
[ 5.211909] wanpipe1: Configuring FXS/FXO Front End …
[ 5.424637] wanpipe1: Module 1: Installed — Auto FXO (AUSTRALIA mode)!
[ 5.624587] wanpipe1: Module 2: Installed — Auto FXO (AUSTRALIA mode)!
[ 5.824637] wanpipe1: Module 3: Installed — Auto FXO (AUSTRALIA mode)!
[ 6.025333] wanpipe1: Module 4: Installed — Auto FXO (AUSTRALIA mode)!
[ 6.225169] wanpipe1: Module 5: Installed — Auto FXO (AUSTRALIA mode)!
[ 6.425906] wanpipe1: Module 6: Installed — Auto FXO (AUSTRALIA mode)!
[ 6.624559] wanpipe1: Module 7: Installed — Auto FXO (AUSTRALIA mode)!
[ 6.824553] wanpipe1: Module 8: Installed — Auto FXO (AUSTRALIA mode)!
[ 6.824560] wanpipe1: Running post initialization…
[ 6.824563] wanpipe1: Remora config done!
[ 6.824567] wanpipe1: AFT Data Mux Bit Map: 0x01234567
[ 6.824794] wanpipe1: Front End Interface Ready 0x00000000
[ 6.824805] wanpipe1: Register EC interface wanec1 (usage 1, max ec chans 32)!
[ 6.824811] wanpipe1: Configuring Device :wanpipe1 FrmVr=07
[ 6.824814] wanpipe1: Global MTU = 1500
[ 6.824817] wanpipe1: Global MRU = 1500
[ 6.824819] wanpipe1: Data Mux Map = 0x01234567
[ 6.824821] wanpipe1: Rx CRC Bytes = 0
[ 6.824824] wanpipe1: Memory: Card=73888 Wandev=2088 Card Union=13464
[ 6.824827] wanpipe1: Global TDM Int = Disabled
[ 6.824829] wanpipe1: Global TDM Ring= Disabled
[ 6.824831] wanpipe1: Global SPAN IRQ= RX/TX
[ 6.824834] wanpipe1: TDM HW TONE = Enabled
[ 6.824836] wanpipe1: TDMV Span = 1 : Enabled
[ 6.824838] wanpipe1: TDMV Dummy = Disabled
[ 6.824842] wanpipe1: RTP TAP = Disabled
[ 6.825055] wanpipe1: Global Poll IRQ= Disabled
[ 6.825059] wanpipe1: Configuring Interface: w1g1
[ 6.825070] wanpipe1:w1g1: Running in TDM Voice Zaptel Mode.
[ 6.825076] wanpipe1: Registering TDMV FXO iface to module 1!
[ 6.825080] wanpipe1: MRU :8 (Chunk/Period=8/1)
[ 6.825082] wanpipe1: MTU :8 (Chunk/Period=8/1)
[ 6.825084] wanpipe1: HDLC Eng :Off (Transparent) | N/A
[ 6.825090] wanpipe1: Data Mux Ctrl :On
[ 6.825093] wanpipe1: Active Ch Map :0x00000001
[ 6.825095] wanpipe1: First TSlot :0
[ 6.825105] wanpipe1: DMA/Len/Idle/ChainR/ChainT/EC :65/1024/8/Off/Off/On
[ 6.825109] wanpipe1: Memory: Chan=5688
[ 6.825165]
[ 6.825167] wanpipe1: Configuring Interface: w1g1 (log supress)
[ 6.825177] wanpipe1: Registering TDMV FXO iface to module 2!
[ 6.825180] wanpipe1: Active Ch Map :0x00000002
[ 6.825183] wanpipe1: First TSlot :1
[ 6.825237]
[ 6.825239] wanpipe1: Configuring Interface: w1g1 (log supress)
[ 6.825247] wanpipe1: Registering TDMV FXO iface to module 3!
[ 6.825250] wanpipe1: Active Ch Map :0x00000004
[ 6.825252] wanpipe1: First TSlot :2
[ 6.825308]
[ 6.825311] wanpipe1: Configuring Interface: w1g1 (log supress)
[ 6.825320] wanpipe1: Registering TDMV FXO iface to module 4!
[ 6.825324] wanpipe1: Active Ch Map :0x00000008
[ 6.825326] wanpipe1: First TSlot :3
[ 6.825382]
[ 6.825384] wanpipe1: Configuring Interface: w1g1 (log supress)
[ 6.825393] wanpipe1: Registering TDMV FXO iface to module 5!
[ 6.825399] wanpipe1: Active Ch Map :0x00000010
[ 6.825401] wanpipe1: First TSlot :4
[ 6.825459]
[ 6.825461] wanpipe1: Configuring Interface: w1g1 (log supress)
[ 6.825470] wanpipe1: Registering TDMV FXO iface to module 6!
[ 6.825473] wanpipe1: Active Ch Map :0x00000020
[ 6.825476] wanpipe1: First TSlot :5
[ 6.825533]
[ 6.825535] wanpipe1: Configuring Interface: w1g1 (log supress)
[ 6.825546] wanpipe1: Registering TDMV FXO iface to module 7!
[ 6.825553] wanpipe1: Active Ch Map :0x00000040
[ 6.825555] wanpipe1: First TSlot :6
[ 6.825611]
[ 6.825613] wanpipe1: Configuring Interface: w1g1 (log supress)
[ 6.825621] wanpipe1: Configuring TDMV Master dev w1g1
[ 6.825624] wanpipe1: Registering TDMV FXO iface to module 8!
[ 6.825627] wanpipe1: Active Ch Map :0x00000080
[ 6.825629] wanpipe1: First TSlot :7
[ 6.825693]
[ 6.825697] wanpipe1: ALAW override parameter detected. Device will be operating in ALAW
[ 6.825703] wanpipe1: Not used module 9!
[ 6.825705] wanpipe1: Not used module 10!
[ 6.825708] wanpipe1: Not used module 11!
[ 6.825710] wanpipe1: Not used module 12!
[ 6.825712] wanpipe1: Not used module 13!
[ 6.825714] wanpipe1: Not used module 14!
[ 6.825717] wanpipe1: Not used module 15!
[ 6.825719] wanpipe1: Not used module 16!
[ 6.825721] wanpipe1: Not used module 17!
[ 6.825723] wanpipe1: Not used module 18!
[ 6.825726] wanpipe1: Not used module 19!
[ 6.825728] wanpipe1: Not used module 20!
[ 6.825730] wanpipe1: Not used module 21!
[ 6.825732] wanpipe1: Not used module 22!
[ 6.825735] wanpipe1: Not used module 23!
[ 6.825737] wanpipe1: Not used module 24!
[ 6.826726] wanpipe1: Wanpipe device is registered to Zaptel span # 1!
[ 6.826730] wanpipe1: Enable HW Tone detection!
[ 6.827433] wanpipe1: AFT communications enabled!
[ 6.827438] wanpipe1: AFT Per Port TDM Intr (swring)
[ 6.847962] wanpipe1: Clear Echo Canceller chip reset.
[ 11.603798] wanpipe1: Module 2: FXO Line is disconnected!
[ 11.604802] wanpipe1: Module 3: FXO Line is disconnected!
[ 11.605797] wanpipe1: Module 4: FXO Line is disconnected!
[ 11.606797] wanpipe1: Module 5: FXO Line is disconnected!
[ 11.607792] wanpipe1: Module 6: FXO Line is disconnected!
[ 11.608800] wanpipe1: Module 7: FXO Line is disconnected!
[ 11.609797] wanpipe1: Module 8: FXO Line is disconnected!
[ 11.626795] wanpipe1: Module 1: FXO Line is disconnected!
[ 11.711529] wanec1: Opening HW Echo: [Mode=Normal NoiseRed=Off VQE=1836 DtmfRmv=Off Acust=Off NLP=On ]
[ 11.713900] wanec1: Opening HW Echo: [Mode=Normal NoiseRed=Off VQE=1836 DtmfRmv=Off Acust=Off NLP=On ]
[ 11.716182] wanec1: Opening HW Echo: [Mode=Normal NoiseRed=Off VQE=1836 DtmfRmv=Off Acust=Off NLP=On ]
[ 11.718464] wanec1: Opening HW Echo: [Mode=Normal NoiseRed=Off VQE=1836 DtmfRmv=Off Acust=Off NLP=On ]
[ 11.720746] wanec1: Opening HW Echo: [Mode=Normal NoiseRed=Off VQE=1836 DtmfRmv=Off Acust=Off NLP=On ]
[ 11.723929] wanec1: Opening HW Echo: [Mode=Normal NoiseRed=Off VQE=1836 DtmfRmv=Off Acust=Off NLP=On ]
[ 11.727950] wanec1: Opening HW Echo: [Mode=Normal NoiseRed=Off VQE=1836 DtmfRmv=Off Acust=Off NLP=On ]
[ 11.731102] wanec1: Opening HW Echo: [Mode=Normal NoiseRed=Off VQE=1836 DtmfRmv=Off Acust=Off NLP=On ]
[ 11.902954] dahdi_transcode: Loaded.
[ 12.041997] wanpipe1: Open (usecount=1, channo=1, chanpos=1)…
[ 12.057832] wanpipe1: Open (usecount=1, channo=1, chanpos=1)…
[ 12.057854] wanpipe1: Open (usecount=1, channo=2, chanpos=2)…
[ 12.077575] wanpipe1: Open (usecount=1, channo=1, chanpos=1)…
[ 12.077598] wanpipe1: Open (usecount=1, channo=2, chanpos=2)…
[ 12.077612] wanpipe1: Open (usecount=1, channo=3, chanpos=3)…
[ 12.096928] wanpipe1: Open (usecount=1, channo=1, chanpos=1)…
[ 12.096950] wanpipe1: Open (usecount=1, channo=2, chanpos=2)…
[ 12.096965] wanpipe1: Open (usecount=1, channo=3, chanpos=3)…
[ 12.096978] wanpipe1: Open (usecount=1, channo=4, chanpos=4)…
[ 12.116871] wanpipe1: Open (usecount=1, channo=1, chanpos=1)…
[ 12.116893] wanpipe1: Open (usecount=1, channo=2, chanpos=2)…
[ 12.116908] wanpipe1: Open (usecount=1, channo=3, chanpos=3)…
[ 12.116922] wanpipe1: Open (usecount=1, channo=4, chanpos=4)…
[ 12.116936] wanpipe1: Open (usecount=1, channo=5, chanpos=5)…
[ 12.135829] wanpipe1: Open (usecount=1, channo=1, chanpos=1)…
[ 12.135851] wanpipe1: Open (usecount=1, channo=2, chanpos=2)…
[ 12.135866] wanpipe1: Open (usecount=1, channo=3, chanpos=3)…
[ 12.135880] wanpipe1: Open (usecount=1, channo=4, chanpos=4)…
[ 12.135894] wanpipe1: Open (usecount=1, channo=5, chanpos=5)…
[ 12.135907] wanpipe1: Open (usecount=1, channo=6, chanpos=6)…
[ 12.152571] wanpipe1: Open (usecount=1, channo=1, chanpos=1)…
[ 12.152594] wanpipe1: Open (usecount=1, channo=2, chanpos=2)…
[ 12.152609] wanpipe1: Open (usecount=1, channo=3, chanpos=3)…
[ 12.152624] wanpipe1: Open (usecount=1, channo=4, chanpos=4)…
[ 12.152638] wanpipe1: Open (usecount=1, channo=5, chanpos=5)…
[ 12.152651] wanpipe1: Open (usecount=1, channo=6, chanpos=6)…
[ 12.152665] wanpipe1: Open (usecount=1, channo=7, chanpos=7)…
[ 12.172565] wanpipe1: Open (usecount=1, channo=1, chanpos=1)…
[ 12.172587] wanpipe1: Open (usecount=1, channo=2, chanpos=2)…
[ 12.172602] wanpipe1: Open (usecount=1, channo=3, chanpos=3)…
[ 12.172617] wanpipe1: Open (usecount=1, channo=4, chanpos=4)…
[ 12.172631] wanpipe1: Open (usecount=1, channo=5, chanpos=5)…
[ 12.172645] wanpipe1: Open (usecount=1, channo=6, chanpos=6)…
[ 12.172659] wanpipe1: Open (usecount=1, channo=7, chanpos=7)…
[ 12.172673] wanpipe1: Open (usecount=1, channo=8, chanpos=8)…
[ 12.585008] dahdi_echocan_mg2: Registered echo canceler ‘MG2’
[ 12.587225] wanpipe1: Open (usecount=1, channo=1, chanpos=1)…
[ 12.587246] wanpipe1: Open (usecount=1, channo=2, chanpos=2)…
[ 12.587260] wanpipe1: Open (usecount=1, channo=3, chanpos=3)…
[ 12.587275] wanpipe1: Open (usecount=1, channo=4, chanpos=4)…
[ 12.587289] wanpipe1: Open (usecount=1, channo=5, chanpos=5)…
[ 12.587303] wanpipe1: Open (usecount=1, channo=6, chanpos=6)…
[ 12.587317] wanpipe1: Open (usecount=1, channo=7, chanpos=7)…
[ 12.587331] wanpipe1: Open (usecount=1, channo=8, chanpos=8)…
[ 13.419761] asterisk[1352] trap invalid opcode ip:5316f3 sp:7fff2db1a0f0 error:0 in asterisk[400000+1d6000]
[ 14.344275] br0: no IPv6 routers present
[ 18.848045] br0: port 1(eth0) entering forwarding state

 

8 thoughts on - Asterisk won’t start – trap invalid opcode

  • For what it’s worth, I once tried installing Asterisk on an old VIA C7 box;
    and it turns out that this processor, while detecting as an i686, doesn’t
    implement the full i686 instruction set — and Asterisk is trying to use one
    of the non-implemented instructions. Solution was to re-compile for i586.

    It’s just possible that something similar is going on here — maybe your
    processor isn’t implementing an instruction that Asterisk or Dahdi is relying
    on. (It’s my understanding that 64-bit processors don’t fully implement the
    32-bit instructions when in 64-bit mode, but I wouldn’t swear to that.) Or
    maybe it’s a library path problem — something trying to use a 32-bit library
    instead of a 64-bit one, or vice versa. Try ldd on the binaries.

    What is your output from `cat /proc/cpuinfo` ?

    If you have at least two SIP phones and/or an IAX route, try disabling Dahdi,
    and see if you can persuade Asterisk to run like that. At least that should
    help track the problem down to one layer (Asterisk or Dahdi).

  • Thanks very much AJ

    That did appear as one of the few google comments I found but I couldn’t figure out whether it applies

    The outputs are below if you can interpret them, I can see lm in the cpu proc info but don’t know how to check for better compatibility

    ldd -v /usr/sbin/asterisk
    linux-vdso.so.1 => (0x00007fff407ff000)
    libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f72accc0000)
    libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f72ac911000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f72ac571000)
    libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f72ac216000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f72ac012000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f72abdf4000)
    libtinfo.so.5 => /lib/libtinfo.so.5 (0x00007f72abbcd000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f72ab949000)
    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f72ab72d000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f72ab515000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f72acf1b000)

    Version information:
    /usr/sbin/asterisk:
    libdl.so.2 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libdl.so.2
    libresolv.so.2 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libresolv.so.2
    libxml2.so.2 (LIBXML2_2.6.0) => /usr/lib/libxml2.so.2
    libxml2.so.2 (LIBXML2_2.4.30) => /usr/lib/libxml2.so.2
    libcrypto.so.1.0.0 (OPENSSL_1.0.0) => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
    libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
    libpthread.so.0 (GLIBC_2.3.3) => /lib/x86_64-linux-gnu/libpthread.so.0
    libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0
    libc.so.6 (GLIBC_2.8) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
    libssl.so.1.0.0 (OPENSSL_1.0.0) => /lib/x86_64-linux-gnu/libssl.so.1.0.0
    /lib/x86_64-linux-gnu/libssl.so.1.0.0:
    libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    libcrypto.so.1.0.0 (OPENSSL_1.0.0) => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
    /lib/x86_64-linux-gnu/libcrypto.so.1.0.0:
    libdl.so.2 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libdl.so.2
    libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libc.so.6:
    ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    /usr/lib/libxml2.so.2:
    libz.so.1 (ZLIB_1.2.2.3) => /lib/x86_64-linux-gnu/libz.so.1
    libdl.so.2 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libdl.so.2
    libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
    libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libdl.so.2:
    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libpthread.so.0:
    ld-linux-x86-64.so.2 (GLIBC_2.2.5) => /lib64/ld-linux-x86-64.so.2
    ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/libtinfo.so.5:
    libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libm.so.6:
    libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libresolv.so.2:
    libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libz.so.1:
    libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6

    # cat /proc/cpuinfo
    processor : 0
    vendor_id : GenuineIntel
    cpu family : 15
    model : 4
    model name : Intel(R) Pentium(R) 4 CPU 3.06GHz
    stepping : 9
    cpu MHz : 3058.891
    cache size : 1024 KB
    physical id : 0
    siblings : 1
    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 up pebs bts nopl pni dtes64 monitor ds_cpl tm2 cid cx16 xtpr lahf_lm
    bogomips : 6117.78
    clflush size : 64
    cache_alignment : 128
    address sizes : 36 bits physical, 48 bits virtual
    power management:

    Unfortunately it dies with this error just trying to start asterisk – whether with dahdi and /or wanpipe on or off

    I am now wondering about the sangoma wanpipe driver and this same point, but I am not sure how to force it to be 32 bit

  • I loaded the latest 1.6 which gets slightly further and a core dump shows this, but its past my ability to interpret

    # gdb -se “asterisk” -c core | tee /tmp/backtrace.txt
    GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
    Copyright (C) 2011 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-linux-gnu”.
    For bug reporting instructions, please see:
    http://bugs.launchpad.net/gdb-linaro/
    Reading symbols from /usr/sbin/asterisk…done.
    [New LWP 19322]
    [New LWP 19323]
    [New LWP 19324]
    [New LWP 19325]
    [New LWP 19326]

    warning: Can’t read pathname for load map: Input/output error.
    [Thread debugging using libthread_db enabled]
    Core was generated by `asterisk -d -g -cvvvvvvvvvvvvvvvvvvv’.
    Program terminated with signal 4, Illegal instruction.
    #0 0x0000000000500eab in tzload (name=, sp=0x1fc7950, doextend=1) at stdtime/localtime.c:424
    424 static int tzload(const char *name, struct state * const sp, const int doextend)

  • It’s a bit beyond my depth too, but I’d start with a look at localtime.c in
    the Asterisk source tree. It might simply be trying to include something that
    isn’t present on your system.

    If you stick a /* harmless comment */ in this file and re-save it, this will
    give the file a new modification time. Then run `make` again. It will
    recompile just localtime.c (this being the only source file that has changed
    since the last time make was run) — now watch very closely for errors.

    Answers come *after* questions.

  • The ‘touch’ command will update the file’s access and modification times*
    without the risk of trashing something in the file.

    *) Command line parameters can select just the access or the modification
    time. The default is both.

  • Touch seemed safer but I didn’t see any errors

    :/usr/src/asterisk-1.6.2.22# make
    [CC] stdtime/localtime.c -> stdtime/localtime.o
    [LD] abstract_jb.o acl.o adsistub.o aescrypt.o aeskey.o aestab.o alaw.o app.o ast_expr2.o ast_expr2f.o asterisk.o astfd.o astmm.o astobj2.o audiohook.o autoservice.o bridging.o callerid.o cdr.o channel.o chanvars.o cli.o config.o cryptostub.o datastore.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o enum.o event.o features.o file.o fixedjitterbuf.o frame.o fskmodem.o global_datastores.o hashtab.o heap.o http.o image.o indications.o io.o jitterbuf.o loader.o logger.o manager.o md5.o netsock.o pbx.o plc.o poll.o privacy.o rtp.o say.o sched.o sha1.o slinfactory.o srv.o ssl.o stdtime/localtime.o strcompat.o strings.o taskprocessor.o tcptls.o tdd.o term.o test.o threadstorage.o timing.o translate.o udptl.o ulaw.o utils.o version.o xml.o xmldoc.o editline/libedit.a db1-ast/libdb1.a -> asterisk
    +——— Asterisk Build Complete ———+
    + Asterisk has successfully been built, and +
    + can be installed by running: +
    + +
    + make install +
    +——————————————-+

    I haven’t found anything obvious in the debug stuff although I am not familiar enough to be sure

    Thanks very much

    Unless there is something obvious I am thinking I will revert to either an earlier OS or maybe 32 bit – although that seems excessive

    Cheers Duncan

  • DT> I have a new install of asterisk 1.8.8.1 on ubuntu server
    DT> 3.0.0-14-server #23-Ubuntu SMP Mon Nov 21 20:49:05 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

    DT> The only errors I can see are limited – I also stopped wan router and dahdi and I still get
    DT> ~# asterisk -cvvvvvvvvvv
    DT> Illegal instruction

    What does /proc/cpuinfo say? (Just the first chunk is enough.)

    Try running asterisk is gdb:

    :; gdb asterisk

    (gdb) run -cvvvvvvvvvvddd

    When it dies, try:

    (gdb) bt full

    (gdb) disasemble /m

    You may also want to recompile asterisk after turing on:

    DONT_OPTIMIZE
    DEBUG_THREADS
    BETTER_BACKTRACES

    in the Compiler Flags section of make menuselect.

    The gdb output if you do that may be more comprehensible.

    Either way run gdb from the asterisk src directory.

    When you find the point where it crashed, you can discover what the
    illegal instruction is.

    I suspect your compile may expect a more recent cpu than you have, and
    may use sse instructions which it doesn’t support. A disassembly around
    the failing instruction will confirm whether that is true and which
    instruction it is.

    -JimC

  • Hi James

    I think the DONT_OPTIMIZE flag made a difference, the system is not crashing anymore

    I am going to test it, and see if its really back, the other detail looked fairly similar to the core dump output in previous emails but there wasn’t anything I could easily discern

    I will let you all know how it turns out – thanks everyone

    Cheers Duncan