Excessive CPU in VICAR file - IM6 SVN - convert - 783d8806

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
JodieC
Posts: 82
Joined: 2014-10-03T21:38:50-07:00
Authentication code: 6789

Excessive CPU in VICAR file - IM6 SVN - convert - 783d8806

Post by JodieC »

Source file:
https://www.dropbox.com/s/6goap67pma4p21s/783d8806?dl=0

To reproduce:
limit cpu to n seconds via

Code: Select all

ulimit -St 600
Then run

Code: Select all

convert 783d8806 null: 
or

Code: Select all

identify 783d8806
Output:
With the ulimit:
Aborted
Without the ulimit:
No output... It just runs for hours.

I did run it through valgrind --tool=callgrind for about 30 seconds or so. When I pulled it into kcachegrind it apparently spent 1.2B calls in ReadVICARImage. I think the error is something to do with line 275 on coders/vicar.c

BT:

Code: Select all

[New LWP 11864]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/home/jodicun/opt/ImageMagick-2014-12-19/utilities/.libs/lt-convert -limit memo'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007ffff6e69bb9 in __GI_raise (sig=sig@entry=0x6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
#0  0x00007ffff6e69bb9 in __GI_raise (sig=sig@entry=0x6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff6e6cfc8 in __GI_abort () at abort.c:89
#2  0x00007ffff7897f91 in MagickSignalHandler (signal_number=0x6) at magick/magick.c:1171
#3  <signal handler called>
#4  0x00007ffff6e69bb9 in __GI_raise (sig=sig@entry=0x6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007ffff6e6cfc8 in __GI_abort () at abort.c:89
#6  0x00007ffff7897f91 in MagickSignalHandler (signal_number=0x18) at magick/magick.c:1171
#7  <signal handler called>
#8  0x00007ffff77b83da in ReadBlobByte (image=image@entry=0x644c90) at magick/blob.c:3003
#9  0x00007ffff7a0788b in ReadVICARImage (image_info=0x613df0, exception=0x605010) at coders/vicar.c:277
#10 0x00007ffff77f0fd8 in ReadImage (image_info=image_info@entry=0x60fc50, exception=exception@entry=0x605010) at magick/constitute.c:547
#11 0x00007ffff77f2013 in ReadImages (image_info=image_info@entry=0x609330, exception=exception@entry=0x605010) at magick/constitute.c:851
#12 0x00007ffff7459948 in ConvertImageCommand (image_info=0x609330, argc=0xc, argv=0x6040d0, metadata=0x0, exception=0x605010) at wand/convert.c:622
#13 0x00007ffff74c7ab8 in MagickCommandGenesis (image_info=image_info@entry=0x605190, command=0x400880 <ConvertImageCommand@plt>, argc=argc@entry=0xc, argv=argv@entry=0x7fffffffe008, metadata=metadata@entry=0x0, exception=exception@entry=0x605010) at wand/mogrify.c:168
#14 0x0000000000400907 in ConvertMain (argv=0x7fffffffe008, argc=0xc) at utilities/convert.c:81
#15 main (argc=0xc, argv=0x7fffffffe008) at utilities/convert.c:92
exe = '/home/jodicun/opt/ImageMagick-2014-12-19/utilities/.libs/lt-convert -limit memo'
I'm running on Im6 from SVN rev17767.

System Details:
AMD64
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty

Found with American Fuzzy Lop ( http://lcamtuf.coredump.cx/afl/ )
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Excessive CPU in VICAR file - IM6 SVN - convert - 783d8806

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.9.0-5 Beta, available by sometime tomorrow. Thanks.
JodieC
Posts: 82
Joined: 2014-10-03T21:38:50-07:00
Authentication code: 6789

Re: Excessive CPU in VICAR file - IM6 SVN - convert - 783d8806

Post by JodieC »

Patch for this here: http://trac.imagemagick.org/changeset/17856


Can you confirm for this issue?
Post Reply