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 1302121 - "convert" command hangs when converting pdf to png
Summary: "convert" command hangs when converting pdf to png
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ghostscript
Version: 7.2
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: David Kaspar // Dee'Kej
QA Contact: QE Internationalization Bugs
Lenka Špačková
URL:
Whiteboard:
: 1268259 (view as bug list)
Depends On:
Blocks: 1289025 1305230
TreeView+ depends on / blocked
 
Reported: 2016-01-26 20:53 UTC by Matt Goldman
Modified: 2019-12-16 05:19 UTC (History)
9 users (show)

Fixed In Version: ghostscript-9.07-20.el7
Doc Type: Release Note
Doc Text:
Ghostcript no longer hangs when converting a PDF file to PNG Previously, when converting a PDF file into a PNG file, Ghostscript could become unresponsive. This bug has been fixed, and the conversion time is now proportional to the size of the PDF file being converted.
Clone Of:
Environment:
Last Closed: 2016-11-04 08:28:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
test.pdf in question (733.30 KB, application/pdf)
2016-01-26 20:53 UTC, Matt Goldman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2550 0 normal SHIPPED_LIVE ghostscript bug fix update 2016-11-03 14:20:31 UTC

Description Matt Goldman 2016-01-26 20:53:21 UTC
Created attachment 1118609 [details]
test.pdf in question

Description of problem:

When converting a PDF to PNG using 'convert', it hangs. 

Version-Release number of selected component (if applicable):
RHEL 7
ImageMagick-6.7.8.9-10.el7.x86_64


How reproducible:
Always

Steps to Reproduce:
1. Download PDF 
2. Attempt to convert PDF with 'convert test.pdf test.png'

Actual results:
Hangs, no output

Expected results:
Output test.png

Additional info:
Customer was able to get around this using an upstream version.

Comment 3 Bryan Mason 2016-01-26 21:31:39 UTC
The pstack shows that the convert command is actually waiting for the 'gs' command to return.  So this is most likely a problem in ghostscript and not ImageMagick.  I'm moving the components and I'll see if I can determine what gs is up to to cause the problem.

Comment 4 josef radinger 2016-03-02 08:26:07 UTC
affected, too

Comment 5 Bryan Mason 2016-03-08 00:38:54 UTC
According to strace, ImageMagick is executing the following command:

/usr/bin/gs -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT \
-dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=pam \ 
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r72x72 -dUseCIEColor \
-sOutputFile=/tmp/magick-gvr4A3Qr-%08d -f/tmp/magick-FGoe7KZa \
-f/tmp/magick-B-PH4C8T"

/tmp/magick-B-PH4C8T is a symlink to the original file passed to ImageMagick

/tmp/magick-FGoe7KZa is a file containing one space (0x20):
$ hexdump -C /tmp/magick-FGoe7KZa
00000000  20                                                | |

This works (or at least it returns):

$ gs -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -sDEVICE=pam \
-sOutputFile=test.pam -f test.pdf 
GPL Ghostscript 9.07 (2013-02-14)
Copyright (C) 2012 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1

Adding options fails when I reach "-dTextAlphaBits=4":

/usr/bin/gs -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT \
-dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=pam \
-dTextAlphaBits=4 -sOutputFile=test.pam -f test.pdf 

The rest of the command, without "-dTextAlphaBits=4" doesn't hang:

$ /usr/bin/gs -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT \
-dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=pam \
-dGraphicsAlphaBits=4 -r72x72 -dUseCIEColor -sOutputFile=test.pam \
-f test.pdf 
GPL Ghostscript 9.07 (2013-02-14)
Copyright (C) 2012 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1

So I'm guessing the problem is with "-dTextAlphaBits=4"

Comment 10 David Kaspar // Dee'Kej 2016-06-22 11:59:46 UTC
Upstream commit that fixes this issue as side-effect of it:
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=c27113ab96a8010b596

Comment 13 David Kaspar // Dee'Kej 2016-06-22 13:24:22 UTC
*** Bug 1268259 has been marked as a duplicate of this bug. ***

Comment 27 errata-xmlrpc 2016-11-04 08:28:44 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://rhn.redhat.com/errata/RHBA-2016-2550.html


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