Created attachment 325204 [details] Broken PDF file. Description of problem: Ghostscript hangs when rendering some PDF files. "gs -sDEVICE=x11 foo.pdf" just displays a blank window, with nothing happening. "convert foo.pdf foo.gif" just sits here doing nothing. Version-Release number of selected component (if applicable): ghostscript-8.15.2-9.3.el5 This is on a Scientific Linux box, but the same happened on a CentOS server so I guess the bug is upstream. Upgrading to ghostscript-8.63-4 (rebuilt from Fedora) fixed the issue. How reproducible: This happens only with a few PDF files, but these always have the issue. These files are not totally broken as xpdf (from xpdf-3.01-28.el5) displays them correctly. Steps to Reproduce: 1. gs -sDEVICE=x11 foo.pdf Actual results: Display blank window. Expected results: Display PDF file. Additional info: I add one of my "broken" files as an attachement, as well as the output from "strace gs -sDEVICE=x11 broken.pdf 2>&1" and "strace convert broken.pdf broken.gif 2>&1".
Created attachment 325205 [details] strace gs -sDEVICE=x11 broken.pdf 2>&1
Created attachment 325206 [details] strace convert broken.pdf broken.gif 2>&1
ghostscript-8.15.2-9.1.el5_1.1 (from Scientific Linux) has a somewhat different behavior. Neither 8.15.2-9.1.el5_1.1 nor 8.15.2-9.3.el5 display the PDF, but 8.15.2-9.3.el5 just sits idle whereas 8.15.2-9.1.el5_1.1 grows to 100% CPU usage (which top displays as 100% user).
Confirmed.
Created attachment 336480 [details] ghostscript-pdf-loop.patch This is the fix.
Release note added. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: A bug that could cause ghostscript to run in an infinite loop when handling certain PDF files has been fixed.
Release note updated. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1,4 @@ -A bug that could cause ghostscript to run in an infinite loop when handling certain PDF files has been fixed.+A typographical error in the gsiparam.h header file made it possible for +some PDF files to cause ghostscript to fall into an infinite loop. This +update fixes the error. +(BZ#473889)
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-1257.html