Avatar of JBurner
JBurner asked on

Imagemagick on RHEL 5 Power6 architecture

I'm having serious problems with a tiff preview creation and identify in Imagemagick on the IBM P-series Power6 archtecture, with a RHEL5 installation.

I do realize that the tiff might be bad (warnings on other ImageMagicks), however it is not giving me a seg fault on any other architecture, it is also working on Power 5 with RHEL4

The tiff can be found here, if anyone can help at all

http://www.encode.dk/156974.tif

The backtrace attached as code is from a simple "identify 156974.tif"

The Imagemagick dev team couldn't help, they can't test it on the power6/rhel5 combo since they are not millionaires ;)

Help or info to work around this is very much appreciated
Compiled ImageMagick-6.4.8-7
 
GDB Backtrace
 
#0 0xf7d8a740 in strncasecmp () from /lib/power6x/libc.so.6
#1 0x0ff49bdc in LocaleNCompare (p=0xf7b90000 <Address 0xf7b90000 out of bounds>, q=0xfae7d44 "8BIM", length=4) at magick/string.c:1392
#2 0x0fae4a6c in ReadProfile (image=0x1003c520, name=0x1002af50 "\020\002¯¨\020\002¯¸\020\002¯Ø",
datum=0xf7a20008 "Adobe Photoshop Document Data Block", length=1945912066) at coders/tiff.c:280
#3 0x0fae5f50 in ReadTIFFImage (image_info=0x100256c8, exception=0x10020030) at coders/tiff.c:354
#4 0x0fe9d9d4 in ReadImage (image_info=0x100203f0, exception=0x10020030) at magick/constitute.c:386
#5 0x0fdb3098 in ConvertImageCommand (image_info=0x100203f0, argc=16, argv=0x10024570, metadata=0x0, exception=0x10020030) at wand/convert.c:554
#6 0x10001bdc in main (argc=16, argv=0xff89f714) at utilities/convert.c:122
 
-------------------------------------------------------------------------------------------------------------------
 
Standard RHEL 5 ImageMagick.ppc64 package from yum
 
GDB Backtrace
 
Program received signal SIGSEGV, Segmentation fault.
0x0000008090bc50c4 in .__strncasecmp () from /lib64/power6x/libc.so.6
(gdb) bt
#0  0x0000008090bc50c4 in .__strncasecmp () from /lib64/power6x/libc.so.6
#1  0x00000400001436c8 in .LocaleNCompare () from /usr/lib64/libMagick.so.10
#2  0x0000040004085c4c in ?? () from /usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/tiff.so
#3  0x0000040004087548 in ?? () from /usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/tiff.so
#4  0x00000400000998bc in .ReadImage () from /usr/lib64/libMagick.so.10
#5  0x00000400002a83a4 in .IdentifyImageCommand () from /usr/lib64/libWand.so.10
#6  0x0000000010000f7c in ?? ()
#7  0x0000008090b59934 in .generic_start_main () from /lib64/power6x/libc.so.6
#8  0x0000008090b59bd0 in .__libc_start_main () from /lib64/power6x/libc.so.6
#9  0x0000000000000000 in ?? ()

Open in new window

System ProgrammingLinuxServer Hardware

Avatar of undefined
Last Comment
JBurner

8/22/2022 - Mon
ai_ja_nai

Exactly, what is the problem and what operation did you want to perform?
ASKER
JBurner

Sorry if it wasn't clear enough

The problem is that ImageMagick exits with a segmentation fault on the given tif file, I am using the identify and convert command to create previews from a java application. But I cut it down to the core, and even a simple identify tiffile gives me the segmentation fault and exits. I've been playing around with the file disabling layers etc, that helped, but other layerd tifs runs ok, I cannot pinpoint the problem, and the tiffile runs ok on other architectures and Intel and AMD
ai_ja_nai

Please post the commands you issued and that caused segmentation fault. You may run them with strace to see the system call flow and the stack strace before the error.

So does just this file cause the problems? Do all other tiffs display and operate properly?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER
JBurner

identify 156974.tif
Segmentation fault

identify -debug all 156974.tif
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: utility.c/ExpandFilenames/825/Configure
  Command line: identify {-debug} {all} {156974.tif}
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: configure.c/GetConfigureOptions/528/Configure
  Searching for configure file: "/home/testkunde/EncodeApp/1.0/app/ImageMagick/share/ImageMagick-6.4.8/config/coder.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: configure.c/GetConfigureOptions/528/Configure
  Searching for configure file: "/home/testkunde/EncodeApp/1.0/app/ImageMagick/lib/ImageMagick-6.4.8/config/coder.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: configure.c/GetConfigureOptions/528/Configure
  Searching for configure file: "/home/testkunde/EncodeApp/1.0/app/ImageMagick/share/doc/ImageMagick-6.4.8/coder.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: configure.c/GetConfigureOptions/528/Configure
  Searching for configure file: "/home/testkunde/EncodeApp/1.0/app/ImageMagick/share/ImageMagick-6.4.8/coder.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: configure.c/GetConfigureOptions/528/Configure
  Searching for configure file: "/home/testkunde/.magick/coder.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: configure.c/GetConfigureOptions/528/Configure
  Searching for configure file: "coder.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: coder.c/LoadCoderList/638/Configure
  Loading coder configuration file "/home/testkunde/EncodeApp/1.0/app/ImageMagick/share/ImageMagick-6.4.8/config/coder.xml" ...
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Module identify[32010]: module.c/OpenModule/1118/Module
  Searching for module "TIFF" using filename "tiff.la"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Module identify[32010]: module.c/GetMagickModulePath/528/Module
  Searching for coder module file "tiff.la" ...
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Module identify[32010]: module.c/OpenModule/1127/Module
  Opening module at path "/home/testkunde/EncodeApp/1.0/app/ImageMagick/lib/ImageMagick-6.4.8/modules-Q16/coders/tiff.la"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Module identify[32010]: module.c/OpenModule/1154/Module
  Method "RegisterTIFFImage" in module "TIFF" at address 0xf752270
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Module identify[32010]: module.c/OpenModule/1168/Module
  Method "UnregisterTIFFImage" in module "TIFF" at address 0xf752210
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Blob identify[32010]: blob.c/OpenBlob/2338/Blob
    read 3 magic header bytes
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: configure.c/GetConfigureOptions/528/Configure
  Searching for configure file: "/home/testkunde/EncodeApp/1.0/app/ImageMagick/share/ImageMagick-6.4.8/config/magic.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: configure.c/GetConfigureOptions/528/Configure
  Searching for configure file: "/home/testkunde/EncodeApp/1.0/app/ImageMagick/lib/ImageMagick-6.4.8/config/magic.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: configure.c/GetConfigureOptions/528/Configure
  Searching for configure file: "/home/testkunde/EncodeApp/1.0/app/ImageMagick/share/doc/ImageMagick-6.4.8/magic.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: configure.c/GetConfigureOptions/528/Configure
  Searching for configure file: "/home/testkunde/EncodeApp/1.0/app/ImageMagick/share/ImageMagick-6.4.8/magic.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: configure.c/GetConfigureOptions/528/Configure
  Searching for configure file: "/home/testkunde/.magick/magic.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: configure.c/GetConfigureOptions/528/Configure
  Searching for configure file: "magic.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: magic.c/LoadMagicList/681/Configure
  Loading magic configure file "/home/testkunde/EncodeApp/1.0/app/ImageMagick/share/ImageMagick-6.4.8/config/magic.xml" ...
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Blob identify[32010]: blob.c/OpenBlob/2338/Blob
    read 3 magic header bytes
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Blob identify[32010]: blob.c/OpenBlob/2338/Blob
    read 3 magic header bytes
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Locale identify[32010]: locale.c/GetLocaleOptions/498/Locale
  Searching for locale file: "/home/testkunde/EncodeApp/1.0/app/ImageMagick/share/ImageMagick-6.4.8/config/locale.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Locale identify[32010]: locale.c/GetLocaleOptions/498/Locale
  Searching for locale file: "/home/testkunde/EncodeApp/1.0/app/ImageMagick/lib/ImageMagick-6.4.8/config/locale.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Locale identify[32010]: locale.c/GetLocaleOptions/498/Locale
  Searching for locale file: "/home/testkunde/EncodeApp/1.0/app/ImageMagick/share/doc/ImageMagick-6.4.8/locale.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Locale identify[32010]: locale.c/GetLocaleOptions/498/Locale
  Searching for locale file: "/home/testkunde/EncodeApp/1.0/app/ImageMagick/share/ImageMagick-6.4.8/locale.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Locale identify[32010]: locale.c/GetLocaleOptions/498/Locale
  Searching for locale file: "/home/testkunde/.magick/locale.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Locale identify[32010]: locale.c/GetLocaleOptions/498/Locale
  Searching for locale file: "locale.xml"
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: locale.c/LoadLocaleList/779/Configure
  Loading locale configure file "/home/testkunde/EncodeApp/1.0/app/ImageMagick/lib/ImageMagick-6.4.8/config/locale.xml" ...
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Configure identify[32010]: locale.c/LoadLocaleList/779/Configure
  Loading locale configure file "/home/testkunde/EncodeApp/1.0/app/ImageMagick/lib/ImageMagick-6.4.8/config/english.xml" ...
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Exception identify[32010]: tiff.c/TIFFWarnings/526/Exception
  156974.tif: unknown field with tag 37724 (0x935c) encountered. `TIFFReadDirectory'
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Coder identify[32010]: tiff.c/ReadTIFFImage/701/Coder
  Geometry: 472x709
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Coder identify[32010]: tiff.c/ReadTIFFImage/703/Coder
  Interlace: 1
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Coder identify[32010]: tiff.c/ReadTIFFImage/705/Coder
  Bits per sample: 8
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Coder identify[32010]: tiff.c/ReadTIFFImage/707/Coder
  Min sample value: 0
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Coder identify[32010]: tiff.c/ReadTIFFImage/709/Coder
  Max sample value: 255
2009-01-22T10:45:56+00:00 0:01 0.000u 6.4.8 Coder identify[32010]: tiff.c/ReadTIFFImage/745/Coder
  Photometric: SEPARATED
2009-01-22T10:45:56+00:00 0:01 0.010u 6.4.8 Exception identify[32010]: tiff.c/TIFFWarnings/526/Exception
  156974.tif: unknown field with tag 40961 (0xa001) encountered. `TIFFReadCustomDirectory'
2009-01-22T10:45:56+00:00 0:01 0.010u 6.4.8 Exception identify[32010]: tiff.c/TIFFWarnings/526/Exception
  156974.tif: unknown field with tag 37724 (0x935c) encountered. `TIFFReadDirectory'
Segmentation fault


gdb identify

gdb identify
GNU gdb Fedora (6.8-27.el5)
Copyright (C) 2008 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 "ppc64-redhat-linux-gnu"...
(gdb) run 156974.tif
Starting program: /home/testkunde/EncodeApp/1.0/bin/identify 156974.tif
[Thread debugging using libthread_db enabled]
[New Thread 0xf7fe40b0 (LWP 32048)]

Program received signal SIGSEGV, Segmentation fault.
0x0f84b2c0 in strncasecmp () from /lib/power6x/libc.so.6
(gdb) bt
#0  0x0f84b2c0 in strncasecmp () from /lib/power6x/libc.so.6
#1  0x0ff7e68c in LocaleNCompare (p=0xf7d10000 <Address 0xf7d10000 out of bounds>, q=0xf758f74 "8BIM", length=4) at magick/string.c:1411
#2  0x0f752d6c in ReadProfile (image=0x1003dcf0, name=0x1 <Address 0x1 out of bounds>, datum=0xf7ba0008 "Adobe Photoshop Document Data Block", length=1945894912) at coders/tiff.c:284
#3  0x0f756198 in ReadTIFFImage (image_info=0x10039be8, exception=0x10020028) at coders/tiff.c:362
#4  0x0feac120 in ReadImage (image_info=<value optimized out>, exception=0x10020028) at magick/constitute.c:572
#5  0x0ff7b0bc in ReadStream (image_info=<value optimized out>, stream=0xfeab3a0 <PingStream>, exception=0x10020028) at magick/stream.c:930
#6  0x0feacfd0 in PingImage (image_info=0x1002d8d0, exception=0x10020028) at magick/constitute.c:244
#7  0x0fead26c in PingImages (image_info=0x1002d8d0, exception=0x10020028) at magick/constitute.c:372
#8  0x0fdab618 in IdentifyImageCommand (image_info=0x100297c8, argc=2, argv=0x10020680, metadata=0xffc4f468, exception=0x10020028) at wand/identify.c:295
#9  0x10001cb4 in main (argc=2, argv=0xffc4f784) at utilities/identify.c:119

Yes, other tiffs display and operate properly, but I got a batch from a supplier that all have the same error. I have tried to disable layer on it, then it runs properly, but I can run other layered tifs properly as well.

I have tried disabling compression, guides whatever on the given tif but to no avail
ASKER CERTIFIED SOLUTION
ai_ja_nai

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
JBurner

ya, that is also my solution, but what bothers me is the segmentation fault, it does not crash on intel based servers with the same IM environment etc, however it does display an error message, but keeps on going
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
JBurner

I'm Gonna award you the points for your time, thanks
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.