Page 1 of 1

Need help. Illegal instruction and make check fail on Amazon EC2

Posted: 2015-03-26T06:27:23-07:00
by AlexZpm
Hi.
I need to install ImageMagick on EC2 and try to do that as shown here
viewtopic.php?t=24125
But after all steps I have that

Code: Select all

=========================================
   ImageMagick 6.9.1: ./test-suite.log
=========================================
TTOTAL: 59
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  57
# XPASS: 0
# ERROR: 2

.. contents:: :depth: 2

FAIL: tests/cli-pipe
====================

./tests/cli-pipe.tap: line 23: 16991 Illegal instruction     ${CONVERT} pnm:- 'null:' < ${SRCDIR}/rose.pnm
1..8
./tests/cli-pipe.tap: line 24: 17010 Illegal instruction     ${CONVERT} pnm:- miff:- < ${SRCDIR}/rose.pnm
     17011                       | ${IDENTIFY} -
not ok
FAIL: tests/cli-pipe.tap 1
./tests/cli-pipe.tap: line 25: 17045 Illegal instruction     ${CONVERT} pnm:- - < ${SRCDIR}/rose.pnm
     17046                       | ${IDENTIFY} -
not ok

... and many same lines

Thanks for help

Re: Need help. Illegal instruction and make check fail on Amazon EC2

Posted: 2015-03-26T13:36:06-07:00
by magick
Try a basic sanity check, type this command:
  • convert logo: info:
Does that work? If it produces a fault, post a stack trace (you may need to install gdb):
  • gdb convert
    run logo: info:
    where
An illegal instruction, typically is a compiler or system or build problem and will likely have nothing to do with ImageMagick. The stack trace should reflect this.

Re: Need help. Illegal instruction and make check fail on Amazon EC2

Posted: 2015-03-27T00:49:32-07:00
by AlexZpm
Magick, thanks for instructions

I was received that:

Code: Select all

[ec2-user@ip-10-184-37-165 tmp]$ gdb convert
GNU gdb (GDB) Amazon Linux (7.6.1-51.27.amzn1)
Copyright (C) 2013 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-amazon-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/convert...done.
(gdb) run logo: info:
Starting program: /usr/local/bin/convert logo: info:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /lib64/libgcc_s.so.1
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/c5/2958e393bdf8e8d090f36de0f4e620d8736fbf.debug

Program received signal SIGILL, Illegal instruction.
StartTimer (time_info=time_info@entry=0x601540, reset=reset@entry=MagickTrue) at magick/timer.c:380
380           time_info->elapsed.start=ElapsedTime();
Missing separate debuginfos, use: debuginfo-install freetype-2.3.11-14.13.amzn1.x86_64 glibc-2.17-55.140.amzn1.x86_64 jbigkit-libs-2.0-11.4.amzn1.x86_64 libgomp-4.8.2-16.2.99.amzn1.x86_64 libjpeg-turbo-1.2.90-5.9.amzn1.x86_64 libpng-1.2.49-1.12.amzn1.x86_64 libtiff-4.0.3-15.19.amzn1.x86_64 libwebp-0.3.0-3.5.amzn1.x86_64 zlib-1.2.8-7.18.amzn1.x86_64
(gdb) where
#0  StartTimer (time_info=time_info@entry=0x601540, reset=reset@entry=MagickTrue) at magick/timer.c:380
#1  0x00007ffff79bb5b3 in GetTimerInfo (time_info=time_info@entry=0x601540) at magick/timer.c:271
#2  0x00007ffff79359f1 in LoadLogCache (log_cache=log_cache@entry=0x6012f0, xml=<optimized out>,
    filename=filename@entry=0x602bc0 "/usr/local/etc/ImageMagick-6/log.xml", depth=depth@entry=0, exception=exception@entry=0x6010f0) at magick/log.c:1528
#3  0x00007ffff7935fc6 in AcquireLogCache (filename=0x7ffff7ab32b9 "log.xml", exception=0x6010f0) at magick/log.c:280
#4  IsLogCacheInstantiated (exception=0x6010f0) at magick/log.c:659
#5  GetLogInfo (exception=exception@entry=0x6010f0, name=0x7ffff7ab3b6b "*") at magick/log.c:392
#6  0x00007ffff793629b in LogComponentGenesis () at magick/log.c:828
#7  0x00007ffff793949d in MagickCoreGenesis (path=0x7fffffffe672 "/usr/local/bin/convert",
    establish_signal_handlers=establish_signal_handlers@entry=MagickTrue) at magick/magick.c:1251
#8  0x000000000040089e in ConvertMain (argv=0x7fffffffe3c8, argc=3) at utilities/convert.c:78
#9  main (argc=3, argv=0x7fffffffe3c8) at utilities/convert.c:92
(gdb)

Re: Need help. Illegal instruction and make check fail on Amazon EC2

Posted: 2015-03-27T04:16:21-07:00
by magick
The program dies in a section of code that has been around since the inception of ImageMagick and therefore proven stable again suggesting a compiler or system build problem. You could check to see if there is a problem calling the system times() method. Add this line to magick/timer.c/ElapsedTime():
  • static double ElapsedTime(void)
    {
    return(0.0);
Now rebuild and reinstall. Does the program work now? If not it might suggest a structure offset problem, however TimerInfo of magick/timer.c/StartTimer() is a structure of doubles and therefore is quite unlikely to be a structure alignment problem.

Does your EC2 instance have at least 1GB of memory?

Re: Need help. Illegal instruction and make check fail on Amazon EC2

Posted: 2015-03-27T05:42:11-07:00
by AlexZpm
Yes, i have the old T1.micro instance with 0.6GB of memory