Runaway convert commands

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
juliecool
Posts: 1
Joined: 2013-04-11T05:17:24-07:00
Authentication code: 6789

Runaway convert commands

Post by juliecool »

Are there any common reasons for runaway convert commands? A frequent problem on my server is the convert command that goes out of control, taking up 100% of the CPU and hosing everything. The only thing to do is kill the process.

It's always been a problem to some degree. Previously I wasn't doing anything esoteric, just thumbnailing GIFs and JPEGs for use online.

More recently we've been layering GIFs using various compose operators. Lately we are having a consistent problem with the Vivid_Light compose operator:

Code: Select all

/usr/bin/convert input.gif null: composite_input.gif -matte -dispose None -gravity center -compose Vivid_Light -layers composite output.gif
Seems normal right? Commands containing Vivid_Light have been going bonkers for two days now. Any ideas?
Also, any strategies to mitigate against runaway converts would be appreciated.

Version: ImageMagick 6.7.8-7 2013-03-10 Q64
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Runaway convert commands

Post by magick »

We stop runaway jobs on our server by setting ImageMagick policies. For example 'time' automatically kills a job after this value expires:

Code: Select all

<policymap>
  <policy domain="resource" name="temporary-path" value="/tmp"/> 
  <policy domain="resource" name="memory" value="256MiB"/> 
  <policy domain="resource" name="map" value="512MiB"/> 
  <policy domain="resource" name="area" value="128MB"/> 
  <policy domain="resource" name="disk" value="1GiB"/> 
  <policy domain="resource" name="file" value="768"/> 
  <policy domain="resource" name="thread" value="2"/>
  <policy domain="resource" name="throttle" value="0"/> 
  <policy domain="resource" name="time" value="120"/> 
  <policy domain="system" name="precision" value="6"/> 
  <policy domain="cache" name="shared-secret" value="whatever"/>
</policymap>
You can add -debug cache to your command line to trace a job to see why it may be a runaway. For more details, see the ImageMagick architecture overview @ http://www.imagemagick.org/script/architecture.php. Upgrading to latest release of ImageMagick may help as well.
pipe
Posts: 28
Joined: 2013-04-09T08:32:37-07:00
Authentication code: 6789

Re: Runaway convert commands

Post by pipe »

juliecool wrote:Version: ImageMagick 6.7.8-7 2013-03-10 Q64
I'm just curious: When is a quantum depth of 64-bit needed or even remotely useful? I didn't even know it was supported.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Runaway convert commands

Post by magick »

Good catch. Reinstall ImageMagick and use Q16 rather than Q64. Q64 is experimental and is not supported.
Post Reply