Hide Forgot
Created attachment 1255371 [details] This is a demo pdf file we have used to test in above command Description of problem: The latest ghostscript version shipped by Redhat is 9.07.20 contains a bug which under certain circumstances causes "gs" to spin at 100% CPU load until manually killed. Version-Release number of selected component (if applicable): Rhel 7.3 Package - ghostscript.9.07.20 How reproducible: The problem can also be reproduced using ImageMagick command /usr/bin/convert: Steps to Reproduce: 1. /usr/bin/convert ATK_Broschüre_2017.pdf /tmp/test.gif Actual results: 1. The command hangs and using top command it can be seen that cpu is utilised 99-100% by "gs" Expected results: 1 The ATK_Broschüre_2017.pdf should have got converted to test.gif in /tmp Additional info: https://bugzilla.redhat.com/show_bug.cgi?id=1302121 shows similar type of bug , but resolution provided there with https://rhn.redhat.com/errata/RHSA-2017-0013.html#Red%20Hat%20Enterprise%20Linux%20Server%20 update does'nt seems to work.
(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