Issue with text printing after updating ghostscript in RHEL 7

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux (RHEL) 7.6
  • ghostscript-9.07-31.el7_6.6

Issue

  • We have some network printers that are no longer printing. We see "Filter Failed" messages after updating the ghostscript and ghostscript-cups packages to the latest version.

Resolution

This issue should be resolved in the latest version of ghostscript for RHEL 7 (ghostscript-9.07-31.el7_6.9 or later). Please upgrade to the latest version of ghostscript available. More information can be found in RHSA-2019:0229 and RHSA-2019:2281.

If upgrading ghostscript is not feasible, you may be able to work around this issue, downgrade to a previous version of ghostscript using a command like the following

yum downgrade ghostscript ghostscript-cups

Root Cause

The CUPS texttops filter calls the CUPS texttopdf filter and then invokes pdf2ps to convert the PDF to PostScript. The pdf2ps program calls gs to conver the PDF. The gs command is failing.

Diagnostic Steps

The following messages in /var/log/cups/error_log (when "LogLevel debug" is set in /etc/cups/cupsd.conf) indicate this problem:

D [02/Jan/2019:13:23:33 -0500] [Job 205751] GPL Ghostscript 9.07: Unrecoverable error, exit code 1
D [02/Jan/2019:13:23:33 -0500] [Job 205751] PID 24546 (/usr/lib/cups/filter/texttops) stopped with status 1.

Running pdf2ps manually results in something like the following:

$ pdf2ps - out.ps < /usr/share/doc/libtasn1-4.10/libtasn1.pdf
Error: /invalidfileaccess in --run--
Operand stack:
   (/tmp/gs_Xvn1Mk)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   run   --nostringval--   2
   %stopped_push   --nostringval--   run   run   false   1
   %stopped_push   1907   1   3
   %oparray_pop   1906   1   3
   %oparray_pop   1887   1   3
   %oparray_pop
Dictionary stack:
   --dict:938/1684(ro)(G)--   --dict:1/20(G)--   --dict:77/200(L)--
Current allocation mode is local
GPL Ghostscript 9.07: Unrecoverable error, exit code 1

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.