RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1633602 - ImageMagick convert takes a lot of CPU with image height > 566
Summary: ImageMagick convert takes a lot of CPU with image height > 566
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ImageMagick
Version: 7.5
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Jan Horak
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On: 1645218
Blocks: 1652528 1656436
TreeView+ depends on / blocked
 
Reported: 2018-09-27 11:17 UTC by Piyush Bhoot
Modified: 2022-03-13 15:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1652528 (view as bug list)
Environment:
Last Closed: 2019-08-06 13:17:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
image to convert (61.38 KB, image/jpeg)
2018-09-27 11:17 UTC, Piyush Bhoot
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2312 0 None None None 2019-08-06 13:17:43 UTC

Description Piyush Bhoot 2018-09-27 11:17:46 UTC
Created attachment 1487733 [details]
image to convert

Description of problem:
ImageMagick convert takes a lot of CPU with 1200x567 (anything over 566)
It takes 100% CPU for a long time. Up 20 20 minutes (each time). (Environment variable MAGICK_THREAD_LIMIT set to 1)

Version-Release number of selected component (if applicable):
ImageMagick-6.7.8.9-15.el7_2.x86_64

How reproducible:
Always

Steps to Reproduce:

/usr/bin/convert 83902442-88f7-4251-8318-8b77d9fa954b.jpg -filter Triangle -define filter:support=2 -thumbnail 1200x567 -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality 80 -define jpeg:fancy-upsampling=off /tmp/converted.jpg


Actual results:
Takes very long time to convert.

Expected results:
Should convert quickly.

Additional info:  convert below 566 is quick
/usr/bin/convert 83902442-88f7-4251-8318-8b77d9fa954b.jpg -filter Triangle -define filter:support=2 -thumbnail 1200x566 -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality 80 -define jpeg:fancy-upsampling=off /tmp/converted.jpg

Attaching sample image.

Comment 2 Jan Horak 2018-10-18 09:51:27 UTC
Sorry no fix for this unless there's strong customer need for this.

Comment 4 Jan Horak 2018-10-24 10:53:43 UTC
Okay, I've made a testbuild for this with the patch applied, please pass it to the customer if that solves the issue: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=18907097

Comment 5 Piyush Bhoot 2018-10-24 17:01:46 UTC
I Jan,

Thanks for confirmation, I also ended up making test builds for with patch shared above.
Customer has confirmed package is working well on test system.

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=18884805

- I have tested your build as well it works perfectly.

Comment 11 Flavio Grossi 2019-03-13 11:36:13 UTC
(In reply to Jan Horak from comment #4)
> Okay, I've made a testbuild for this with the patch applied, please pass it
> to the customer if that solves the issue:
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=18907097

Hello, I'm using ImageMagick version 6.7.8.9-16 and the following command produces an all-white image using as input the reporter's image:
convert -compress Fax input.jpeg output.tiff

ImageMagick version 6.7.8.9-15 works fine. The only difference, judging from the rpm spec changelog should be the patch proposed in this thread.

Please let me know if you need more info.

Comment 12 Christopher Juckins 2019-03-13 19:53:58 UTC
We are also noticing the same problem with an all-white image being produced with ImageMagick version 6.7.8.9-16.  

Here is a sample command that fails:

convert ppam50bw.png -units PixelsPerInch -quality 75 -type bilevel -density 204x196 -background white -transparent-color black -compress Group4 -sharpen 3x2 ppam50a.tif

However, this command works:

convert ppam50bw.png ppam50a.tif

Could the problem be that if too many computationally-intensive command-line arguments are included, then the process fails and only a blank or white image is produced?  

Both these commands work properly in the previous version of ImageMagick, 6.7.8.9-15.

christopher.juckins
frances.achorn

Comment 13 Flavio Grossi 2019-03-15 14:25:39 UTC
opened new bug #1689261 for visibility

Comment 17 errata-xmlrpc 2019-08-06 13:17:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2312


Note You need to log in before you can comment on or make changes to this bug.