Bug 1424752
Summary: | ghostscript bug creates high CPU load and hangs | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Yogita <ysoni> | ||||||
Component: | ghostscript | Assignee: | David Kaspar // Dee'Kej <deekej> | ||||||
Status: | CLOSED ERRATA | QA Contact: | QE Internationalization Bugs <qe-i18n-bugs> | ||||||
Severity: | high | Docs Contact: | Jiri Herrmann <jherrman> | ||||||
Priority: | urgent | ||||||||
Version: | 7.3 | CC: | dbodnarc, deekej, dkochuka, jherrman, kdudka, lmanasko, mmatsuya, qe-i18n-bugs, smaitra, ysoni | ||||||
Target Milestone: | rc | Keywords: | EasyFix, i18n, Patch, Regression, Reproducer, ZStream | ||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | ghostscript-9.07-24.el7 | Doc Type: | Release Note | ||||||
Doc Text: |
*ghostscript* no longer becomes unresponsive in some situations
Under certain circumstances, the *ghostscript* application previously entered an infinite loop, became unresponsive, and caused excessive CPU load. This update fixes the underlying code, which prevents the described problem from occurring.
|
Story Points: | --- | ||||||
Clone Of: | |||||||||
: | 1455084 (view as bug list) | Environment: | |||||||
Last Closed: | 2017-08-01 23:03:50 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 1395973, 1420851, 1455084 | ||||||||
Attachments: |
|
Description
Yogita
2017-02-19 07:31:07 UTC
(In reply to Yogita from comment #0) > Version-Release number of selected component (if applicable): > Rhel 7.3 > Package - ghostscript.9.07.20 Please, provide the complete NVR of the package causing this issue. (Output of 'rpm -q ghostscript'...) > How reproducible: > The problem can also be reproduced using ImageMagick command > /usr/bin/convert: How often is this reproducible? Every time? 5/10 runs? I will try to reproduce it, but specify it next time, please. Thank you. *** Bug 1422491 has been marked as a duplicate of this bug. *** (In reply to David Kaspar [Dee'Kej] from comment #2) > (In reply to Yogita from comment #0) > > Version-Release number of selected component (if applicable): > > Rhel 7.3 > > Package - ghostscript.9.07.20 > > Please, provide the complete NVR of the package causing this issue. (Output > of 'rpm -q ghostscript'...) rpm -q ghostscript ghostscript-9.07-20.el7_3.1.x86_64 > > How reproducible: > > The problem can also be reproduced using ImageMagick command > > /usr/bin/convert: > > How often is this reproducible? Every time? 5/10 runs? I will try to > reproduce it, but specify it next time, please. Thank you. This issue have happened everytime. I have the customer with exactly the same problem.
PDF document details used are the following:
------------------------------------------------
Producer: Adobe PDF Library 9.0
Creator: Adobe InDesign CS4 (6.0.6)
Format: PDF-1.7
------------------------------------------------
Enviroment:
[root@fastvm-r7-3-73 ~]# rpm -q ghostscript ImageMagick
ghostscript-9.07-20.el7_3.1.x86_64
ImageMagick-6.7.8.9-15.el7_2.x86_64
Reproducer:
[root@fastvm-r7-3-73 ~]# /usr/bin/convert /tmp/TRUMPF-5-year-warranty-conditions-brochures.pdf /tmp/test.gif
Results:
>> gs consumes 100% CPU and the process never ends
[root@fastvm-r7-3-73 ~]# ps faux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2148 0.0 0.2 143392 2580 ? Ss Feb21 0:01 \_ sshd: root@pts/0
root 2181 0.0 0.2 116040 2420 pts/0 Ss Feb21 0:00 | \_ -bash
root 3221 0.1 0.8 232980 8472 pts/0 S+ 09:36 0:00 | \_ /usr/bin/convert /tmp/TRUMPF-5-year-warranty-conditions-brochures.pdf /tmp/test.gif
root 3222 100 3.3 135768 34016 pts/0 R+ 09:36 0:30 | \_ gs -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=pam -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r72x72 -dUseCIEColor -sOutputFile=/tmp/magick-RFYIggoO-%08d -f/tmp/magick-TvgwyvY6 -f/tmp/magick-11inBPyp
I'm also attaching strace output for your reference (strace-gs100p-cpu.txt)
A workaround for avoiding such behavior before patch release is welcome.
Created attachment 1263033 [details]
possible fix [from git bisect]
I have isolated the possible fix for this issue by git-bisect.
Comment on attachment 1263033 [details]
possible fix [from git bisect]
So, even upstream says what I have noticed there. The 'for' loop uses wrong variable (i) for incrementation, instead of variable 'k', so eventually the program will get stuck in the loop.
Comment on attachment 1263033 [details]
possible fix [from git bisect]
Looks good.
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/RHSA-2017:2180 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |