Bug 691348 - gs hangs and uses 100% CPU
Summary: gs hangs and uses 100% CPU
Status: RESOLVED DUPLICATE of bug 691157
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 8.71
Hardware: PC Linux
: P4 normal
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-29 03:45 UTC by Casey Forbes
Modified: 2010-11-17 11:41 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
Hanging PDF (91.09 KB, application/pdf)
2010-05-29 03:45 UTC, Casey Forbes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Casey Forbes 2010-05-29 03:45:22 UTC
Created attachment 6336 [details]
Hanging PDF

With the following gs command and attached PDF, Ghostscript hangs.
I left it for 3 hours before killing, so it appears to be hung and not just slow. No growth in memory used.

gs -dNOPAUSE -sDEVICE=pnmraw -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r72x72  -sOutputFile=/tmp/out --  bad4.pdf
Comment 1 Casey Forbes 2010-05-29 03:52:07 UTC
This problem was present in 8.60 and is still present in 8.71.
Comment 2 Ken Sharp 2010-05-29 08:54:50 UTC
The main image (woolly glove ?) is set to interpolate. For some reason this is outstandingly slow. Running with -dNOINTERPOLATE the PDF file renders very quickly.

I believe the file hasn't hung, it just seems to take an amazingly long time to interpolate the image.

Possibly this should be assigned to Michael rather than Alex.
Comment 3 Casey Forbes 2010-05-31 21:57:08 UTC
Thanks so much for diagnosing the problem!  at least I can work around this for now.
Comment 4 Alex Cherepanov 2010-06-01 02:55:55 UTC
Running this file, Ghostscript allocates huge buffer for the interpolated
image. I saw 12GB of virtual memory usage before the process was killed.
Prevention of unreasonable upscaling of the image should improve the speed.
Comment 5 Alex Cherepanov 2010-06-04 00:06:04 UTC
-dNOTRANSPARENCY option also speeds up rendering.
This indicates that the bug is caused by interaction between
transparency and interpolation logic.
Comment 6 Chris Liddell (chrisl) 2010-11-17 11:41:16 UTC

*** This bug has been marked as a duplicate of bug 691157 ***