Page 1 of 1

"Illegal instruction" crash with 6.8.9-6 on Solaris

Posted: 2014-08-05T05:07:05-07:00
by laurent_csw
Hello,

After building 6.8.9-6 on Solaris, I get the following error:

Code: Select all

$ convert
Illegal Instruction (core dumped)
The previous version I built, 6.8.9-2, with exactly the same build recipe and environment, works fine, so it looks like an ImageMagick regression.

The core file says this:

Code: Select all

# pstack core.convert.13516
core 'core.convert.13516' of 13516:     convert
 fffffd7ffefc959f ElapsedTime () + 1f
 fffffd7ffefc9a0c StartTimer () + 5c
 fffffd7ffef3f460 LoadLogCache () + 3d0
 fffffd7ffef3fa86 GetLogInfo.constprop.4 () + 1b6
 fffffd7ffef40b03 LogComponentGenesis () + 23
 fffffd7ffef43252 MagickCoreGenesis () + 52
 0000000000406d0f main () + 1f
 0000000000401ccc _start () + 6c
The system is Solaris 10, up to date, using GCC 4.9.0, building for AMD64.

Anything I can do to help diagnose this?

thanks,

Laurent

Re: "Illegal instruction" crash with 6.8.9-6 on Solaris

Posted: 2014-08-05T05:13:59-07:00
by magick
It may be failing in a system call. Do you have MAGICKCORE_HAVE_TIMES defined in magick/magick-baseconfig.h? If so its calling times() @ magick/timer.c/198. Otherwise its calling clock(). This assumes your stack trace is accurate. Pop some debug statements around this code block to trace the failure.

Re: "Illegal instruction" crash with 6.8.9-6 on Solaris

Posted: 2014-08-05T14:50:29-07:00
by laurent_csw
magick wrote:It may be failing in a system call. Do you have MAGICKCORE_HAVE_TIMES defined in magick/magick-baseconfig.h? If so its calling times() @ magick/timer.c/198. Otherwise its calling clock(). This assumes your stack trace is accurate. Pop some debug statements around this code block to trace the failure.
So, it does go through that bit of code at line 198. The issue is in the .so, since using the previous ones with the new convert binary works.
But the plot thickens: when I build it on my test machine, still the exact same recipe, same compiler, same optimization, then it works. When it's built on the packaging machine, it works on the packaging machine, but I get that SIGILL if I move the binary on the test machine.

The packaging machine supports more recent instruction sets:

Code: Select all

$ isainfo -v
64-bit amd64 applications
        avx xsave pclmulqdq aes sse4.2 sse4.1 ssse3 popcnt tscp cx16 sse3 sse2
        sse fxsr mmx cmov amd_sysc cx8 tsc fpu
Old test machine:

Code: Select all

$ isainfo -v
64-bit amd64 applications
        sse4.1 ssse3 cx16 sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
I'm a bit puzzled. Could there be some build-time optimization done? I don't see anything that would match in the changelog.

Thanks,

Laurent

Re: "Illegal instruction" crash with 6.8.9-6 on Solaris

Posted: 2014-08-06T04:37:17-07:00
by laurent_csw
So, my bad, as you probably have guessed, I had somehow missed the --with-gcc-arch option (too much focus on the dependencies in general, and not looking for the right pattern this time).
Setting it to "opteron" is enough to fix that particular issue, so it's all good. I truly wonder what I did the last time to not hit the same problem.

Thanks for your help, apologies for the noise.

Laurent