Bug 148593 - Asterisk does not run.
Summary: Asterisk does not run.
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Other (show other bugs)
Version: Beta 3
Hardware: i586 Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Reinhard Max
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-07 00:06 UTC by First Name Last Name
Modified: 2006-02-10 09:34 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description First Name Last Name 2006-02-07 00:06:26 UTC
server:~ # rcasterisk start
Starting Asterisk startproc:  signal catched /usr/sbin/asterisk: Illegal instruction
======================================================================
According to asterisk mailing lists this is due to wrong architechture.
Building my own RPM with the provided SRPM solves the problem.
The original rpm is probably compiled for i686. 
Tested on AMD K6III+ 
10.0 has the same problem (as well as previous 10.1 betas)
Follows debuging info made with the non working binary.
======================================================================
server:~ # rcasterisk start
Starting Asterisk startproc:  signal catched /usr/sbin/asterisk: Illegal instruction
server:~ # uname -m
i586
server:/ # readelf -h `which asterisk`
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x8055780
  Start of program headers:          52 (bytes into file)
  Start of section headers:          791092 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         9
  Size of section headers:           40 (bytes)
  Number of section headers:         29
  Section header string table index: 28

server:/ # rpm -qi asterisk
Name        : asterisk                     Relocations: (not relocatable)
Version     : 1.2.1                             Vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
Release     : 4                             Build Date: Mon Jan 23 18:51:19 2006
Install Date: Thu Feb  2 04:09:42 2006      Build Host: bach.suse.de
Group       : Productivity/Telephony/Servers   Source RPM: asterisk-1.2.1-4.src.rpm
Size        : 13194661                         License: GPL, BSD
Signature   : DSA/SHA1, Mon Jan 23 19:09:35 2006, Key ID a84edae89c800aca
Packager    : http://bugs.opensuse.org
URL         : http://www.asterisk.org
Summary     : The Asterisk Open Source PBX
Description :
[...]
Distribution: SUSE LINUX 10.0.42 (i586)
server:/ #
Comment 1 Michael Gross 2006-02-07 14:52:44 UTC
So the program crashes on an AMD-K6-3? Just to be clear about that.
Comment 2 First Name Last Name 2006-02-07 17:14:37 UTC
Technically speaking, I do not know if it crashes, or if it does not run.
It is an incompatible binary. If you try to run it the error comes instantly.

server:/ # asterisk
Illegal instruction
server:/

If it's the system or asterisk printing that error, it's is beyond my knowledge.
Same problem with beta4 asterisk-1.2.3-2
Compiling myself fom SRPM and problem gone.
Comment 3 Michael Gross 2006-02-07 17:29:12 UTC
Yes this means that the program was compiled for an incompatible architecture and contains a cpu-instruction (opcode) which cannot be understood by the CPU. Of course the program is terminated then.
Let's ask the asterisk maintainer.
Comment 4 Reinhard Max 2006-02-07 18:46:46 UTC
IIRC K6-2 and K6-3 only support a subset of the MMX extension and Asterisk happens to use some of the instructions that are not supported. When recompiling from the source RPM on such a machine, the build system detects the CPU and builds with MMX disabled.

OTOH, I thought I had patched away this autodetection and forced Asterisk to build without MMX in any case. I need to investigate this...
Comment 6 Reinhard Max 2006-02-09 16:20:43 UTC
There are new RPMs under ftp://ftp.suse.com/pub/projects/asterisk/10.1-beta3 . Please try them and let me know if they run out of the box on the K6-3.
Comment 7 First Name Last Name 2006-02-09 17:48:42 UTC
http://ftp.suse.com/pub/projects/asterisk/10.1-beta3/i386/asterisk-1.2.3-3.i586.rpm
runs without glitches.

Was simply solved by disabling mmx?
Comment 8 Reinhard Max 2006-02-10 09:34:05 UTC
No, the modules that have support for MMX (e.g. the GSM codec) had it disabled already.

But Asterisk compiled some source files with -march=i686 when it found to be built on a 686 machine, and that results in binaries that contain instructions which are not available on an i586 CPU. I've removed that check, so that only i586 code is generated, regardless of the CPU we are compiling on.