Page 1 of 1

Binaries crash on Solaris 10 x86 32 bit

Posted: 2015-01-12T02:39:53-07:00
by laurent_csw
Hello,

I'm packaging ImageMagick for Solaris 10, and I've had a report that it crashes. However, I'm not fully sure it's an ImageMagick issue yet: it happens only for Solaris 10 x86 32 bit. For S10 x86 64 bit, S10 sparc 32 and 64 bit, there is no crash. All the builds are done with the same recipes, using the same dependency levels and the same GCC 4.9.2 compiler, with optimization at -O2 (and for x86 32 bit, tried with --arch=pentium_pro or pentium-mmx), so I'm a bit puzzled, and would appreciate any help.
This happens with 6.8.9-9, 6.9.0-0, 6.9.9-3.
Of course, I can easily rebuild and test differently if needed.

Here's what I get:

Code: Select all

$ convert
Abort (core dumped)

# pstack core.convert.13403
core 'core.convert.13403' of 13403:     /opt/csw/bin/pentium_pro/convert
 fef0c8e5 _lwp_kill (1, 6) + 15
 feeb376f raise    (6) + 1f
 fee929e1 abort    (0, fef70000, fee32a00, 80472e8, fef74700, 0) + cd
 feb24255 MagickSignalHandler (6, 0, 8047384) + 75
 fef0939f __sighndlr (6, 0, 8047384, feb241e0) + f
 feeff06b call_user_handler (6, 0, 8047384) + 22b
 feeff1ac sigacthandler (6, 0, 8047384) + 7c
 --- called from signal handler with signal 6 (SIGABRT) ---
 fef0c8e5 _lwp_kill (1, 6) + 15
 feeb376f raise    (6) + 1f
 fee92978 abort    (0, fef70000, fee32a00, 8047638, fef74980, 0) + 64
 feb24255 MagickSignalHandler (b, 0, 80476e0) + 75
 fef0939f __sighndlr (b, 0, 80476e0, feb241e0) + f
 feeff06b call_user_handler (b, 0, 80476e0) + 22b
 feeff1ac sigacthandler (b, 0, 80476e0) + 7c
 --- called from signal handler with signal 11 (SIGSEGV) ---
 feea642e t_delete (8071638) + 34
 feea615e realfree (80715c0) + 58
 feea6768 cleanfree (0) + 44
 feea5c63 _malloc_unlocked (20, 0, 8067888, fec42c60, 8047968, feb27ca8) + ad
 feea5b8c malloc   (1c, feefea5d, fecb16a0, fecb16a0, fef71688) + 34
 feb27ca8 AcquireMagickMemory (1c, fef70000, fef71688, feb28234, 8067888, fef71688) + 28
 feb05559 NewLinkedList (0, 0, 20, fef71688, fec42c60, 806d3a8) + 29
 feae2bc7 InitializeExceptionInfo (8067888, fef71688, fef70000, fef71688, 0, 8067888) + 47
 feae2f35 AcquireExceptionInfo (8067798, fec42c60, 8047a48, feae2634, 8067888, 0) + 35
 feb21d35 IsEventLogging (8067888, 80714bc, 8067888, 50c, fec1328d, 0) + 45
 feb10409 GetImageInfo (806d3a8, fea0fd94, feffa138, 8050737, 1, 0) + 149
 feb10485 AcquireImageInfo (8047c30, 1, 8066d64, 8067608, 0, 805646a) + 35
 0805650e main     (1, 8047b3c, 8047b44) + 2e
 08050f40 _start   (1, 8047c30, 0, 8047c51, 8047c69, 8047c7a) + 80
Thanks!

Laurent

Re: Binaries crash on Solaris 10 x86 32 bit

Posted: 2015-01-12T05:19:56-07:00
by magick
The stack trace suggests a compiler / system library problem rather than ImageMagick. Its faulting in the initialization code almost immediately after program invocation. You could try commenting our this line: magick/image.c around line 1315:
  • image_info->debug=IsEventLogging();
However, we suspect it will then fail elsewhere, but give it a try.

Re: Binaries crash on Solaris 10 x86 32 bit

Posted: 2015-01-12T08:40:47-07:00
by laurent_csw
magick wrote:The stack trace suggests a compiler / system library problem rather than ImageMagick. Its faulting in the initialization code almost immediately after program invocation. You could try commenting our this line: magick/image.c around line 1315:
  • image_info->debug=IsEventLogging();
However, we suspect it will then fail elsewhere, but give it a try.
Thanks, I've done that, but you're right, it still crashes, the stack is merely slightly different. In your opinion, from the location of the crash, that could be compiler or system lib, but not one of the other dependency libs (eg, libx, libjpeg, whatnot...)?

Code: Select all

core 'core.convert.6770' of 6770:       ./convert
 fef0c8e5 _lwp_kill (1, 6) + 15
 feeb376f raise    (6) + 1f
 fee929e1 abort    (fef74700, 0, 80473f0, fef70000, fee32a00, 80473f0) + cd
 feb14f6a MagickSignalHandler (6, 0, 8047444) + 7a
 fef0939f __sighndlr (6, 0, 8047444, feb14ef0) + f
 feeff06b call_user_handler (6, 0, 8047444) + 22b
 feeff1ac sigacthandler (6, 0, 8047444) + 7c
 --- called from signal handler with signal 6 (SIGABRT) ---
 fef0c8e5 _lwp_kill (1, 6) + 15
 feeb376f raise    (6) + 1f
 fee92978 abort    (fef74980, 0, 8047730, fef70000, fee32a00, 8047730) + 64
 feb14f6a MagickSignalHandler (b, 0, 8047784) + 7a
 fef0939f __sighndlr (b, 0, 8047784, feb14ef0) + f
 feeff06b call_user_handler (b, 0, 8047784) + 22b
 feeff1ac sigacthandler (b, 0, 8047784) + 7c
 --- called from signal handler with signal 11 (SIGSEGV) ---
 feea6149 realfree (8068e68) + 43
 feea6768 cleanfree (0) + 44
 feea5c63 _malloc_unlocked (68, 8047ab4, 80634a8, fec2c240, 8047a08, feb8547b) + ad
 feea5b8c malloc   (67, feea5b96, fef71688, fec2c240) + 34
 feb8547b AllocateSemaphoreInfo (fec2c240, 8047a70, 8047a58, fead75ee, 80634a8, 0) + 1b
 fead72cf InitializeExceptionInfo (80634a8, 0, 3, 58, 8047a50, fefc2cd4) + 3f
 fead75ee AcquireExceptionInfo (8047a80, 8051152, 8063038, 1, 0, 8052cfa) + 2e
 08052d9e main     (8050f60, 1, 8047ab4) + 2e
 08050f60 _start   (1, 8047ba8, 0, 8047bb2, 8047bca, 8047bdb) + 80

Re: Binaries crash on Solaris 10 x86 32 bit

Posted: 2015-01-12T09:47:42-07:00
by magick
Is MAGICKCORE_HAVE_POSIX_MEMALIGN defined in magick/magick-baseconfig.h? If so, comment it out, then rebuild and rerun ImageMagick. Does it still fail?

Re: Binaries crash on Solaris 10 x86 32 bit

Posted: 2015-01-12T16:11:02-07:00
by laurent_csw
magick wrote:Is MAGICKCORE_HAVE_POSIX_MEMALIGN defined in magick/magick-baseconfig.h? If so, comment it out, then rebuild and rerun ImageMagick. Does it still fail?
It's not defined:

Code: Select all

/* Define to 1 if you have the `posix_memalign' function. */
/* #undef HAVE_POSIX_MEMALIGN */

Re: Binaries crash on Solaris 10 x86 32 bit

Posted: 2015-01-13T09:43:18-07:00
by laurent_csw
Okay, I could rebuild with a different compiler, Solaris Studio 12.3, using the same recipe, and the issue is not there. So looks like a GCC issue. I'll poke its maintainer.

Thanks again!

Laurent