Bug 1264949

Summary: Ghostscript fails to render PostScript
Product: Red Hat Enterprise Linux 7 Reporter: Justin King <jcking>
Component: ghostscriptAssignee: David Kaspar // Dee'Kej <deekej>
Status: CLOSED DUPLICATE QA Contact: QE Internationalization Bugs <qe-i18n-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 7.1CC: bilias, chris.jordan, dan131riley, deekej, jcking, kdudka, pbroome, smaitra
Target Milestone: rcKeywords: i18n, Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-24 16:06:08 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: 1289025, 1305230    
Attachments:
Description Flags
example PostScript file none

Description Justin King 2015-09-21 17:27:47 UTC
Created attachment 1075555 [details]
example PostScript file

Description of problem:

Ghostscript fails to render PostScript

Version-Release number of selected component (if applicable):

9.07

How reproducible:

Always.

Steps to Reproduce:
1. Open attached PostScript file using evince from either the GUI or terminal.
2. Wait forever...

Actual results:

Evince will indicate that it is loading and never finish.

Expected results:

Rendered document.

Additional info:

(evince:3741): EvinceDocument-CRITICAL **: ev_document_misc_pixbuf_from_surface: assertion 'surface' failed
invalidfont -10
invalidfont -10

Compiling Ghostscript 9.16 and prepending it to LD_LIBRARY_PATH fixes the issue:

make so
make soinstall
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

Late last week I ran across a similar bug filed against Fedora 18. It was resolved, however this was only because it hit end-of-life and ghostscript was updated to a different release in Fedora 19.

This issue occurs in any application using the ghostscript renderer as its backend, like gv for example. gv gives a more detailed explanation for the failure.

Comment 1 David Kaspar // Dee'Kej 2016-07-04 11:56:07 UTC
Hello Justin,

I'm really sorry, but I wasn't able to reproduce this issue with current release of RHEL-7.2. There are currently these versions of packages:

* ghostscript-9.07-18.el7.x86_64
* lcms2-2.6-2.el7.x86_64

I tried to downgrade the lcms2 to lcms2-2.5-5.el7.x86_64.rpm (version for RHEL-7.1), but I was still not able to reproduce this.

Please, let me know if you're still having problems opening the file.ps (attachment 1075555 [details]) on current release of RHEL-7.2. Otherwise, I would like to close this BZ.

Thank you,

David

Comment 3 David Kaspar // Dee'Kej 2016-10-25 16:16:42 UTC
The reporter is not responding, so I'm closing this BZ. In case anyone wills stumble upon this issue again, feel free to reopen this.

David

Comment 4 Kapetanakis Giannis 2017-01-13 08:41:43 UTC
I'm having the same problem with:

ghostscript-9.07-20.el7_3.1

downgrading to ghostscript-9.07-20.el7.x86_64 fixes the problem.

Comment 5 Kamil Dudka 2017-01-13 09:18:00 UTC
Thanks for feedback!  Reopening.  Note that the only difference between -20.el7 and -20.el7_3.1 are the backported CVE fixes:

  - CVE-2013-5653 (bug #1380327)
  - CVE-2016-7977 (bug #1380415)
  - CVE-2016-7978 (bug #1382300)
  - CVE-2016-7979 (bug #1382305)
  - CVE-2016-8602 (bug #1383940)

We should check that there is no regression...

Comment 6 Chris Jordan 2017-01-17 10:38:18 UTC
Sci-linux 6.8
Problem appears with both evince and okular when rendering thumbnails from a postscript file since upgrade to ghostscript-8.70-21.el6_8.1.x86_64 on jan 05 2107. (Okular 0.9.5, evince-2.28.2-19.el6.x86_64)

Ghostscript will display the ps file, as will gv (3.7.1) (this does not produce thumbnails.)

Sympton - stuck on loading
output on terminal
invalidaccess -7
invalidaccess -7
invalidaccess -7

** (evince:22040): WARNING **: Error rendering thumbnail
invalidaccess -7

** (evince:22040): WARNING **: Error rendering thumbnail

Comment 7 Dan Riley 2017-01-23 15:15:15 UTC
This does appear to be a regression due to the CVE-2013-5653 patch, it was seen in other distributions back in October:

https://bugzilla.opensuse.org/show_bug.cgi?id=1006592
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840691

The Debian thread at Message #75

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840691#75

says that

"The problem is line 2011 in /usr/share/ghostscript/9.05/Resource/Init/gs_init.ps:
	systemdict /getenv {pop //false} put
change that to
	systemdict /getenv {pop //false} .forceput
(gs-commits 99e331527d541a8f01ad5455c4eb2aabd67281a6) and it works."

and I've verified that fixes the problem on a Scientific Linux 6 system.

We tracked this down after a user complaint, hopefully it will save you some time.

Comment 8 Chris Jordan 2017-01-24 10:52:53 UTC
Fixes problem on SL6.8
Thanks

(In reply to Dan Riley from comment #7)
> This does appear to be a regression due to the CVE-2013-5653 patch, it was
> seen in other distributions back in October:

Comment 9 Kamil Dudka 2017-01-24 16:06:08 UTC
(In reply to Kapetanakis Giannis from comment #4)
> I'm having the same problem with:
> 
> ghostscript-9.07-20.el7_3.1
> 
> downgrading to ghostscript-9.07-20.el7.x86_64 fixes the problem.

This is apparently a different issue than the one described in comment #0.  Please refer to bug #1411725 for further progress on the issue describe in comment #4.  Marking as duplicate to transfer the CC list...

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