Page 1 of 1

problem with using Ping method on corrupt images

Posted: 2007-08-13T10:44:44-07:00
by jimbobhickville
I did a quick search in the forum and didn't see anything, but I suppose this could have been discussed already. Anyway, at the company I work for, we are seeing some really odd behavior using the Ping method in Image::Magick on corrupt images. What happens is, 2 6GB files are created in /tmp/ and the process spins forever. Obviously, this is bad voodoo. Using the 'identify' program yields an immediate "This image is corrupt" message, but PerlMagick never finishes or aborts. The files are mounted over NFS, we're running Fedora Core 6, and whatever version of ImageMagic/PerlMagick comes with Fedora Core 6 (should be very recent, if not the latest. I can get an exact version if desired). I should note that the problem was not seen on Redhat 7.2, which is what we were on before upgrading to FC6 (yeah, I know, we didn't upgrade for way too long, but it wasn't my call).

Anyway, we're modifying our code to use `identify`, although we'd love to be able to switch back to a non-syscall version if this gets fixed. Anyone have any ideas? I'm the developer, not the sysadmin, but I'm sure he'd be willing to provide any information that we need.

Another oddity is that the 'corrupt' file works perfectly well with Windows built-in file viewer. It appeared to be perfectly fine.

Re: problem with using Ping method on corrupt images

Posted: 2007-08-16T13:45:26-07:00
by jimbobhickville
It appears we now have an image that causes the identify program itself to spin endlessly. Adding some alarm code to deal with the problem.

We're on version 6.2.8. Looks like there are newer versions; we're going to try them out.