Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
syamashi
Posts: 12 Joined: 2012-10-05T11:09:07-07:00
Authentication code: 67789
Post
by syamashi » 2012-12-13T18:40:30-07:00
Hello,
I'm using ImageMagick-6.7.8-2_64bit to convert files into JPEG2000 format and I'm experiencing discrepancies in generated files between different versions of CentOS. For instance, I attempted to convert a JPEG file which is 2.5M in size, after the conversions on both OSes, CentOS 6.0 gives me a generated JPEG2000 file in size which is 1.8MB as opposed to CentOS 6.2 giving me 3.2MB. Here is the command I ran:
Code: Select all
convert input.jpg -define numrlvls=7 -define jp2:tilewidth=256 -define jp2:tileheight=256 -define jp2:rate=0.02348 -define jp2:prg=rpcl -define jp2:mode=int -define jp2:prcwidth=256 -define jp2:prcheight=256 -define jp2:cblkwidth=64 -define jp2:cblkheight=64 -define jp2:sop output.jp2
I'm stuck where to look into. Would anyone be able to give me a tip where I should be looking into with CentOS 6.2?
Thanks,
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2012-12-13T19:06:07-07:00
First check your versions of IM and the Jasper delegate libraries on both machines.
syamashi
Posts: 12 Joined: 2012-10-05T11:09:07-07:00
Authentication code: 67789
Post
by syamashi » 2012-12-14T08:48:42-07:00
Hi,
I think the versions of IMs are the same ImageMagick-6.7.8-2_64bit. How do I check the Jasper Delegate libraries?
Thanks,
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2012-12-14T12:00:51-07:00
find the location of your jasper delegate. It is likely either
find /opt | grep "jasper"
or
find /usr | grep "jasper"
the cd to that directory and type
jasper -- version
for me it returns
1.900.1
libjasper 1.900.1
syamashi
Posts: 12 Joined: 2012-10-05T11:09:07-07:00
Authentication code: 67789
Post
by syamashi » 2012-12-14T13:57:35-07:00
Ok, great. I got the same versions of the jasper and now I get the following error:
*** glibc detected *** /usr/local/ImageMagick-6.7.8-2_64bit/bin/convert: double free or corruption (fasttop): 0x00000000014bc2f0 ***
Anything missing?
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2012-12-14T14:47:29-07:00
syamashi wrote: Ok, great. I got the same versions of the jasper and now I get the following error:
*** glibc detected *** /usr/local/ImageMagick-6.7.8-2_64bit/bin/convert: double free or corruption (fasttop): 0x00000000014bc2f0 ***
Anything missing?
I am not that familiar with these error messages, but my suspicion is that you need either an older or newer version of glib2 delegate library or it is corrupt.
Have you tried reinstalling IM? Did you install from Binary or Source?
jpierce
Posts: 2 Joined: 2012-12-27T19:17:24-07:00
Authentication code: 6789
Post
by jpierce » 2012-12-27T19:19:10-07:00
I'm working with him on this issue. Tried recompiling from source and reinstalling, but still no dice. For what it's worth, haven't run into this issue with ImageMagick 6.6.8 or 6.7.6. Is the following backtrace/mem map of any assistance to someone in the know? I don't see any glib2 libraries being loaded there, but perhaps I'm overlooking something.
Code: Select all
*** glibc detected *** /ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/bin/convert: double free or corruption (fasttop): 0x0000000002291360 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x75366)[0x7f0b78f6f366]
/usr/lib64/libjasper.so.1(+0x22c55)[0x7f0b6ac9ac55]
/usr/lib64/libjasper.so.1(jpc_enc_tile_destroy+0x33)[0x7f0b6ac9acb3]
/usr/lib64/libjasper.so.1(jpc_enc_tile_create+0x1c4)[0x7f0b6ac9bd74]
/usr/lib64/libjasper.so.1(+0x252fd)[0x7f0b6ac9d2fd]
/usr/lib64/libjasper.so.1(jpc_encode+0x748)[0x7f0b6ac9e518]
/usr/lib64/libjasper.so.1(jp2_encode+0x55e)[0x7f0b6ac9355e]
/ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/lib/ImageMagick-6.8.0/modules-Q16/coders/jp2.so(+0x3c60)[0x7f0b6aed4c60]
/ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/lib/libMagickCore-Q16.so.7(WriteImage+0x464)[0x7f0b7acf09a4]
/ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/lib/libMagickCore-Q16.so.7(WriteImages+0x1f2)[0x7f0b7acf10f2]
/ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/lib/libMagickWand-Q16.so.7(ConvertImageCommand+0x284d)[0x7f0b7a99259d]
/ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/lib/libMagickWand-Q16.so.7(MagickCommandGenesis+0x57f)[0x7f0b7a9fe93f]
/ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/bin/convert[0x4008e7]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7f0b78f18cdd]
/ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/bin/convert[0x400939]
======= Memory map: ========
00400000-00401000 r-xp 00000000 00:2d 952534423 /ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/bin/convert
00600000-00601000 rw-p 00000000 00:2d 952534423 /ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/bin/convert
02266000-022e8000 rw-p 00000000 00:00 0 [heap]
7f0b6aa63000-7f0b6aa78000 r-xp 00000000 00:1e 829114429 /usr/local/gcc-4.7.1_64bit/lib64/libgcc_s.so.1
7f0b6aa78000-7f0b6ac77000 ---p 00015000 00:1e 829114429 /usr/local/gcc-4.7.1_64bit/lib64/libgcc_s.so.1
7f0b6ac77000-7f0b6ac78000 rw-p 00014000 00:1e 829114429 /usr/local/gcc-4.7.1_64bit/lib64/libgcc_s.so.1
7f0b6ac78000-7f0b6acc6000 r-xp 00000000 00:11 8864 /usr/lib64/libjasper.so.1.0.0
7f0b6acc6000-7f0b6aec6000 ---p 0004e000 00:11 8864 /usr/lib64/libjasper.so.1.0.0
7f0b6aec6000-7f0b6aeca000 rw-p 0004e000 00:11 8864 /usr/lib64/libjasper.so.1.0.0
7f0b6aeca000-7f0b6aed1000 rw-p 00000000 00:00 0
7f0b6aed1000-7f0b6aed6000 r-xp 00000000 00:2d 956418632 /ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/lib/ImageMagick-6.8.0/modules-Q16/coders/jp2.so
7f0b6aed6000-7f0b6b0d6000 ---p 00005000 00:2d 956418632 /ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/lib/ImageMagick-6.8.0/modules-Q16/coders/jp2.so
7f0b6b0d6000-7f0b6b0d7000 rw-p 00005000 00:2d 956418632 /ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/lib/ImageMagick-6.8.0/modules-Q16/coders/jp2.so
7f0b6b0d7000-7f0b77de0000 rw-p 00000000 00:00 0
7f0b77de0000-7f0b77e03000 r-xp 00000000 00:11 7926 /usr/lib64/libjpeg.so.62.0.0
7f0b77e03000-7f0b78003000 ---p 00023000 00:11 7926 /usr/lib64/libjpeg.so.62.0.0
7f0b78003000-7f0b78004000 rw-p 00023000 00:11 7926 /usr/lib64/libjpeg.so.62.0.0
7f0b78004000-7f0b7800e000 r-xp 00000000 00:2d 956418630 /ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/lib/ImageMagick-6.8.0/modules-Q16/coders/jpeg.so
7f0b7800e000-7f0b7820e000 ---p 0000a000 00:2d 956418630 /ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/lib/ImageMagick-6.8.0/modules-Q16/coders/jpeg.so
7f0b7820e000-7f0b7820f000 rw-p 0000a000 00:2d 956418630 /ifs/tmp/jpierce/ImageMagick-6.8.0-10_64bit/lib/ImageMagick-6.8.0/modules-Q16/coders/jpeg.so
7f0b7820f000-7f0b78211000 r-xp 00000000 00:11 8830 /usr/lib64/libXau.so.6.0.0
7f0b78211000-7f0b78411000 ---p 00002000 00:11 8830 /usr/lib64/libXau.so.6.0.0
7f0b78411000-7f0b78412000 rw-p 00002000 00:11 8830 /usr/lib64/libXau.so.6.0.0
7f0b78412000-7f0b7842d000 r-xp 00000000 00:11 8922 /usr/lib64/libxcb.so.1.1.0
7f0b7842d000-7f0b7862c000 ---p 0001b000 00:11 8922 /usr/lib64/libxcb.so.1.1.0
7f0b7862c000-7f0b7862d000 rw-p 0001a000 00:11 8922 /usr/lib64/libxcb.so.1.1.0
7f0b7862d000-7f0b78631000 r-xp 00000000 00:11 6015 /lib64/libuuid.so.1.3.0
7f0b78631000-7f0b78830000 ---p 00004000 00:11 6015 /lib64/libuuid.so.1.3.0
7f0b78830000-7f0b78831000 rw-p 00003000 00:11 6015 /lib64/libuuid.so.1.3.0
7f0b78831000-7f0b78833000 r-xp 00000000 00:11 6045 /lib64/libdl-2.12.so
7f0b78833000-7f0b78a33000 ---p 00002000 00:11 6045 /lib64/libdl-2.12.so
7f0b78a33000-7f0b78a34000 r--p 00002000 00:11 6045 /lib64/libdl-2.12.so
7f0b78a34000-7f0b78a35000 rw-p 00003000 00:11 6045 /lib64/libdl-2.12.so
7f0b78a35000-7f0b78a5b000 r-xp 00000000 00:11 6031 /lib64/libexpat.so.1.5.2
7f0b78a5b000-7f0b78c5a000 ---p 00026000 00:11 6031 /lib64/libexpat.so.1.5.2
7f0b78c5a000-7f0b78c5d000 rw-p 00025000 00:11 6031 /lib64/libexpat.so.1.5.2
7f0b78c5d000-7f0b78cf5000 r-xp 00000000 00:11 8852 /usr/lib64/libfreetype.so.6.3.22
7f0b78cf5000-7f0b78ef4000 ---p 00098000 00:11 8852 /usr/lib64/libfreetype.so.6.3.22
7f0b78ef4000-7f0b78efa000 rw-p 00097000 00:11 8852 /usr/lib64/libfreetype.so.6.3.22
7f0b78efa000-7f0b79083000 r-xp 00000000 00:11 6266 /lib64/libc-2.12.so
7f0b79083000-7f0b79282000 ---p 00189000 00:11 6266 /lib64/libc-2.12.so
7f0b79282000-7f0b79286000 r--p 00188000 00:11 6266 /lib64/libc-2.12.so
7f0b79286000-7f0b79287000 rw-p 0018c000 00:11 6266 /lib64/libc-2.12.so
7f0b79287000-7f0b7928c000 rw-p 00000000 00:00 0
7f0b7928c000-7f0b7930f000 r-xp 00000000 00:11 5996 /lib64/libm-2.12.so
7f0b7930f000-7f0b7950e000 ---p 00083000 00:11 5996 /lib64/libm-2.12.so
7f0b7950e000-7f0b7950f000 r--p 00082000 00:11 5996 /lib64/libm-2.12.so
7f0b7950f000-7f0b79510000 rw-p 00083000 00:11 5996 /lib64/libm-2.12.so
7f0b79510000-7f0b79649000 r-xp 00000000 00:11 7893 /usr/lib64/libX11.so.6.3.0
7f0b79649000-7f0b79849000 ---p 00139000 00:11 7893 /usr/lib64/libX11.so.6.3.0Aborted
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2012-12-27T21:06:20-07:00
Not an expert on this but doing a google search on glibc indicates that it is the C library ---
http://www.gnu.org/software/libc/
jpierce
Posts: 2 Joined: 2012-12-27T19:17:24-07:00
Authentication code: 6789
Post
by jpierce » 2013-01-10T19:46:47-07:00
Correct. We didn't compile glibc ourselves, obviously; it's the standard version that comes with CentOS 6.3. After a ridiculous number of unsuccessful attempts to do my own compilation, I installed ImageMagick via yum and the standard CentOS repos. That version fails on the 'convert' command with the exact same error message, as well.
It's worth noting that the versions I compiled worked perfectly fine on other CentOS 6.x machines we have here. We're only seeing this failure on one of our compute grids, and the only real difference between that and the rest of our environment is that the nodes are all stateless (i.e., OS runs from RAMDisk). Furthermore, the failure is always memory related ("double free or corruption"), so now I'm speculating that's the cause of the issue. I think at this point I should go ahead and file this as a bug.